Fourier cosine series for $\cos x$

6.1k Views Asked by At

I was trying to find the Fourier cosine series of the function $\cos x$ in $[0, \pi]$. But I am getting all $a_n$ zero. How to proceed?

1

There are 1 best solutions below

1
On

Don't forget the sine terms:

\begin{align*} f(x+2L) &= f(x) \\ f(x) &=\frac{a_{0}}{2}+ \sum_{n=1}^{\infty} \left( a_{n}\cos \frac{n\pi x}{L}+ b_{n}\sin \frac{n\pi x}{L} \right) \\ a_{n} &= \frac{1}{L}\int_{0}^{2L} f(t)\cos \frac{n\pi t}{L} dt \\ &= \frac{2}{\pi}\int_{0}^{\pi} \cos t \cos (2nt) dt \\ &= 0 \\ b_{n} &= \frac{1}{L}\int_{0}^{2L} f(t)\sin \frac{n\pi t}{L} dt \\ &= \frac{2}{\pi}\int_{0}^{\pi} \cos t \sin (2nt) dt \\ &= \frac{8n}{(4n^{2}-1)\pi} \end{align*}