mathacademytutoring Home



Fourier Series

by | Feb 19, 2022 | Math Learning, Math Lecture

INTRODUCTION

The study of a special type of series whose terms are trigonometric functions of a variable was started in the 18th century when J.B.J. Fourier (1768-1830) was successful in his attempt to prove that an arbitrary function given in the interval [-\pi,\pi] can be expressed under certain conditions in a trigonometric series of the form

    \[\dfrac{1}{2}a_{0}+\sum_{n=1}^{\infty}(a_{n}\cos nx+b_{n}\sin nx)\]

and subsequently, such type of special series is given the name ‘Fourier Series’. It has great importance in the study of many branches of science including social sciences. The knowledge of Fourier series provides a powerful technique for solving problems of a periodic nature which occur in situations like theory of conduction of heat, electrical and mechanical vibrations, propagation of electromagnetic waves, acoustics, optics, etc. Fourier was the first person to initiate an elaborate study of trigonometric series and afterwards Dirichlet, Parseval, Bessel and many other mathematician made major contributions to the study of conditions of a function to be represented in a trigonometric series, convergence, integration, and differentiation of the Fourier series. In this article we are going to study Fourier series and their properties.

Before starting the article of Fourier series, it is essential to study the behaviour of periodic functions, piecewise monotone and piecewise continuous functions and some properties related to them.

PERIODIC, PIECEWISE MONOTONE AND PIECEWISE CONTINUOUS FUNCTIONS

Definition: Let S\subset\mathbb{R}, a function f:S\to\mathbb{R} is said to be periodic if there exists a positive constant \mu such  that f(x+\mu)=f(x) for all x, \; x+\mu\in S; the least number \mu possessing this property (if such a number exists) is called the period of the function. f is called periodic of period or fundamental period \mu. f is periodic of period \mu implies also f(x-\mu)=f(x) for all x, \; x-\mu\in S.

The trigonometric functions \sin x, \cos x are periodic of period 2\pi and \tan x, \cot x are periodic of period \pi. \vert\sin x\vert+\vert\cos x\vert is periodic of period \dfrac{\pi}{2}   Every constant function is trivially periodic with no definite Fundamental period.

The following observations are quite clear from the definitions of periodic functions.

  1. If f is defined on an interval of length \mu then f can be extended to the whole of \mathbb{R} by making f periodic of period \mu.
  2. The graph of a periodic function over \mathbb{R} will be replicas of a portion over an interval of length \mu if \mu is period of the function.

Hence if a function f is defined on [-\pi,\pi] it can be made to be a periodic function on \mathbb{R} of period 2\pi. In fact, sum of two periodic function of same period is also a periodic function of that period.

If f is periodic of period \mu then the following results are quite easy to prove:

    \begin{align*}  \text{(i) }& \int_{0}^{a\mu}f(x)dx=a\int_{0}^{\mu}f(x)dx & \text{ for any } a\in\mathbb{N}\\ \text{(ii) }& \int_{a\mu} ^{b\mu}f(x)dx=(b-a)\int_{0}^{\mu}f(x)dx & \text{ for any }a,b\in \mathbb{N}, b>a\\ \text{(iii) }& \int_{a}^{b}f(x)dx =\int_{a+\mu}^{b+\mu}f(x)dx & \text{ for any } a,b\in\mathbb{R}\\ \text{(iv) }& \int_{-\frac{\mu}{2}}^\frac{\mu}{2}f(x)dx=\int_{-\frac{\mu}{2}}^\frac{\mu}{2}f(x+\mu)dx=\int_{a}^{a+\mu}f(x)dx & \text{ for any }a\in \mathbb{R} \end{align*}

Definition: A function f:[a,b]\to\mathbb{R} is said to be piecewise monotone if there exists a partition of [a,b] into open sub-intervals in each of which f is monotone.

Every monotone function is piecewise monotone but the converse is not true.

For example

    \begin{align*} f(x) & = 1-x, \;\;\; x\in \left[0,\dfrac{1}{2}\right]\\ & =x,  \;\;\;\;\;\;\;\;\; x\in \left[\dfrac{1}{2},1\right] \end{align*}

is piecewise monotone on [0, 1], but is not monotone on [0, 1].

Definition: A function f:[a,b]\to\mathbb{R} is said to be piecewise continuous if there exists a partition of [a,b] into open sub-intervals in each of which f is continuous.

Every continuous function is piecewise continuous but the converse is not true.

For example, the function f(x) defined on [1, 4] by

    \begin{align*} f(x) & = 1-x,  \;\;\;\;\; 1\leq x\leq 2\\ & =2, \;\;\;\;\;\;\;\;\;\;\; 2< x< 3\\ &=x+1,\;\;\;\;\; 3\leq x \leq 4 \end{align*}

f is piecewise continuous, since it is continuous on [1, 2], (2, 3), [3, 4], but is not continuous on [1, 4]; 2 and 3 are points of discontinuities of f on [1, 4].

Theorem 2.1.

    \begin{align*} & \int_{-\pi}^{\pi}\sin nx dx =0= \int_{-\pi}^{\pi}\cos nx dx & \text{ for all } n\in \mathbb{N}\\ & \int_{-\pi}^{\pi}\sin mx \cos nx dx =0 & \text{ for all } m,n\in \mathbb{N}\\ & \int_{-\pi}^{\pi}\sin mx \sin nx dx =\begin{cases} 0, M\neq n\\ \pi, m=n \end{cases} & \text{ for all } m,n\in \mathbb{N}\\ & \int_{-\pi}^{\pi}\cos mx \cos nx dx =\begin{cases} 0, M\neq n\\ \pi, m=n \end{cases} & \text{ for all } m,n\in \mathbb{N}\\ \end{align*}

Definition (Fourier Series): Let f:[-\pi,\pi]\to\mathbb{R} be an integrable function on [-\pi,\pi] or if f is unbounded on [-\pi,\pi], let the improper integral \displaystyle \int_{-\pi}^{\pi}f(x)dx be absolutely convergent.

Then the trigonometric series

    \[\dfrac{1}{2}a_{0}\sum_{n=1}^{\infty}(a_{n}\cos nx+b_{n}\sin nx)\]

is called the Fourier series in [-\pi,\pi]  corresponding to the function f, where a_{0},a_{n},b_{n},(n\in\mathbb{N}), called Fourier Coefficients, are given by

    \begin{align*} a_{0} & =\dfrac{1}{\pi}\int_{-\pi}^{\pi}f(x)dt, \;\;\; a_{n}=\dfrac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos nt\ dt \text{ and}\\ b_{n}&=\dfrac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin nt\ dt, \;\;\; n\in\mathbb{N} \end{align*}

Definition: A sequence \left\lbrace f_{n} \right\rbrace_{n} of Riemann integrable functions defined on [a,b] is called orthogonal if

    \[\int_{a}^{b}f_{m}(x)f_{n}(x)dx=0 \text{ for } m\neq n\]

and it is said to be orthonormal if

    \begin{align*} \int_{a}^{b}f_{m}(x)f_{n}(x)dx & =0 \text{ for } m\neq n\\ \text{and }\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; & =1 \text{ for } m=n. \end{align*}

