# Fourier sine and cosine series

One sees from the formulae

 $\displaystyle a_{n}$ $\displaystyle=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos{nx}\,dx,$ $\displaystyle b_{n}$ $\displaystyle=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin{nx}\,dx$

of the coefficients $a_{n}$ and $b_{n}$ for the Fourier series

 $f(x)=\frac{a_{0}}{2}+\sum_{n=1}^{\infty}(a_{n}\cos{nx}+b_{n}\sin{nx})$

of the Riemann integrable real function $f$ on the interval$[-\pi,\,\pi]$,  that

• $\displaystyle a_{n}=\frac{2}{\pi}\int_{0}^{\pi}\!f(x)\cos{nx}\,dx$,   $b_{n}=0$$\forall n$  if $f$ is an even function;

• $\displaystyle b_{n}=\frac{2}{\pi}\int_{0}^{\pi}\!f(x)\sin{nx}\,dx$,   $a_{n}=0$$\forall n$  if $f$ is an odd function.

Thus the Fourier series of an even function mere cosine and of an odd function mere sine .  This concerns the whole interval  $[-\pi,\,\pi]$.  So e.g. one has on this interval

 $x\,\equiv\,2\!\left(\frac{\sin{x}}{1}\!-\!\frac{\sin{2x}}{2}\!+\!\frac{\sin{3x% }}{3}\!-+\cdots\right).$

Remark 1.  On the half-interval$[0,\,\pi]$  one can in any case expand each Riemann integrable function $f$ both to a cosine series and to a sine series, irrespective of how it is defined for the negative half-interval or is it defined here at all.

Remark 2.  On an interval  $[-p,\,p]$,  instead of  $[-\pi,\,\pi]$,  the Fourier coefficients of the series

 $f(x)=\frac{a_{0}}{2}+\sum_{n=1}^{\infty}\left(a_{n}\cos\frac{n\pi x}{p}+b_{n}% \sin\frac{n\pi x}{p}\right)$

have the expressions

• $\displaystyle a_{n}=\frac{2}{p}\int_{0}^{p}\!f(x)\cos\frac{n\pi x}{p}\,dx$,   $b_{n}=0$$\forall n$  if $f$ is an even function;

• $\displaystyle b_{n}=\frac{2}{p}\int_{0}^{p}\!f(x)\sin\frac{n\pi x}{p}\,dx$,   $a_{n}=0$$\forall n$  if $f$ is an odd function.

Example.  Expand the identity function (http://planetmath.org/IdentityMap)  $x\mapsto x$  to a Fourier cosine series on  $[0,\,\pi]$.

This odd function may be replaced with the even function  $f:x\mapsto|x|$.  Then we get

 $a_{0}=\frac{2}{\pi}\int_{0}^{\pi}x\,dx=\pi$

and, integrating by parts,

 $a_{n}=\frac{2}{\pi}\int_{0}^{\pi}\!x\cos{nx}\,dx=\frac{2}{\pi}\left[% \operatornamewithlimits{\Big{/}}_{\!\!\!0}^{\,\quad\pi}\!x\frac{\sin{nx}}{n}-% \int_{0}^{\pi}\frac{\sin{nx}}{n}\,dx\right]=\frac{2}{\pi}% \operatornamewithlimits{\Big{/}}_{\!\!\!0}^{\,\quad\pi}\!\frac{\cos{nx}}{n^{2}% }=\frac{2}{\pi n^{2}}((-1)^{n}\!-\!1));$

this equals to $\displaystyle-\frac{4}{\pi n^{2}}$ if $n$ is an odd integer, but vanishes for each even $n$.  Thus we obtain on the interval  $[0,\,\pi]$  the cosine series

 $x\,\equiv\,\frac{\pi}{2}\!-\!\frac{4}{\pi}\!\left(\frac{\cos{x}}{1^{2}}\!+\!% \frac{\cos{3x}}{3^{2}}\!+\!\frac{\cos{5x}}{5^{2}}\!+\cdots\right).$

