Fourier Series

• Jun 5th 2010, 02:55 AM
Raidan
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..(Rock)
• Jun 5th 2010, 03:18 AM
Ackbeet
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.
• Jun 5th 2010, 03:21 AM
Ackbeet
Weird
What's also weird about your book saying there's a $\displaystyle \sin(n\pi)/2$ factor in the $\displaystyle a_{n}$'s is that $\displaystyle \sin(n\pi)=0$ for all integers $\displaystyle n$.
• Jun 5th 2010, 03:33 AM
Raidan
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(Nod)
• Jun 5th 2010, 03:36 AM
Ackbeet
Parentheses
Oh, did you mean $\displaystyle \sin(n\pi/2)$? There's a world of difference between $\displaystyle \sin(n\pi)/2$ and $\displaystyle \sin(n\pi/2)$.
• Jun 5th 2010, 03:45 AM
Raidan
Hi,
haha actually its ((n*pi)/2) sorry for the that
• Jun 5th 2010, 10:28 AM
Ackbeet
Assuming...
... the following expansion of $\displaystyle 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 $\displaystyle a_{n}=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(n x)\,dx$, for $\displaystyle n\ge 0$, and $\displaystyle b_{n}=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin(n x)\,dx$, for $\displaystyle n\ge 1$.

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

$\displaystyle 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
$\displaystyle 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 $\displaystyle \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 $\displaystyle -1$.

Hope this helps.
• Jun 5th 2010, 11:06 AM
Raidan
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!!(Rofl)