From Theorem 2.1, it easily follows that \dfrac{1}{2\pi},\dfrac{1}{\pi}\cos nx, \dfrac{1}{\pi}\sin nx \; (n\in\mathbb{N}) are all orthonormal on [-\pi,\pi]. The function \dfrac{2}{\pi}\sin nx \; (n\in\mathbb{N})  is orthonormal on [0,\pi]

FOURIER SERIES EXPANSION

Not every function can be expanded into Fourier series. There are certain conditions which are to be satisfied by a function for its expansion into Fourier series. The most familiar one is Dirichlet’s conditions.

Dirichlet’s Conditions

Let f:[a,b]\to\mathbb{R} be a given function. f is said to satisfy the Dirichlet’s conditions in [a,b] if it satisfies one of the following two conditions:

  • f is bounded on [a,b] and the interval [a,b] can be broken into a finite number of open sunintervals of [a,b], in each of which f is monotone i.e., in other words f is bounded and piecewise monotone on [a,b];
  • f has a finite number of points of infinite discontinuities on [a,b] but when arbitrarily small neighbourhoods of these points of discontinuities are excluded from [a,b], f is bounded and piecewise monotone in the remainder of the interval [a,b] and also the improper integral \int_{a}^{b}f(x)dx is absolutely convergent.

Remark: Dirichlet’s conditions can also be put in a slightly different form:

f:[a,b]\to\mathbb{R} is said to satisfy Dirichlet’s condition on [a,b] if f is a function of bounded variation on [a,b] or when f has a finite number of points of finite discontinuities on [a,b] and when arbitrarily small neighbourhoods of these points are excluded from [a,b], f is a function of bounded variation on the reminder of [a,b] and \int_{a}^{b}f(x)dx is absolutely convergent on [a,b].

Theorem 3.1.

If the series \dfrac{1}{2}a_{0}\sum_{n=1}^{\infty}(a_{n}\cos nx+b_{n}\sin nx) converges uniformly to f on [-\pi,\pi] then it is the Fourier series for f in [-\pi,\pi].

Proof. Since the series \dfrac{1}{2}a_{0}\sum_{n=1}^{\infty}(a_{n}\cos nx+b_{n}\sin nx) converges uniformly to f on [-\pi,\pi], f is the sum function of the series and we can write

(1)   \begin{equation*} f(x)=\dfrac{1}{2}a_{0}\sum_{n=1}^{\infty}(a_{n}\cos nx+b_{n}\sin nx), x\in[-\pi,\pi] \end{equation*}

By integrating term-by-term on [-\pi, \pi], we get using Theorem 2.1,

    \begin{align*} \int_{-\pi}^{\pi}f(x)dx  & =\dfrac{1}{2}a_{0}\int_{-\pi}^{\pi} dx + \sum_{n=1}^{\infty}\left[ a_{n} \int_{-\pi}^{\pi}\cos nx\ dx + b_{n}\int_{-\pi}^{\pi}\sin nx\ dx \right]\\ & =a_{0}\pi\\ \Rightarrow a_{0}& = \dfrac{1}{\pi}\int_{-\pi}^{\pi}f(x)dx \end{align*}

Multiplying (1) by \cos mx \; (m\in\mathbb{N}) on both sides and integrating term-by-term (which is valid, since \cos mx is a bounded function and after multiplication the series is still uniformly convergent on [-\pi,\pi], we have

    \begin{align*} \int_{-\pi}^{\pi}f(x)\cos mx \; dx & =\dfrac{1}{2}a_{0}\int_{-\pi}^{\pi}\cos mx \; dx +\sum_{n=1}^{\infty}a_{n}\int_{-\pi}^{\pi}\cos mx \cos nx \; dx + \sum_{n=1}^{\infty}b_{n}\int_{-\pi}^{\pi}\cos mx \sin nx \; dx \\ & =0+a_{n}\pi+0 \\ & \Rightarrow a_{n}=\dfrac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos nx \; dx, \;\;\; n\in\mathbb{N} \end{align*}

Multiplying (1) by \sin mx \;\; (m\in\mathbb{N}) on both sides and integrating term-by-term, we have

    \begin{align*} \int_{-\pi}^{\pi}f(x)\sin mx \; dx & =\dfrac{1}{2}a_{0}\int_{-\pi}^{\pi}\sin mx \; dx +\sum_{n=1}^{\infty}a_{n}\int_{-\pi}^{\pi}\cos nx \sin mx \; dx + \sum_{n=1}^{\infty}b_{n}\int_{-\pi}^{\pi}\sin nx \sin mx \; dx \\ & =0+0+b_{n}\pi \\ & \Rightarrow b_{n}=\dfrac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin nx \; dx, \;\;\; n\in\mathbb{N} \end{align*}

Hence, from definition the series (1) represents the Fourier series for f on [-\pi,\pi].

Note: Fourier series exists for every Riemann integrable function. But that series may or may not converge to f.

Theorem 3.2:

If f:[a,b]\to\mathbb{R} be bounded, integrable and monotone on [a,b] (0<a<b) then

    \begin{align*} &\lim_{n\to\infty}\int_{a}^{b}f(x)\dfrac{\sin nx}{x}dx  =0 \text{ and}\\ &\lim_{n\to\infty}\int_{0}^{a}f(x)\dfrac{\sin nx}{x}dx  =\dfrac{\pi}{2}f(0+), \text{ if } f:[0,a]\to\mathbb{R} \text{ is bounded and integrable on } [0,a]\\ &\text{ and is monotone on } [0,h] \text{ for } 0<h<a. \end{align*}

Proof. (i) Since f is monotone on [a, b], applying second mean value theorem (Weierstrass form) of integral calculus, there exists a \xi\in[a,b] such that

    \begin{align*} \int_{a}^{b}f(x)\dfrac{\sin nx}{x}dx & =f(a)\int_{a}^{\xi}\dfrac{\sin nx}{x}dx + f(b)\int_{\xi}^{b}\dfrac{\sin nx}{x}dx\\ & =f(a)\int_{na}^{n\xi}\dfrac{\sin y}{y}dy + f(b)\int_{n\xi}^{nb}\dfrac{\sin y}{y}dy \;\;\;\;\; \text{(Let, $y=nx$, where $ n\neq 0 $).} \end{align*}

Since \displaystyle \int_{0}^{\infty}\dfrac{\sin x}{dx}dx is convergent, by Cauchy’s condition of convergence

Since \displaystyle \int_{0}^{\infty}\dfrac{\sin x}{dx}dx is

\displaystyle \lim_{n\to\infty}\int_{na}^{n\xi}\dfrac{\sin y}{y}dy=0,

\displaystyle \lim_{n\to\infty}\int_{n\xi}^{nb}\dfrac{\sin y}{y}dy=0.

Hence

\displaystyle \lim_{n\to\infty}\int_{a}^{b}f(x)\dfrac{\sin nx}{x}dx=0 for 0<a<b.

Proof: – (ii) For the integra \displaystyle\int_{0}^{a}f(x)\dfrac{\sin nx}{x}dx \;\; (a>0).

We write f(x)=\varphi(x)+f(0+h), x\in [a,h] \;\; (0<h<a).

Since f is bounded and monotone on [0, h], \varphi is also bounded and monotone on [0, h] for 0<h<a and \varphi(0+h)=0.

By the second mean value theorem,

    \begin{align*} \int_{0}^{h}\varphi(x)\dfrac{\sin nx}{x}dx & =\varphi(0+h)\int_{0}^{\xi}\dfrac{\sin nx}{x}dx+\varphi(h-0)\int_{\xi}^{h}\dfrac{\sin nx}{x}dx\\ & =\varphi(h-0)\int_{\xi}^{h}\dfrac{\sin nx}{x}dx \;\;\;\;\;\;\;\;\;\; (0\leq \xi\leq h)\\ & =\varphi(h-0)\int_{n\xi}^{nh}\dfrac{\sin y}{y}dy \;\;\;\;\;\;\;\;\;\; (y=nx). \end{align*}

Since \displaystyle \int_{0}^{\infty}\dfrac{\sin y}{y} is convergent, there exists k>0 such that \left\vert\int_{0}^{y}\dfrac{\sin y}{y}dy\right\vert<k for all y\geq 0.

Therefore \displaystyle\left\vert \int_{n\xi}^{nh}\dfrac{\sin y}{y}dy\right\vert=\left\vert \int_{0}^{nh}\dfrac{\sin ny}{y}dy-\int_{0}^{n\xi}\dfrac{\sin y}{y}dy \right\vert<2k.

Since \varphi(0+)=0, for any positive \varepsilon there exists a positive \delta such that

\displaystyle\vert\varphi(h-0)\vert<\dfrac{\varepsilon}{4k} whenever 0<h<\delta.

Hence \displaystyle \left\vert\int_{0}^{h}\varphi(x)\dfrac{\sin nx}{x}dx\right\vert=\vert\varphi(h-0)\vert\left\vert\int_{n\xi}^{nh}\dfrac{\sin y}{y}dy\right\vert<\dfrac{\varepsilon}{4k}2k=\dfrac{\varepsilon}{2} whenever 0<h<\delta

by

\displaystyle\lim_{n\to\infty}\int_{h}^{a}\varphi(x)\dfrac{\sin nx}{x}dx=0,

Hence of \varepsilon>0, there exists n_{0}\in\mathbb{N} such that \left\vert\int_{h}^{a}\varphi(x)\dfrac{\sin nx}{x}dx\right\vert<\dfrac{\varepsilon}{2} whenever n\geq n_{0}

This implies

\ben*}

