Results 1 to 9 of 9

Math Help - Fourier series expansion of f(x)=x

  1. #1
    Newbie
    Joined
    Feb 2008
    Posts
    20

    Fourier series expansion of f(x)=x

    Hi, I'm doing a course on PDEs and we have started looking at Fourier series. I am revising and 2 questions have come up that I am stuck on. One wants the Fourier series expansion of the extension of f(x)=x , -pi<x<pi, and the other the same but with f(x)=|x|.
    I can start both but then I get stuck. I know that I need to use complex Fourier series and that you start by finding the Fourier coefficient f^(n) (thats f with a hat, not f to the power n) using integration by parts. This is fine. Its when you have to put everything together at the end and for some reason use f^(0) that I start getting confused. If anyone could help me solve these particualr questions or just give me a general step-by-step guide that would be great. This is what I have so far....(im not very good with the inserting of the symbols so bear with me!)

    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?
    Thanks,
    Sooz
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    10
    Quote Originally Posted by Sooz View Post
    Hi, I'm doing a course on PDEs and we have started looking at Fourier series. I am revising and 2 questions have come up that I am stuck on. One wants the Fourier series expansion of the extension of f(x)=x , -pi<x<pi
    The Fourier Series is given by, \frac{a_0}{2}+\sum_{n=1}^{\infty}a_n \sin \pi n x+ b_n \cos \pi nx.

    Where a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi} x dx = 0 and b_n = \frac{1}{\pi}\int_{-\pi}^{\pi} x\cos (\pi nx) dx = 0 because it is odd function.

    And a_n = \frac{1}{\pi}\int_{-\pi}^{\pi} x \sin \pi n x dx.
    It remains for you to compute that a_n's.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Feb 2008
    Posts
    20
    Thanks,
    I'm just a bit confused as my lecturer said we have to use the complex form of Fourier series. So if I take what you put, is it easy to convert it into the form that I need to use?
    Thanks again
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    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
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Feb 2008
    Posts
    20

    Thanks!

    Thanks so much for your help! I really appreciate it!
    Its all making sense now!!!
    Sooz
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Sep 2009
    From
    Michigan
    Posts
    20
    Quote Originally Posted by Opalg View Post
    You're right so far. The formula \hat{f}(n) = 2\pi(-1)^ni)/n is correct...
    At the risk of sounding slow, which has never stopped me before, could someone please show step by step how using partial fractions ended up with this equation? I have tried repeatedly to reproduce, but I feel like I'm missing one key, simple, step that would make it all seem clear.

    Thanks in advance!
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Banned
    Joined
    Oct 2009
    Posts
    4,261
    Thanks
    2
    Quote Originally Posted by dsprice View Post
    At the risk of sounding slow, which has never stopped me before, could someone please show step by step how using partial fractions ended up with this equation? I have tried repeatedly to reproduce, but I feel like I'm missing one key, simple, step that would make it all seem clear.

    Thanks in advance!

    \int\limits_{-\pi}^{\pi}xe^{-inx}\,dx=\left[\frac{ixe^{-inx}}{n}\right]_{-\pi}^{\pi}+\frac{i}{n}\int\limits_{-\pi}^{\pi}e^{-inx}\,dx (remember that \frac{1}{i}=-i) =

    \frac{\pi i}{n}(2\cos n\pi)-\frac{1}{n^2}(e^{-n\pi i}-e^{n\pi i})=\frac{\pi i}{n}(-1)^n\cdot 2+\frac{1}{n^2}\,2\sin n\pi=\frac{2\pi(-1)^ni}{n}

    Tonio
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Sep 2009
    From
    Michigan
    Posts
    20
    Quote Originally Posted by tonio View Post
    (remember that \frac{1}{i}=-i)
    This is precisely the part that I was missing! Thanks!
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member billym's Avatar
    Joined
    Feb 2008
    Posts
    183
    Quote Originally Posted by ThePerfectHacker View Post
    The Fourier Series is given by, \frac{a_0}{2}+\sum_{n=1}^{\infty}a_n \sin \pi n x+ b_n \cos \pi nx.

    Where a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi} x dx = 0 and b_n = \frac{1}{\pi}\int_{-\pi}^{\pi} x\cos (\pi nx) dx = 0 because it is odd function.

    And a_n = \frac{1}{\pi}\int_{-\pi}^{\pi} x \sin \pi n x dx.
    It remains for you to compute that a_n's.
    For this I just did:

    a_0=a_n=0

    b_n=\frac{2}{\pi}\int_{0}^{\pi} xsin(nx)dx

    S(x)=\sum_{n=1}^{\infty}b_n sin(nx)

    No good?
    Last edited by billym; November 7th 2009 at 08:06 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] Fourier series expansion, need help
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: May 28th 2011, 05:23 PM
  2. Replies: 1
    Last Post: January 14th 2011, 02:32 AM
  3. Exponential Fourier-series expansion
    Posted in the Calculus Forum
    Replies: 1
    Last Post: May 23rd 2009, 07:48 PM
  4. Fourier Cosine Series Half Rage Expansion
    Posted in the Calculus Forum
    Replies: 0
    Last Post: December 7th 2008, 08:33 AM
  5. Fourier series expansion of x^2+x
    Posted in the Calculus Forum
    Replies: 5
    Last Post: July 16th 2008, 09:56 PM

Search Tags


/mathhelpforum @mathhelpforum