# Math Help - Fourier Series

1. ## Fourier Series

Hi,
I was recently doing some revision and encountered a slight problem with my an calculation for the fourier series..

heres the problem

f(x)=0 -pi<x<-pi/2

f(x)=4 -pi/2<x<pi/2

f(x)=0 pi/2<x<pi

f(x)=f(x+2*pi)

consider one cycle between x=-pi and x=pi

when i calculated the an, I got 8/(pi*n) but in the textbook it says
8/(pi*n)sin(n*pi)/2 so could someone explain how the sin(n*pi)/2 came about?? Your help would be much appreciated..

2. ## Definition of Fourier Series

Could you please post your book's definition of the Fourier Series? There are different conventions about multiplying constants out in front, as you go from book to book.

3. ## Weird

What's also weird about your book saying there's a $\sin(n\pi)/2$ factor in the $a_{n}$'s is that $\sin(n\pi)=0$ for all integers $n$.

4. Hi,
actually an=(8/pi*n)sin(n*pi)/2 thats what the Advanced Engineering Math A by K.A STROUD says, however the
sin(n*pi)/2 term is not zero for all integers.

for example if n is even an=0

If n=1,5,9,.. an=8/(n*pi)

If n=3,7,11,... an= -8/(n*pi)

sin(n*pi)/2 term came about..any information is welcome..thank you

5. ## Parentheses

Oh, did you mean $\sin(n\pi/2)$? There's a world of difference between $\sin(n\pi)/2$ and $\sin(n\pi/2)$.

6. Hi,
haha actually its ((n*pi)/2) sorry for the that

7. ## Assuming...

... the following expansion of $f(x)=\frac{a_{0}}{2}+\sum_{n=1}^{\infty}(a_{n}\cos (n x)+b_{n}\sin(n x))$, the coefficients are given by $a_{n}=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(n x)\,dx$, for $n\ge 0$, and $b_{n}=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin(n x)\,dx$, for $n\ge 1$.

Now, the function you've given is even. Hence, all the $b_{n}$'s vanish. The integral for the $a_{n}$'s looks like the following:

$a_{n}=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(n x)\,dx
=\frac{1}{\pi}\int_{-\pi/2}^{\pi/2}4\cos(n x)\,dx
=\frac{4}{\pi}\left(\frac{\sin(nx)}{n}\right)\Bigg |_{-\pi/2}^{\pi/2}$
.
This, in turn, implies
$a_{n}=\frac{4}{n\pi}(\sin(n\pi/2)-\sin(-n\pi/2))
=\frac{4}{n\pi}(\sin(n\pi/2)+\sin(n\pi/2))
=\frac{8}{n\pi}\sin(n\pi/2)$
.

Now this explains the existence of the $\sin(n\pi/2)$ term, I hope. This expression can be simplified even further if you evaluate the trig function at the specified points: the even integer multiples vanish, and the odd integer multiples look like powers of $-1$.

Hope this helps.

8. Haha..I see where i went wrong now..its actually a very silly mistake which i guess comes from younger experience...Thank you very much!!