\left\vert\int_{0}^{a}\varphi(x)\dfrac{\sin nx}{x}dx\right\vert & \leq\left\vert\int_{0}^{h}\varphi(x)\dfrac{\sin nx}{x}dx\right\vert+\left\vert\int_{h}^{a}\varphi(x)\dfrac{\sin nx}{x}dx\right\vert\\

& <\dfrac{\varepsilon}{2}+\dfrac{\varepsilon}{2}=\varepsilon\text{ when 0<h<a and n\geq n_{0}.}

\end{align*}

Thus

\displaystyle\lim_{n\rightarrow\infty}{\int_{0}^{a}{\varphi\left(x\right)\frac{\sin{nx}}{x}dx=0}}

\displaystyle \Rightarrow\lim_{n\rightarrow\infty}{\int_{0}^{a}{f\left(x\right)\frac{\sin{nx}}{x}dx=f(0\ +)\lim_{n\rightarrow\infty}{\int_{0}^{a}{\frac{\sin{nx}}{x}dx}}}}

\displaystyle =f(0+)\int_{0}^{\infty}{\frac{\sin{x}}{x}dx=\frac{\pi}{2}f\left(0+\right)\ \left(\text{since}\ \int_{0}^{\infty}{\frac{\sin{x}}{x}dx=\frac{\pi}{2}}\right)}

Corollary 1. If f:[a,\,b]\to\mathbb{R} is bounded integrable and monotone on [a, b] where

0<a<b<\frac{\pi}{2},

then

    \[\displaystyle\lim_{n\rightarrow\infty}{\int_{a}^{b}{f\left(x\right)\frac{\sin{nx}}{\sin{x}}dx=0\ \left(0<a<b<\frac{\pi}{2}\right)}}.\]

Proof.  f\left(x\right)\frac{\sin{nx}}{\sin{x}}=\frac{xf\left(x\right)}{\sin{x}}\frac{\sin{nx}}{x}=g(x)\frac{\sin{nx}}{x}  where g\left(x\right)=\frac{x}{\sin{x}}f\left(x\right).

g is bounded and integrable on [a, b]. g is monotone increasing on \left[0,\, \frac{\pi}{2}\right] and hence on [a, b] where 0<a<b<\frac{\pi}{2}.

Then by Theorem 3.2

    \[\displaystyle\lim_{n\rightarrow\infty}{\int_{a}^{b}{g\left(x\right)\frac{\sin{nx}}{x}dx=0}}\]

    \[\Rightarrow\lim_{n\rightarrow\infty}{\int_{a}^{b}{f\left(x\right)\frac{\sin{nx}}{\sin{x}}dx=0\ \ \left(0<a<b<\frac{\pi}{2}\right)}}\]

Corollary 2. If f:[0,\,a]\to\mathbb{R} be bounded and integrable and monotone on [0, h] for 0<h<a<\frac{\pi}{2}, then

    \[\lim_{n\rightarrow\infty}{\int_{0}^{a}{f\left(x\right)\frac{\sin{nx}}{\sin{x}}dx=\frac{\pi}{2}f\left(0+\right).}}\]

Proof. From (ii) of Theorem 3.2,

    \[\lim_{n\rightarrow\infty}{\int_{0}^{a}{g(x)\frac{\sin{nx}}{x}dx}}\]

    \[=\frac{\pi}{2}g(0\ +h) \text{ where } g\left(x\right)=\frac{x}{\sin{x}}f\left(x\right)\ \left(0<x<a<\frac{\pi}{2}\right).\]

Since g\left(0+h\right)=f(0\ +h) we have

    \[\lim_{n\rightarrow\infty}{\int_{0}^{a}{f\left(x\right)\frac{\sin{nx}}{\sin{x}}dx=\frac{\pi}{2}}}f\left(0+h\right)\]

Remark: the integrals in Theorem 3.2 are known as Dirichlet’s Integrals.

Theorem 3.3

If f:[-\pi,\pi] be bounded, integrable and monotone on [-h,0] and [0,h] (not necessarily in the same sense), where 0<h<\pi, then

    \[\dfrac{1}{2}a_{0}+\sum_{n=1}^{\infty}a_{n}=\dfrac{1}{2}\left[f(0+)+f(0-)\right]\]

where a_{0},a_{n} (n\in\mathbb{N}) stand for Fourier coefficients of f.

