Top

# Fourier Series Formula

A Fourier series is a way of expanding the periodic function f(x) in terms of the sum of infinite series with sines and cosines. The fourier series formula for the periodic function f(x) over the interval [- $\pi$, + $\pi$] is given by
Where ao = $\frac{1}{\pi}$ $\int_{- \pi}^{\pi}$ f(x) dx
an = $\frac{1}{\pi}$ $\int_{- \pi}^{\pi}$ f(x) cos nx dx
bn = $\frac{1}{\pi}$ $\int_{- \pi}^{\pi}$ f(x) sin nx dx
Here n = 1,2,3.....

 Related Calculators Series Calculator Arithmetic Series Calculator Calculate Taylor Series Geometric Series Calculator

## Fourier Series Examples

Lets see some examples on fourier series:

### Solved Examples

Question 1: Expand the function f(x) = ekx in the interval [ - $\pi$ , $\pi$ ] using fourier series ?
Solution:

Let the Fourier series for f(x) be

f(x) = $\frac{1}{2}$ ao + $\sum_{n=1}^{\infty}$ (ancos(nx) + bnsin(nx))

Here  a0 = $\frac{1}{\pi}$ $\int_{-\pi}^{\pi}$ f(x) dx

= $\frac{1}{\pi}$ $\int_{-\pi}^{\pi}$ ekxdx

= $\frac{1}{k \pi}$ [ekx $]_{-\pi}^{\pi}$

= $\frac{1}{k \pi}$ (ekx - e-kx

= $\frac{2}{k \pi}$ sinh( k $\pi$ )

an = $\frac{1}{\pi}$ $\int_{- \pi}^{\pi}$ ekx cos (nx) dx

= $\frac{e^{(kx)}}{\pi(k^2+n^2))}$ $[(k cos(nx) + n sin(nx))]_{-\pi}^{\pi}$

= $\frac{1}{\pi(k^2 + n^2)}$ $[e^{k \pi} (k cos(n \pi) + n sin(n \pi)) - e^{-k \pi} [k cos(n \pi) - n sin (n \pi) ]$

= $\frac{k cos(n \pi)}{\pi (k^2 + n^2)}$ $[e^{k \pi} - e^{-k \pi}]$

= 2k (-1)n $\frac{sinh(k \pi)}{\pi (k^2 + n^2)}$

and
bn = $\frac{1}{\pi}$ $\int_{-\pi}^{\pi}$ ekx sin(nx) dx

= $\frac{e^{(kx)}}{\pi(k^2 + n^2)}$ $[k sin(nx) - n cos(nx) ]_{-\pi}^{\pi}$

= $\frac{1}{\pi(a^2 + n^2)}$ $[e^{k \pi}(k sin(n \pi) - n cos(n \pi)) - e^{-k \pi} (-k sin (n \pi) - n cos(n \pi)) ]$

= $\frac{-n cos(n \pi)}{\pi(k^2 + n^2)}$ $[e^{k \pi} - e^{-k \pi}]$

= $\frac{-2n(-1)^n sinh(k \pi)}{\pi(k^2 + n^2)}$

Substituting these values of ao ,an ,bn we get
f(x) = ekx = $\frac{1}{k \pi}$ sinh(k $\pi$) + $\sum_{n=1}^{\infty}$ $\frac{2 (-1)^{n} sinh(k \pi)}{\pi(k^2 + n^2)}$ (a cos(nx) - n sin(nx)) $\frac{2 sinh(k \pi)}{\pi}$ $\frac{1}{2k}$ + $\sum_{1}^{\infty}$ $\frac{(-1)^n}{k^2 + n^2}$ (k cos(nx) - n sin(nx))]
or

ekx = $\frac{2sinh(k \pi)}{\pi}$ $\frac{1}{2k}$ - k [$\frac{cos x}{k^2 + 1^2}$ - $\frac{cos 2x}{k^2 + 2^2}$ + $\frac{cos 3x}{k^2 + 3^2}$ - ....] + [$\frac{sin x}{k^2 + 1^2}$ - $\frac{2 sin 2x}{k^2 + 2^2}$ + $\frac{3 sin 3x}{k^2 + 3^2}$ -.....) ]

which is the required fourier series.

Question 2: Find the fourier series expansion of the periodic function f(x) = 1 in the interval [- $\pi$, $\pi$] ?
Solution:

The fourier coefficients are obtained as follows :

ao = $\frac{1}{\pi}$ $\int_{- \pi}^{\pi}$ 1 dx =0                      ( 1 is an odd function on [- $\pi$ , $\pi$] )

an = $\frac{1}{\pi}$ $\int_{- \pi}^{\pi}$ (cos(nx)) dx =0                      (cos(nx) is an odd function on [- $\pi$, $\pi$] )

bn = $\frac{1}{\pi}$ $\int_{- \pi}^{\pi}$ (sin(nx)) dx

= $\frac{2}{\pi}$ $\int_{0}^{\pi}$(sin(nx)) dx ,                    ( sin(nx) is an even function on [- $\pi$ , $\pi$ ] )

= $\frac{2}{\pi}$ $[ - (\frac{cos(nx)}{n}$) $] _0^{\pi}$

= $\frac{2}{\pi}$ $[-\frac{cos(n \pi)}{n} ]$

= $\frac{2}{n \pi}$ (-1)n

Therefore, the expansion of the given function on [ - $\pi$, $\pi$ ] is given by

x = $\frac{2}{n \pi}$ [ sin x - $\frac{sin 2x}{2}$ + $\frac{sin 3x}{3}$ - $\frac{sin 4x}{4}$ +......... ].

*AP and SAT are registered trademarks of the College Board.