# Fourier Series

• Sep 15th 2009, 05:35 AM
Maccaman
Fourier Series
Find the fourier series for

$\displaystyle f(x) = \left\{\begin{array}{c l} 0 & -\pi < x < 0 \\ 1 & 0 < x < \pi \\ f(x + 2\pi) & -\infty < x < \infty \end{array}\right.$

By considering the Fourier series at $\displaystyle x = \frac{\pi}{2}$ show that $\displaystyle \frac{\pi}{4} = \sum_{m=1}^{\infty} \frac{(-1)^{m+1}}{(2m-1)}$

I am not enjoying these at the moment. I get lost. Really lost. (Angry)
• Sep 15th 2009, 10:38 AM
shawsend

$\displaystyle A_n=\frac{1}{\pi}\int_{-\pi}^{\pi} f(x) \cos(nx)dx,\quad n=0,1,2,\cdots$

$\displaystyle B_n=\frac{1}{\pi}\int_{-\pi}^{\pi} f(x) \sin(nx)dx,\quad n=1,2,\cdots$

You can calculate those right?

$\displaystyle A_n=\frac{1}{\pi} \int_0^{\pi} \cos(nx)dx=\frac{1-\cos(n\pi)}{n},\quad n=1,2,\cdots$

$\displaystyle B_n=\frac{1}{\pi} \int_0^{\pi} \sin(nx)dx=0$

That's a good start. Then the Fourier series is:

$\displaystyle f(x)=\frac{1}{2}+\frac{1}{\pi} \sum_{n=1}^{\infty} \frac{1-\cos(n\pi)}{n} \sin(n x)$

Now, evaluate that at $\displaystyle x=\pi/2$ and convert the sines and cosines to minus one raised to powers and adjust the summation expression accordingly.
• Sep 20th 2009, 03:47 AM
Maccaman
I get $\displaystyle a_n = 0$

$\displaystyle b_n = 0$ if n is even, $\displaystyle b_n = \frac{2}{n\pi}$ if n is odd

and

$\displaystyle a_0 = \frac{1}{2}$

So fourier series is

$\displaystyle f(x) = \frac{1}{2} + \sum_{n = 1}^{\infty} \frac{2}{n\pi} \sin (nx)$.

Is this correct?

Im confused with how to "convert the sines and cosines to minus one raised to powers and adjust the summation expression accordingly." Can someone please explain?
• Sep 20th 2009, 12:39 PM
Opalg
Quote:

Originally Posted by shawsend
... the Fourier series is:

$\displaystyle f(x)=\frac{1}{2}+\frac{1}{\pi} \sum_{n=1}^{\infty} \frac{1-\cos(n\pi)}{n} \sin(n x)$

Now, evaluate that at $\displaystyle x=\pi/2$ and convert the sines and cosines to minus one raised to powers and adjust the summation expression accordingly.

Quote:

Originally Posted by Maccaman
Im confused with how to "convert the sines and cosines to minus one raised to powers and adjust the summation expression accordingly." Can someone please explain?

$\displaystyle \cos(0) = 1,\ \cos(\pi)=-1,\ \cos(2\pi)=1,\ \cos(3\pi) = -1,\ldots$. Does that suggest to you that $\displaystyle \cos(n\pi)$ has something to do with –1 raised to some power?