Proof. From definition of a_0,\ a_n\ \left(n\in\mathbb{N}\right), we have

    \begin{align*} \frac{1}{2}a_0+\sum_{n=1}^{k}{a_n & =\frac{1}{2\pi}}\int_{-\pi}^{\pi}{f\left(x\right)dx+\sum_{n=1}^{k}\frac{1}{\pi}}\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx\ dx}}\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}{f\left(x\right)dx+\frac{1}{\pi}\int_{-\pi}^{\pi}{f(x)\sum_{n=1}^{k}\cos{nx\ dx}}}\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}{f(x)\left[1+2\frac{\sin{\left(\frac{kx}{2}\right)}}{\sin{\frac{x}{2}}}\cos{(k+1)\frac{x}{2}}\right]dx}\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}{f\left(x\right)\ \left[1+\frac{\sin{\left(k+\frac{1}{2}\right)x-\sin{\frac{x}{2}}}}{\sin{\frac{x}{2}}}\right]dx}\\ & =\frac{1}{2\pi}\int_{-\pi}^{0}{f\left(x\right)\ \frac{\sin{\left(k+\frac{1}{2}\right)x}}{\sin{\frac{x}{2}}}}dx+\frac{1}{2\pi}\int_{0}^{\pi}{f(x)\frac{\sin{\left(k+\frac{1}{2}\right)x}}{\sin{\frac{x}{2}}}dx}\\ & =\frac{1}{\pi}\int_{-\frac{\pi}{2}}^{0}{f\left(-2y\right)\frac{\sin{\left(2k+1\right)y}}{\sin{y}}dy+\frac{1}{\pi}\int_{0}^{\frac{\pi}{2}}{f\left(2y\right)\frac{\sin{\left(2k+1\right)y}}{\sin{y}}dy\ (\text{ Putting }\ x=2y)}}\\ & \text{Now taking } limit\ k\rightarrow\infty \text{ we have }\\ \frac{1}{2}a_0+\sum_{n=1}^{\infty}{a_n & =\frac{1}{\pi}}\left[f\left(0-\right)+f\left(0\ +\right)\right]\frac{\pi}{2}\ (\text{From\ Corollary}\ 2.)\\ & =\frac{1}{2}\left[f\left(0+\right)+f(0\ -)\right]. \text{(Hence Proved)} \end{align*}

Theorem 3.4 (Fourier-Dirichlet):

If f:[-\pi,\pi]\to\mathbb{R} is bounded, integrable, periodic pf period \bm{2\pi} and it is piecewise monotone on [-\pi,\pi] then the Fourier series for f(x) in [-\pi,\pi] is equal to

\bm{f(x)} at \bm{x} in \bm{ (-\pi,\pi)}, when \bm{f} is continuous at \bm{x},

\dfrac{\bm{1}}{\bm{2}}[f(x+0)+f(x-0)]} at \bm{x} in \bm{ (-\pi,\pi)}, when \bm{f(x+0)} and \bm{f(x-0)} exist,

\dfrac{\bm{1}}{\bm{2}}[f(\pi-0)+f(-\pi+0)]} at \bm{x=\pm\pi}, when \bm{f(-\pi+0)} and \bm{f(\pi-0)} exist.

Proof. The Fourier series for f(x) (since it satisfies Dirichlet’s condition in [-\pi,\pi]) in [-\pi,\pi] is

    \[f(x)\sim\frac{1}{2}a_{0}+\sum_{n=1}^{\infty}{\left(a_{n}\cos{nx}+b_{n}\sin{nx}\right),}\]

where

a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(t)dt,}

a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(t)\cos{nt}\, dt,}

and

b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(t)\sin{nt}\, dt \, (n\in\mathbb{N}).}

Let,

    \[S_{n}(x)=\frac{1}{2}a_{0}+\sum_{m=1}^{n}{\left(a_{m}\cos{mx}+b_{m}\sin{mx}\right),} \, n\in\mathbb{N}.\]

Then

    \begin{align*} S_n\left(x\right) & =\frac{1}{2\pi}\int_{-\pi}^{\pi}{f(t)\left[1+\sum_{m=1}^{n}{(2\cos{mt\cos{mx+2\sin{mt\sin{mx)}}}}}\right]}dt\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}{f(t)\left[1+2\sum_{m=1}^{n}\cos{m(t-x)}\right]}dt\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}{f(t)\left[1+2\frac{\sin{\frac{n(t-x)}{2}}}{\sin{\frac{t-x}{2}}}\cos{\frac{(n+1)(t-x)}{2}}\right]dt}\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}{f(t)\frac{\sin{\left(\frac{2n+1}{2}\left(t-x\right)\right)}}{\sin{\left(\frac{t-x}{2}\right)}}dt}\\ & =\frac{1}{2\pi}\int_{-\pi}^{\pi}{f\left(t\right)\frac{\sin{\frac{1}{2}\left(2n+1\right)\left(t-x\right)}}{\sin{\frac{1}{2}}\left(t-x\right)}dt+\frac{1}{2\pi}\int_{x}^{\pi}{f\left(t\right)\frac{\sin{\frac{1}{2}\left(2n+1\right)\left(t-x\right)}}{\sin{\frac{1}{2}}\left(t-x\right)}dt.}} \end{align*}

In the first integral, we will put t=(x-2\theta) and in the second integral, we are going to put t=(x+2\theta).

Then

    \[S_n\left(x\right)=\frac{1}{\pi}\int_{0}^{\frac{\pi}{2}+\frac{x}{2}}{f\left(x-2\theta\right)\frac{\sin{\left(2n+1\right)\theta}}{\sin{\theta}}d\theta+\frac{1}{\pi}\int_{0}^{\frac{\pi}{2}+\frac{x}{2}}{f\left(x+2\theta\right)\frac{\sin{\left(2n+1\right)\theta}}{\sin{\theta}}d\theta.}}\]

Since f satisfies Dirichlet’s conditions in(-\pi,\ \pi), if we consider f\left(x+2\theta\right),\ f(x-2\theta) as functions of \theta then they satisfy Dirichlet’s conditions in \left(0,\frac{\pi}{2}-\frac{x}{2}\right) and in \left(0,\frac{\pi}{2}+\frac{x}{2}\right) respectively. If f\left(x+0\right),\ f(x-0) exist then f(x+2\theta) and f(x-2\theta) have the limits when \theta tends to zero.

Hence, if -\pi<x<\pi, we have using Dirichlet’s integrals,

    \begin{align*} \lim_{n\rightarrow\infty}S_n\left(x\right) &=\frac{1}{\pi}\left[f\left(x-0\right)\frac{\pi}{2}+f(x+0)\frac{\pi}{2}\right]\\ & =\frac{1}{2}\left[f\left(x-0\right)+f(x+0)\right] \end{align*}

Hence (ii) proved.

If f is continuous at x where -\pi<x<\pi then f\left(x-0\right)=f\left(x+0\right)=f\left(x\right).

Hence,

\lim_{n\rightarrow\infty}{S_n\left(x\right)=f\left(x\right),} which proves (i).

At x=\pi,

    \begin{align*} S_n\left(\pi\right) & =\frac{1}{\pi}\int_{0}^{\pi}{f(\pi-2\theta)\frac{\sin{(2n+1)\theta}}{\sin{\theta}}d\theta}\\ & =\frac{1}{\pi}\int_{0}^{\pi-\delta}{f\left(\pi-2\theta\right)\frac{\sin{\left(2n+1\right)\theta}}{\sin{\theta}}d\theta+\frac{1}{\pi}\int_{\pi-\theta}^{\pi}{f\left(\pi-2\theta\right)\frac{\sin{\left(2n+1\right)\theta}}{\sin{\theta}}d\theta,\ \ \ (0<\delta<\pi)}}\\ & =\frac{1}{\pi}\int_{0}^{\pi-\delta}{f\left(\pi-2\theta\right)\frac{\sin{\left(2n+1\right)\theta}}{\sin{\theta}}d\theta+\frac{1}{\pi}\int_{0}^{\delta}{f(-\pi+2\theta)\frac{\sin{(2n+1)\theta}}{\sin{\theta}}d\theta}}. \end{align*}