Chosing here  $x:=0$  one gets the result

 $\frac{\pi^{2}}{8}\;=\;1+\frac{1}{3^{2}}+\frac{1}{5^{2}}+\ldots$

(cf. the entry on http://planetmath.org/node/11010Dirichlet eta function at 2).

Fourier double series.  The Fourier sine and cosine series introduced in Remark 1 on the half-interval  $[0,\,\pi]$  for a function of one real variable may be generalized for e.g. functions of two real variables on a rectangle  $\{(x,\,y)\in\mathbb{R}^{2}\,\vdots\,\,0\leq x\leq a,\,0\leq y\leq b\}$:

 $\displaystyle f(x,\,y)=\sum_{m=1}^{\infty}\sum_{n=1}^{\infty}c_{mn}\sin\frac{m% \pi x}{a}\sin\frac{n\pi y}{b},$ (1)
 $\displaystyle f(x,\,y)=\frac{d_{00}}{4}+\frac{1}{2}\sum_{l=1}^{\infty}\left(d_% {l0}\cos\frac{l\pi x}{a}+d_{0l}\cos\frac{l\pi y}{b}\right)+\sum_{m=1}^{\infty}% \sum_{n=1}^{\infty}d_{mn}\cos\frac{m\pi x}{a}\cos\frac{n\pi y}{b}$ (2)

The coefficients of the Fourier double sine series (1) are got by the double integral

 $c_{mn}=\frac{4}{ab}\int_{0}^{a}\int_{0}^{b}f(x,\,y)\,\sin\frac{m\pi x}{a}\sin% \frac{n\pi y}{b}\,dx\,dy$

where  $m=1,\,2,\,3,\,\ldots$  and  $n=1,\,2,\,3,\,\ldots$  The coefficients of the Fourier double cosine series (2) are correspondingly

 $d_{mn}=\frac{4}{ab}\int_{0}^{a}\int_{0}^{b}f(x,\,y)\,\cos\frac{m\pi x}{a}\cos% \frac{n\pi y}{b}\,dx\,dy$

where  $m=0,\,1,\,2,\,\ldots$  and  $n=0,\,1,\,2,\,\ldots$

Note.  One can use in the double series of (1) and (2) also the diagonal summing, e.g. for the double sine series as follows:
$c_{11}\sin\!\frac{\pi x}{a}\sin\!\frac{\pi y}{b}\!+\!\left(c_{12}\sin\!\frac{% \pi x}{a}\sin\!\frac{2\pi y}{b}\!+\!c_{21}\sin\!\frac{2\pi x}{a}\sin\!\frac{% \pi y}{b}\right)\!+\!\left(c_{13}\sin\!\frac{\pi x}{a}\sin\!\frac{3\pi y}{b}\!% +\!c_{22}\sin\!\frac{2\pi x}{a}\sin\!\frac{2\pi y}{b}\!+\!c_{31}\sin\!\frac{3% \pi x}{a}\sin\!\frac{\pi y}{b}\right)\!+\ldots$

## References

• 1 K. Väisälä: Matematiikka IV.  Hand-out Nr. 141. Teknillisen korkeakoulun ylioppilaskunta, Otaniemi, Finland (1967).
 Title Fourier sine and cosine series Canonical name FourierSineAndCosineSeries Date of creation 2013-03-22 15:42:20 Last modified on 2013-03-22 15:42:20 Owner pahio (2872) Last modified by pahio (2872) Numerical id 26 Author pahio (2872) Entry type Topic Classification msc 42A32 Classification msc 42A20 Classification msc 42A16 Classification msc 26A06 Related topic SubstitutionNotation Related topic IntegralsOfEvenAndOddFunctions Related topic CosineAtMultiplesOfStraightAngle Related topic ExampleOfFourierSeries Related topic DoubleSeries Related topic UniquenessOfFourierExpansion Related topic DeterminationOfFourierCoefficients Related topic TwoDimensionalFourierTransforms Defines Fourier sine series Defines Fourier cosine series Defines sine series Defines cosine series Defines half-interval Defines Fourier double sine series Defines Fourier double cosine series