Fourier series how to show $a_n$

21 Views Asked by At

This is another part to the question which I have posted before on math SE.

enter image description here

$a= \pi$ , $b= -2$ , $c =0$ , $d = \frac{\pi}{2} $

$L = \frac{\pi}{2}$

Using integration, show that $a_n = 0$ where n is even and $a_n = \frac{2}{n^2 \pi} $ when n is odd.

$a_n = \frac{1}{L} \int_{-L}^{L} f(t) \cos \frac{n\pi t}{L} dt $

$ a_n = \frac{2}{\pi} ( \int_{0}^{\frac{\pi}{2}} (\pi -2t) \cos (2nt) dt $

$a_n = \frac{2}{\pi} (-\frac{2}{4n^2} (-1)^n + \frac{2}{4n^2}) = \frac{2}{\pi} (-\frac{1}{2} (-1)^n + \frac{1}{2n^2}) $

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

How do I use this to prove that when n is even , $a_n = 0$ and subsequently for when n is odd ?