If \bm{f(\pi-0)} and \bm{f(\pi0)} exist, using Dirichlet’s integrals,

We have,

    \begin{align*} \lim_{n\rightarrow\infty}S_n\left(\pi\right) & =\frac{1}{\pi}f\left(\pi-0\right)\frac{\pi}{2}+\frac{1}{\pi}f(-\pi+0)\frac{\pi}{2}\\ & =\frac{1}{2}\left[f\left(-\pi+0\right)+f(\pi-0)\right]. \end{align*}

Similarly, it can be shown that

    \[\lim_{n\rightarrow\infty}S_n\left(-\pi\right)=\frac{1}{2}\left[f\left(-\pi+0\right)+f(\pi-0)\right], \text{ \textbf{which proves (iii)} }\]

Remark: The Theorem 3.4 establishes the point-wise convergence of the Fourier series for f to the function f and not the uniform convergence. The Fourier series expression of a function is unique.

Theorem 3.5. (Parseval’s Identity):

If the Fourier series for f(x) in [-\pi,\ \pi] converges uniformly to f on [-\pi,\ \pi] then

    \[\bm{\frac{1}{2}}\bm{a_0^2+\sum_{n=1}^{\infty}(a_{0}^{2}+b_{n}^{2})=}\bm{\frac{1}{\pi}\int_{-\pi}^{\pi}[fx]^{2}dx}\]

Where a_0,\ a_n,\ b_n\ (n\in\mathbb{N}) are the Fourier coefficients for f in \left[-\pi,\ \pi\right].

Proof.  The Fourier series of f in [-\pi,\ \pi] is

    \[f(x)~\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx+b_n\sin{nx)}}}\ldots\ (1)\]

Where

    \[a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)dx,\ \ \ a_n=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx\ dx,\ \ \ b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx,\ \left(n\in\mathbb{N}\right).}}}}}\]

Since the series (1) converges uniformly to f on \left[-\pi,\ \pi\right], then we can write (1) as

    \[f\left(x\right)=\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx}+b_n\sin{nx)}}, \ \ x\in[-\pi,\pi]\ldots\ (2).\]

Multiplying both sides of (2) by f(x) and then integrating term-by-term (which is valid, since f is bounded on \left[-\pi,\ \pi\right] or if f(x) unbounded, \bm{\int_{-\pi}^{\pi}f\left(x\right)dx} is absolutely convergent) on [-\pi,\ \pi] we have

    \[\int_{-\pi}^{\pi}{\left[f\left(x\right)\right]^2dx=\frac{1}{2}a_0\int_{-\pi}^{\pi}{f\left(x\right)dx+\sum_{n=1}^{\infty}\left[a_n\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx\ dx+b_n\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx}}}}\right]}}\]

    \[\int_{-\pi}^{\pi}{\left[f\left(x\right)\right]^2dx}=\frac{\pi}{2}a_0^2+\pi\sum_{n=1}^{\infty}\left(a_n^2+b_n^2\right).\]

    \[\Rightarrow\frac{1}{2}a_0^2+\sum_{n=1}^{\infty}{\left(a_n^2+b_n^2\right)=\frac{1}{\pi}\int_{-\pi}^{\pi}{\left[f(x)\right]^2dx.}} \text{ \textbf{(Hence\ Proved)}}\]

Theorem 3.6. (Bessel’s Inequality)

If \bm{f:[-\pi,\ \pi]\to \mathbb{R}} is bounded and integrable on [-\pi,\ \pi] or if \bm{f(x)} is unbounded on [-\pi,\ \pi] but \bm{\int_{-\pi}^{\pi}{\left[f(x)\right]^2dx}} is convergent, then

    \[\bm{\frac{1}{2}a_0^2+\sum_{n=1}^{m}\left(a_n^2+b_n^2\right)}\bm{\leq}\bm{\frac{1}{\pi}\int_{-\pi}^{\pi}\left[f\left(x\right)\right]^{2}dx, \ (m\in\mathbb{N})}\]

Where a_0,\ a_n,\ b_n\ (n\in\mathbb{N}) are the Fourier coefficients for f(x) in \left[-\pi,\ \pi\right].

Proof.  The Fourier series expression for f on [-\pi,\ \pi] is

    \[\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx+b_n\sin{nx)}}}\]

Where _0,\ a_n\ \left(n\in\mathbb{N}\right), b_n\ (n\in\mathbb{N}) are given by

    \[a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)dx,} a_n=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx\ dx}} \text{ and } b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx\ }.}\]

for all n=1,2,3\ldots\ldots.

Let

    \[S_m\left(x\right)=\frac{1}{2}a_0+\sum_{n=1}^{m}{(a_n\cos{nx+b_n\sin{nx),\ \ \ \left(m\in\mathbb{N}\right)\ldots\left(1\right).}}}\]

Since \int_{-\pi}^{\pi}{\left[f\left(x\right)-S_m\left(x\right)\right]^2dx\geq0}, we have

    \[2\int_{-\pi}^{\pi}{f\left(x\right)S_m\left(x\right)dx-\int_{-\pi}^{\pi}{\left[S_m(x)\right]^2dx\le\int_{-\pi}^{\pi}{\left[f(x)\right]^2dx\ldots\left(2\right).}}}\]

From (1)

    \begin{align*} \int_{-\pi}^{\pi}S_m\left(x\right)\ f\left(x\right)dx & =\frac{1}{2}a_0\int_{-\pi}^{\pi}f\left(x\right)dx\\ & +\sum_{n=1}^{m}\left[a_n\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx\ dx+b_n\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx}}}}\right]\\ \Rightarrow\int_{-\pi}^{\pi}S_m\left(x\right)f\left(x\right)dx & =\pi\left[\frac{1}{2}a_0^2+\sum_{n=1}^{m}\left(a_n^2+b_n^2\right)\right]\ldots\left(3\right). \end{align*}

Again from (1),

    \begin{align*} \int_{-\pi}^{\pi}\left[S_m(x)\right]^2dx & =\frac{1}{4}a_0^2\int_{-\pi}^{\pi}dx+a_0\left[\sum_{n=1}^{\infty}{a_n\int_{-\pi}^{\pi}\cos{nx\ dx+b_n\int_{-\pi}^{\pi}\sin{nx\ dx}}}\right]\\ & +\int_{-\pi}^{\pi}{\left\{\sum_{n=1}^{m}\left(a_n\cos{nx+b_n\sin{nx}}\right)\right\}^2dx}\\ & =\pi\left[\frac{1}{2}a_0^2+\sum_{n=1}^{m}{(a_n^2+b_n^2)}\right]\ldots(4) \end{align*}

    \[\left(\because\int_{-\pi}^{\pi}{{cos}^2nx\ dx=\pi=\int_{-\pi}^{\pi}{{sin}^2nx\ dx}}\ and\ \int_{-\pi}^{\pi}\cos{nx\sin{nx\ dx=0,\ \ \ n\in\mathbb{N}}}\right).\]

