# FS6

Find the Fourier series for $f(x) = x^2\,$ on $[-\pi,\pi]\,$

The general Fourier series on $[-L,L]\,$ is:

$f(x) = \frac{a_0}{2} + \sum_{k=1}^\infty a_k \, \cos(\frac{k\pi x}{L}) + b_k \, \sin(\frac{k\pi x}{L})\,$

$a_n = \frac{1}{L} \int_{-L}^L f(x) \cos(\frac{n\pi x}{L}) \, dx, \,\,\, n=0,1,2,...\,$

$b_n = \frac{1}{L} \int_{-L}^L f(x) \sin(\frac{n\pi x}{L}) \, dx, \,\,\, n=1,2,3,...\,$

In the present problem, $L = \pi\,$

$a_k = \frac{1}{\pi} \int_{-\pi}^\pi x^2 \cos(kx)\,dx = \frac{4(-1)^k}{k^2}\,\,\,k=1,2,3,...\,$

$a_0 = \frac{1}{\pi} \int_{-\pi}^\pi x^2\,dx = \frac{1}{3\pi}[x^3]_{-\pi}^\pi = \frac{2\pi^2}{3}\,$

$b_k = \frac{1}{\pi} \int_{-\pi}^\pi x^2 \sin(kx)\,dx = 0\,\,\,k=1,2,3,...\,$

So the Fourier series is:

$x^2 = \frac{\pi^2}{3} + \sum_{k=1}^\infty \frac{4(-1)^k}{k^2} \cos(kx)\,$ on $[-\pi,\pi]\,$

##### Toolbox

 Get A Wifi Network Switcher Widget for Android