1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fourier Series Expansions

  1. Apr 16, 2007 #1

    kreil

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    Find the Fourier Series Expansion for:

    (a) f(x) = [pi-2x, 0 < x < pi | pi+2x, -pi < x < 0]

    (b) f(x) = [0, -pi < x < 0 | sin(x), 0 < x < pi]


    2. Relevant equations

    [tex]F(x)=\frac{a_0}{2}+\Sigma_{n=1}^{\infty}[a_ncos(nx)+b_nsin(nx)][/tex]

    [tex]a_0=\frac{1}{\pi} \int_{- \pi}^{\pi}f(x)dx[/tex]

    [tex]a_n= \frac{1}{\pi} \int_{- \pi}^{\pi}f(x)cos(nx)dx[/tex]

    [tex]b_n= \frac{1}{\pi} \int_{- \pi}^{\pi}f(x)sin(nx)dx[/tex]


    3. The attempt at a solution

    For (a) my final answer was:

    [tex]f(x)=\frac{8}{\pi}(cos(x)+\frac{cos(3x)}{9}+...+\frac{cos(nx)}{n^2})[/tex]

    and i think this is correct, but for (b) i got kind of a funny answer imo;

    [tex]f(x)=\frac{1}{\pi}+\frac{2}{\pi}(\frac{cos(3x)}{8}+\frac{cos(5x)}{24}+...+\frac{cos(nx)}{n^2-1})[/tex]

    if someone could work out b and see if they get the same answer i would appreciate it.

    Josh
     
  2. jcsd
  3. Apr 16, 2007 #2
    Those are supposed to be piecewise functions, right?

    Hmm, in my denominator (for the second one) I got something different. Here's what I got
    [tex] f(x) = \sum_{n=0}^\infty \frac{cosnx}{\pi(1+1/n^2)}[/tex]

    Anybody else get something similar?
     
  4. Apr 18, 2007 #3

    kreil

    User Avatar
    Gold Member

    well heres my work for (b) so it can be checked:

    f(x)=[0, -pi < x < 0 | sin(x), 0 < x < pi]

    [tex]a_0= \frac{1}{\pi} \int_{- \pi}^{\pi}f(x)dx= \frac{1}{\pi} \int_{0}^{\pi}sin(x)dx= \frac{1}{\pi}(-cos(x))|_{0}^{\pi}=\frac{2}{\pi} \implies \frac{a_0}{2}=\frac{1}{\pi}[/tex]

    [tex]a_n=\frac{1}{\pi} \int_{- \pi}^{\pi}f(x)cos(nx)dx= \frac{1}{\pi} \int_0^{\pi}sin(x)cos(nx)dx=\frac{1}{\pi} \frac{cos(x)cos(nx)+nsin(x)sin(nx)}{n^2-1}|_0^{\pi}=\frac{1}{\pi}(\frac{1}{n^2-1}-\frac{cos(n \pi)}{n^2-1})=\frac{1}{\pi (n^2-1)}(1-(-1)^n)[/tex]
    [tex]\implies a_n=\frac{1}{\pi (n^2-1)}((-1)^{n+1}+1)[/tex]

    [tex] b_n=0[/tex]

    [tex]f(x)=\frac{1}{\pi}+\frac{2}{\pi}(\frac{cos(3x)}{8} +\frac{cos(5x)}{24}+...+\frac{cos(nx)}{n^2-1})[/tex]
     
    Last edited: Apr 18, 2007
  5. Apr 18, 2007 #4
    How did you go from the integral of sin(x) cos(nx) to what you have? A reduction formula?

    The b_n's are definitely zero. I forgot to put a_0 in my solution too.
     
  6. Apr 23, 2007 #5

    kreil

    User Avatar
    Gold Member

    I used the mathematica integrator at http://integrals.wolfram.com since from my experience it is pretty accurate.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Fourier Series Expansions
Loading...