Hence using (2), (3) and (4) we have the inequality

    \[\frac{1}{2}a_0^2+\sum_{n=1}^{m}{\left(a_n^2+b_n^2\right)\le\frac{1}{\pi}\int_{-\pi}^{\pi}{\left[f\left(x\right)\right]^2dx}}\]

Note: Taking limit\ m\rightarrow\infty in Bessel’s inequality we obtain

    \[\frac{1}{2}a_0^2+\sum_{n=1}^{\infty}{\left(a_n^2+b_n^2\right)\le\frac{1}{\pi}\int_{-\pi}^{\pi}{\left[f\left(x\right)\right]^2dx.}}\]

Since f and hence f^2 is integrable on \left[-\pi,\ \pi\right], the series

    \[\sum_{n=1}^{\infty}{\left(a_n^2+b_n^2\right)\text{ is\ convergent.}}\]

SOME EXAMPLES ON FOURIER SERIES REPRESENTATION OF FUNCTIONS IN \left[-\pi,\ \pi\right]

Example 4.1. We are going to solve the Fourier series representation of f(x) in [-\pi,\ \pi] where

    \[f\left(x\right)=x,\ \ x\in[-\pi,\ \pi]\]

and hence we will deduce that 1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\ldots=\frac{\pi}{4}.

Solution: f is continuous on [-\pi,\ \pi] and hence it is bounded and integrable on \left[-\pi,\ \pi\right]. Since f^\prime\left(x\right)>0 for x\in\left[-\pi,\ \pi\right], f is monotone increasing on \left[-\pi,\ \pi\right]. Thus f satisfies Dirichlet’s conditions on [-\pi,\ \pi] so that f can be represented by a Fourier series

    \[\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx+b_n\sin{nx)}}}\]

    \begin{align*} \text{ Where}, a_0 & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)dx=0 (\because f \text{ is odd})}\\ a_n & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx}dx,\ \left(n\in\mathbb{N}\right)=0} \text{ (Since f is odd and hence $f(x)\cos\ nx$ is odd for all $n\in\mathbb{N}$)}\\ b_n & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx,\ \ \ (n\in\mathbb{N})}}\\ & =\frac{2}{\pi}\int_{0}^{\pi}{x\sin{nx\ dx}}\\ & =\frac{2}{\pi}\left\{\left[-\frac{x}{n}\cos{nx}\right]_0^\pi+\frac{1}{n}\int_{0}^{\pi}\cos{nx\ dx}\right\}\\ & =-\frac{2}{n}\cos{n\pi}\\ & ={(-1)}^n\frac{2}{n}. \text{ According as n is even or odd. [Since,$\cos nx={(-1)}^n$]} \end{align*}

Hence the Fourier series expansion for f in [-\pi,\ \pi] is

    \[=\sum_{n=1}^{\infty}{b_n\sin{nx=2\left[\frac{\sin{x}}{1}-\frac{\sin{2x}}{2}+\frac{\sin{3x}}{3}-\ldots\right]}}\]

Since f is continuous on \left[-\pi,\ \pi\right], so we can write

    \[f\left(x\right)=2\left[\frac{\sin{x}}{1}-\frac{\sin{2x}}{2}+\frac{\sin{3x}}{3}-\frac{\sin{4x}}{4}+\ldots\right],\ \ x\in\left[-\pi,\ \pi\right].\]

    \begin{align*} \text{ At } x & =\frac{\pi}{2}\in\left[-\pi,\ \pi\right],\\ \frac{\pi}{2} & =2\left[1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\ldots\right]\\ \Rightarrow & 1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\ldots=\frac{\pi}{4}. \text{\textbf{(Hence we got our desire result.)}} \end{align*}

Example 4.2. We are going to find the Fourier series expansion of the function

    \[f\left(x\right)=x\sin{x}\ in\ [-\pi,\pi].\]

Hence we will deduce that

    \[\frac{\pi}{4}=\frac{1}{2}+\frac{1}{1\cdot3}-\frac{1}{3\cdot5}+\frac{1}{5\cdot7}-\ldots\]

Solution: Since f is an even function, its derivative f^\prime is odd and hence f^\prime is symmetric about origin. f^\prime\left(x\right)=\sin{x+x\cos{x>0}} in \left(0,\ \frac{\pi}{2}\right) and <0\ in\ \left(\frac{\pi}{2},\pi\right). Hence f is piecewise monotone in [-\pi,\pi]. Hence f satisfies Dirichlet’s conditions in [-\pi,\pi]. Therefore f can be represented by the Fourier series

    \[\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx+}b_n\sin{nx)}.}\]

    \begin{align*} \text{Where } a_0 & =\frac{1}{\pi}\int_{-\pi}^{\pi}f\left(x\right)dx =\frac{2}{\pi}\ \int_{0}^{\pi}{x\sin{x\ dx}}\\ & =\frac{2}{\pi}\left\lbrace-x\cos x]_{0}^{\pi}+\int_{0}^{\pi}\cos x\,dx\right\rbrace=\frac{2}{\pi}\cdot\pi=2; \end{align*}

    \begin{align*} \text{For } n\in N,\ \ \bm{a_n} & \bm{=\frac{1}{\pi}\int_{-\pi}^{\pi}f\left(x\right)\cdot\cos{nx}dx=\frac{2}{\pi}\ \int_{0}^{\pi}{x\sin{x\cos{nx}dx}}}\bm{\left[}\textbf{\text{ even function }}\bm{\right]}\\ & =\frac{1}{\pi}\int_{0}^{\pi}x\left(\sin{\left(n+1\right)}x-\sin{\left(n-1\right)}x\right)dx \end{align*}

[\text{Since },2\cos{\left(\frac{A+B}{2}\right)}\sin{\left(\frac{A-B}{2}\right)}=sinA-sinB]

    \begin{align*} \text{For } n>1,\ \ a_n & =\frac{1}{\pi}\left\{\left[x\cdot\frac{\cos{\left(n-1\right)x}}{n-1}-x\cdot\frac{\cos{\left(n+1\right)}x}{n+1}\right]_0^\pi+\int_{0}^{\pi}\left[\frac{\cos{\left(n+1\right)}x}{n+1}-\frac{\cos{\left(n-1\right)}x}{n-1}\right]dx\right\}\\ & ={(-1)}^{n-1}\left[\frac{1}{n-1}-\frac{1}{n+1}\right]={(-1)}^{n-1}\frac{2}{n^2-1} \end{align*}

    \begin{align*} \text{When } n=1,\ a_1 & =\frac{1}{\pi}\int_{0}^{\pi}{x\sin{2x\ dx=\frac{1}{\pi}\left\{\left[\frac{-x\cos{2x}}{2}\right]_0^\pi+\frac{1}{2}\int_{0}^{\pi}\cos{2xdx}\right\}}}\\ & =-\frac{1}{2}. \end{align*}

For n\in\mathbb{N},\ b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx=0,}} since f\left(x\right)\sin{nx} is an odd function.

Hence, Fourier series corresponding to f(x) in [-\pi,\ \pi] is

    \[f\left(x\right)\sim\ 1-\frac{1}{2}\cos{x+2\sum_{n=2}^{\infty}{\frac{{(-1)}^{n-1}}{n^2-1}\cos{nx.}}}\]

