View Single Post
  #4  
Old May 15th, 2008, 01:35 PM
Opalg's Avatar
Opalg Opalg is offline
MHF Contributor

 
Join Date: Aug 2007
Location: Leeds, UK
Posts: 2,455
Country:
Thanks: 150
Thanked 1,495 Times in 1,250 Posts
Opalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant future
Default

Quote:
Originally Posted by Sooz View Post
For f(x)=x, -pi<x<pi
f(x) = 1/(2*pi)*sum(from n= - infinity to infinity) f^(n)*e^(i*n*x) and
f^(n) = integral (between -pi and pi) f(x)*e^(-i*n*x)
I can substitute an x in wherever there is an f(x) and then integrate f^(n) by parts to eventually get f^(n) = (2*pi*((-1)^n)*i)/n
From here I am stuck!
Firstly am I right so far? If so, what do I do next?
You're right so far. The formula \hat{f}(n) = 2\pi(-1)^ni)/n is correct, except that it doesn't work when n=0, because you can't divide by 0. That's why you usually have to calculate \hat{f}(0) separately. For the function f(x)=x, you get \hat{f}(0)=0.

All that remains to do is to write down the (complex) Fourier series as x\sim\frac1{2\pi}\sum_{n=-\infty}^\infty\hat{f}(n)e^{inx}. To get round the problem of incorporating the n=0 term into the sum, it's probably easiest to split the sum into two parts, one going from –∞ to –1, and the other one from 1 to ∞. Then

x\sim\sum_{n=1}^\infty\Bigl(\frac{(-1)^ni}{-n}e^{-inx} + \frac{(-1)^ni}{n}e^{inx}\Bigr) = \sum_{n=1}^\infty\frac{(-1)^ni(e^{inx}-e^{-inx})}n.

(This can be written as \sum_{n=1}^\infty\frac{2(-1)^{n-1}\sin nx}n, which is the same as you would get by calculating the real Fourier series. The complex series is not different from the real series, but it's often easier to calculate because integrals with exponentials tend to be more convenient than trigonometrical ones. Also, you only have one integral to deal with, instead of two separate ones for the sines and the cosines.)

For the other function, f(x) = |x|, the method is the same, but you need to split the integral into two intervals, from –π to 0, and from 0 to π. On the first interval, |x|=–x and on the second interval |x|=x. So the formula for the Fourier coefficients becomes \hat{f}(n) = \int_{-\pi}^0\!(-x)e^{-inx}dx + \int^{\pi}_0\!\!xe^{-inx}dx (and again, you'll have to deal with the case n=0 separately).

Last edited by Opalg; May 16th, 2008 at 11:10 AM. Reason: Corrected another mistake
Reply With Quote