# Fourier Series of odd function

• Aug 14th 2009, 12:57 PM
Pythagoras_barrel
Fourier Series of odd function
I am having trouble with this fourier series:

$f(x)=\left\{\begin{array}{cc}\cos(x),&\mbox{ if }
0\leq x< \pi\\-\cos(x), & \mbox{ if }-\pi\leq x< 0 \end{array}\right.$

I understand that it is an odd function and as such there are no $\cos$ terms, only $\sin$ but i am told that the function should equal

$\frac{8}{\pi} \sum_{m\ =\ 1}^\infty \frac{m}{4m^2-1}\sin(2mx)$

and i am finding it impossible to do so.

Could someone please show me how this is done?
• Aug 14th 2009, 01:19 PM
running-gag
Hi

$\int_{-\pi}^{\pi} f(x) \sin(nx) dx = \int_{-\pi}^{0} -\cos x \sin(nx) dx + \int_{0}^{\pi} \cos x \sin(nx) dx$

Now using $\sin a \cos b = \frac12\:\left(\sin(a+b) + \sin(a-b)\right)$

$\int_{-\pi}^{\pi} f(x) \sin(nx) dx = \int_{-\pi}^{0} -\frac12\:\left(\sin(n+1)x + \sin(n-1)x\right) dx +$ $\int_{0}^{\pi} \frac12\:\left(\sin(n+1)x + \sin(n-1)x \right) dx$

Can you get it from here ?
• Aug 15th 2009, 09:29 AM
Pythagoras_barrel
Each time i try to find the series it seems to cancel out.

For example i managed to reach

$\frac{\cos(n-1)\pi}{n-1} - \frac{\cos(n+1)\pi}{n+1}$

but either this is wrong or i simply can't progress anywhere from it without it seeming to cancel to 0.
• Aug 15th 2009, 11:38 AM
running-gag
Remember that $\cos(n+1)\pi = (-1)^{n+1}$

Therefore you need to separate the cases : n odd or n even

If n is odd (n = 2m+1) then $\frac{1}{n+1} - \frac{(-1)^{n+1}}{n+1} = 0$
The same for the other terms and finally the sum is equal to 0

If n is even (n = 2m) then $\frac{1}{n+1} - \frac{(-1)^{n+1}}{n+1} = \frac{2}{n+1}$
The other terms also do not cancel but double and at the end you can find $\frac{4}{2m+1}+\frac{4}{2m-1} = \frac{16m}{4m^2-1}$
• Aug 15th 2009, 12:39 PM
Pythagoras_barrel
Thanks, i guess i need to remember those identities a lot better (Doh).