Since f is continuous on [-\pi,\pi],

    \[f\left(\frac{\pi}{2}\right)=1-\frac{1}{2}\cos{\frac{\pi}{2}+}2\sum_{n=2}^{\infty}{\frac{{(-1)}^{n-1}}{n^2-1}\cos{\frac{n\pi}{2}}}\]

    \[\Rightarrow\frac{\pi}{2}=1+2\left[\frac{1}{2^2-1}-\frac{1}{4^2-1}+\frac{1}{6^2-1}-\ldots\right]\]

    \[\Rightarrow\frac{\pi}{4}=\frac{1}{2}+\frac{1}{1\cdot3}-\frac{1}{3\cdot5}+\frac{1}{5\cdot7}-\ldots \textbf{\text{ (Hence we are done)}}\]

Example 4.3. Obtain the Fourier series expansion of f(x) in [-\pi,\ \pi], where

    \[f\left(x\right)=\left\{\begin{matrix}0\ \ \ \ ,-\pi\le x<0\\\frac{1}{4}\pi x\ \ \ \ ,0\le x\le\pi\\\end{matrix}\right.\]

Then we are going to show that the sum of the series

    \[1+\frac{2}{3^2}+\frac{2}{5^2}+\ldots \text{ is equal to } \frac{\pi^2}{8}\]

Solution: f is piecewise monotone on [-\pi,\ \pi]. f is continuous on [-\pi,\ \pi] and hence is integrable on \left[-\pi,\ \pi\right]. Thus f satisfies Dirichlet’s conditions in \left[-\pi,\ \pi\right].

So, f can be represented by the Fourier series

    \[\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx+b_n\sin{nx)}}}\]

where

    \[a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)dx=\frac{1}{4}\int_{0}^{\pi}{x\ dx=\frac{\pi^2}{8}}}\]

For

    \begin{align*} n\in\mathbb{N},\ a_n & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx\ dx=\frac{1}{4}\int_{0}^{\pi}{x\cos{nx\ dx}}}}\\ & =\frac{1}{4}\left\{\left[\frac{x\sin{nx}}{n}\right]_0^\pi-\frac{1}{n}\int_{0}^{\pi}\sin{nx\ dx}\right\}\\ & =\frac{1}{4n^2}(\cos{n\pi-1)=\frac{1}{4n^2}\left({(-1)}^n-1\right)} \end{align*}

    \begin{align*} b_n & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx=\frac{1}{4}\int_{0}^{\pi}{x\sin{nx\ dx}}}}\\ & =\frac{1}{4}\left\{\left[-\frac{1}{n}x\cos{nx}\right]_0^\pi+\frac{1}{n}\int_{0}^{\pi}\cos{nx\ dx}\right\}\\ & =-\frac{1}{4n}\pi\cos{n\pi=-\frac{\pi}{4n}{(-1)}^n} \end{align*}

Thus, the Fourier series expansion of f\left(x\right) in [-\pi,\ \pi] is

    \[\frac{\pi^2}{16}+\frac{1}{4}\sum_{n=1}^{\infty}{\frac{1}{n^2}\left({(-1)}^n-1\right)\cos{nx-\frac{\pi}{4}\sum_{n=1}^{\infty}{\frac{1}{n}\left(-1\right)^n\sin{nx}}}}\]

i.e.,

    \[\frac{\pi^2}{16}-\frac{1}{2}\left[\frac{\cos{x}}{1^2}+\frac{\cos{3x}}{3^2}+\frac{\cos{5x}}{5^2}+\ldots\right]+\frac{\pi}{4}\left[\frac{\sin{x}}{1}-\frac{\sin{2x}}{2}+\frac{\sin{3x}}{3}-\ldots\right].\]

Since f is continuous on \left[-\pi,\ \pi\right],

    \[f\left(0\right)=\frac{\pi^2}{16}-\frac{1}{2}\left[\frac{1}{1^2}+\frac{1}{3^2}+\frac{1}{5^2}+\frac{1}{7^2}+\ldots\right] \text{ and } f\left(0\right)=0.\]

Therefore,

    \[\frac{1}{1^2}+\frac{1}{3^2}+\frac{1}{5^2}+\frac{1}{7^2}+\ldots=\frac{\pi^2}{8}\]

Observation.    If a function f is not defined at \pm\pi then f can be defined arbitrarily at those points. However, it is preferable to define f at those points in such a way that makes f continuous on \left[-\pi,\ \pi\right].

Example 4.4. We will find Fourier series of the periodic function f with period 2\pi defined as

    \[f\left(x\right)=\left\{\begin{matrix}-1,\ -\pi<x<0\\1\ \ ,\ \ \ 0\le x<\pi\\\end{matrix}\right.\]

Then we will calculate the sum of the series at x=\pm\pi.

And we will prove that \frac{\pi}{4}=1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\ldots.

Solution:  For the sake of continuity, we define f\left(-\pi\right)=-1,\ f\left(\pi\right)=1.

f is piecewise monotone in \left[-\pi,\ \pi\right]. It is bounded and periodic with period 2\pi. f is continuous on [-\pi,\ \pi] except at x=0. Hence f is integrable on \left[-\pi,\ \pi\right]. Thus f satisfies Dirichlet’s conditions on \left[-\pi,\ \pi\right]. Hence f can be represented by Fourier series, which is

    \[\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx+b_n\sin{nx),}}}\]

Where

    \[a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(x)dx}=0\]

    \begin{align*} a_n & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx\ dx=-}}\frac{1}{\pi}\int_{-\pi}^{0}\cos{nx\ dx+\frac{1}{\pi}\int_{0}^{\pi}\cos{nx\ dx}}\\ & =0,\ (n\in\mathbb{N}) \end{align*}

    \begin{align*} b_n & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx=-\frac{1}{\pi}\int_{-\pi}^{0}{f\left(x\right)\sin{nx\ dx+\frac{1}{\pi}\int_{0}^{\pi}{f\left(x\right)\sin{nx\ dx}}}}}}\\ & =\frac{2}{n\pi}[1-\cos n\pi]=0  \text{ when $n$ is even}\\ & =\frac{4}{n\pi}  \text{ when $n$ is odd.} \end{align*}

Thus, Fourier series for f in [-\pi,\ \pi] is

    \[\frac{4}{\pi}\left[\frac{\sin{x}}{1}+\frac{\sin{3x}}{3}+\frac{\sin{5x}}{5}+\ldots\right]\]

At x=\pm\pi, the Fourier series for f converges to

    \[\frac{1}{2}[f\left(-\pi+0\right)+f\left(\pi-0\right)]=\frac{1}{2}\left[-1+1\right]=0\]

Hence sum of the series at x=\pm\pi is 0.

Since f is continuous at x=\frac{\pi}{2}, we have

    \begin{align*} f\left(\frac{\pi}{2}\right) & =\frac{4}{\pi}\left[\frac{\sin{\frac{\pi}{2}}}{1}+\frac{\sin{\frac{3\pi}{2}}}{3}+\frac{\sin{\frac{5\pi}{2}}}{5}+\frac{\sin{\frac{7\pi}{2}}}{7}+\ldots\right]\\ \Rightarrow\frac{\pi}{4} & =1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\ldots \end{align*}

Example 4.5. If f\left(x\right)=\left\{\pi-\left|x\right|\right\}^2 on \left[-\pi,\ \pi\right], we will prove that the Fourier series of f is given by

    \[f\left(x\right)=\frac{\pi^2}{3}+4\sum_{n=1}^{\infty}\frac{\cos{nx}}{n^2}\]

Then we will deduce that

    \[\sum_{n=1}^{\infty}{\frac{1}{n^2}=\frac{\pi^2}{6}}\]

and

    \[\sum_{n=1}^{\infty}\frac{1}{n^4}=\frac{\pi^4}{90}\]

Solution: f is piecewise monotone on  \left[-\pi,\ \pi\right]. f is continuous on  \left[-\pi,\ \pi\right] and hence is integrable on  \left[-\pi,\ \pi\right]. Therefore f satisfies Dirichlet’s conditions on  \left[-\pi,\ \pi\right]. Hence f can be represented by Fourier series in  \left[-\pi,\ \pi\right] which is

    \[\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx+b_n\sin{nx),}}}\]

where

    \begin{align*} a_0 & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)dx=\frac{2}{\pi}\int_{0}^{\pi}{\left(\pi-x\right)^2dx=\frac{2}{\pi}\left[\pi^3-\pi^3+\frac{\pi^3}{3}\right]=\frac{2}{3}\pi^2,}}\\ a_n & =\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\cos{nx}dx=\frac{2}{\pi}\int_{0}^{\pi}{\left(\pi-x\right)^2\cos{nx}dx}}\\ & =\frac{2}{\pi}\left[\pi^2\int_{0}^{\pi}\cos{nx\ dx-2\pi\int_{0}^{\pi}{x\cos{nx\ dx+\int_{0}^{\pi}{x^2\cos{nx\ dx}}}}}\right]\\ & =\frac{2}{\pi}\left[0-2\pi\left\{\left[\frac{x}{n}\sin{nx}\right]_0^\pi-\frac{1}{n}\int_{0}^{\pi}\sin{nx\ dx}\right\}+\left[\frac{x^2}{n}\sin{nx}\right]_0^\pi-\frac{2}{n}\int_{0}^{\pi}{x\sin{nx\ dx}}\right]\\ & =\frac{2}{\pi}\left[\frac{2\pi}{n^2}(1-\cos{n\pi)-\frac{2}{n}\left\{\left[-\frac{x}{n}\cos{nx}\right]_0^\pi+\frac{1}{n}\int_{0}^{\pi}\cos{nx\ dx}\right\}}\right]\\ & =\frac{2}{\pi}\left[\frac{2\pi}{n^2}(1-\cos{n\pi)+\frac{2\pi}{n^2}\cos{n\pi}}\right]\\ & =\frac{4}{n^2},\ \ (n\in\mathbb{N}) \end{align*}

    \[b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)\sin{nx\ dx=0,}}\]

Since f\left(x\right)\sin{nx} is odd function, for n\in\mathbb{N}

Hence the Fourier series for f in \left[-\pi,\ \pi\right] is

    \[\frac{1}{3}\pi^2+4\sum_{n=1}^{\infty}\frac{\cos{nx}}{n^2}\ \textbf{\text{(Proving the 1st part)}}\]

Since f is continuous on \left[-\pi,\ \pi\right], we can write

    \begin{align*} f\left(x\right) & =\frac{1}{3}\pi^2+4\sum_{n=1}^{\infty}{\frac{\cos{nx}}{n^2},\ \ \ x\in\left[-\pi,\ \pi\right]}\\ \Rightarrow f\left(0\right) & =\frac{1}{3}\pi^2+4\sum_{n=1}^{\infty}\frac{1}{n^2}\ \bm{\left(}\textbf{\text{Putting }} \bm{x=0\right)}\\ \Rightarrow\pi^2 & =\frac{1}{3}\pi^2+4\sum_{n=1}^{\infty}\frac{1}{n^2} \end{align*}

Hence therefore,

    \[\Rightarrow\sum_{n=1}^{\infty}{\frac{1}{n^2}=\frac{\pi^2}{6}}.\]

Since

    \[\left|\frac{\cos{nx}}{n^2}\right|\le\frac{1}{n^2},\ x\in\left[-\pi,\ \pi\right]\]

and

    \[\bm{\sum_{n=1}^{\infty}\frac{1}{n^2} \textbf{\text{ is a convergent series, ($P$ series where $p>1$)}}}\]

hence by Weierstrass M-test,

The 5series

    \[\sum_{n=1}^{\infty}{\frac{\cos{nx}}{n^2}\text{ is uniformly convergent.}}\]

[Remark: We can use comparison test for the test of convergence]

This implies the infinite series

    \[\frac{1}{3}\pi^2+4\sum_{n=1}^{\infty}\frac{\cos{nx}}{n^2}\]

converges uniformly to f(x) in \left[-\pi,\ \pi\right]. Then by Parseval’s Identity (Theorem 3.5)

    \[\frac{1}{2}a_0^2+\sum_{n=1}^{\infty}{(a_n^2{+b}_n^2)}=\frac{1}{\pi}\int_{-\pi}^{\pi}\left[f(x)\right]^{2} dx\]

    \begin{align*} \Rightarrow & \frac{2\pi^4}{9}+16\sum_{n=1}^{\infty}{\frac{1}{n^4}=\frac{2}{\pi}\int_{0}^{\pi}{{(\pi-x)}^4dx}}\\ \Rightarrow & \frac{2\pi^4}{9}+16\sum_{n=1}^{\infty}{\frac{1}{n^4}=\frac{2}{\pi}\cdot\frac{\pi^5}{5}}\\ \Rightarrow & \sum_{n=1}^{\infty}{\frac{1}{n^4}=\frac{\pi^4}{90}}\textbf{( Hence Proved)} \end{align*}

Example 4.6. Find the Fourier series of the periodic function f(x) with period 2\pi defined by

    \[f\left(x\right)=\left\{\begin{matrix}0,\ -\pi<x<a\\1,\ a\le x\le b\ \ \ \\0,\ b<x<\pi\ \ \ \\\end{matrix}\right.\]

The we will find the sum of the series at x=4\pi+a and then we are going to show that

    \[\sum_{n=1}^{\infty}{\frac{\sin{n(b-a)}}{n}=\frac{\pi-b+a}{2}.}\]

Solution: We define f at x=-\pi and at x=\pi as f\left(-\pi\right)=0,\ f\left(\pi\right)=0, to make f continuous at x=\pm\pi

    \[\text{Then } f\left(x\right)=\left\{\begin{matrix}0,\ -\pi\le x<a\\1,\ a\le x<b\ \ \ \\0,\ b\le x\le\pi\ \ \ \\\end{matrix}\right.\]

f is piecewise monotone on \left[-\pi,\ \pi\right]. It is continuous on \left[-\pi,\ \pi\right] except at a and b and is bounded on \left[-\pi,\ \pi\right]. Hence f is a bounded periodic and integrable function on \left[-\pi,\ \pi\right] which validates the expansion of f into Fourier series, which is

    \[\frac{1}{2}a_0+\sum_{n=1}^{\infty}{(a_n\cos{nx+b_n\sin{nx)}}}\]

Where

    \[a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}{f\left(x\right)dx=\frac{1}{\pi}\ \int_{a}^{b}{dx=\frac{1}{\pi}(b-a)}}\]