Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving a Differential Equation with a Fourier Series

  1. Jun 7, 2005 #1
    I am not sure I am doing this correctly, so here it is.


    Find the Fourier Series

    [tex]f(s)\,=\,\left\{\begin{array}{ccc}x^2&-\pi\,<\,x\,<\,0\\0 &0\,<x\,<\,\pi \\}\end{array}\right[/tex]





    Does that look right? If so, where do I gofrom here?


    Is this the final answer?
  2. jcsd
  3. Jun 7, 2005 #2
    Can anyone type this into mathematica?

    Please double check :biggrin:
  4. Jun 7, 2005 #3
    Here is how I got the a0, an and bn factors




    Right? Then:


    Am I on the right track here? or am i completely missing something?
    Last edited: Jun 7, 2005
  5. Jun 7, 2005 #4
    Or is this how to solve a_n?




    Which one is correct?
  6. Jun 8, 2005 #5


    User Avatar
    Science Advisor
    Homework Helper

    I think I see several sign mistakes, with the last sign being wrong. Why not reduce the last expression n/n^3??
  7. Jun 8, 2005 #6
    You need to revisit your bn with your newly refound knowledge of the behavior of sine and cosine.

    The sign of your an term is indeed incorrect.

    Why do I let myself get dragged into other people's problems? *sighs* Back to finals! Work, damn me!

  8. Jun 8, 2005 #7
    Is this the correct an then?

    Is the term below right for an?


    Thanks again!
  9. Jun 8, 2005 #8
    You got an extra negative. [itex]\cos{n\pi} = (-1)^n[/itex], which we can verify by noting that when n = 0, [itex]n\pi = 0[/itex], so [itex]\cos{n\pi} = 1[/itex]. Additionally, when n = 1, we just have cosine of pi, which is -1. So we must have (-1)n instead of (-1)n-1.

  10. Jun 8, 2005 #9
    So, the an is:


  11. Jun 8, 2005 #10
    Looks good. Now go have another look at those b coefficients.


    Just one final left... Yay me!
  12. Jun 8, 2005 #11
    Now for the bn!




    Does that look right also?

    Good luck on the final! I feel for you man.
  13. Jun 8, 2005 #12
    Looks like you got it.

    And just in case you were interested, here's some plots of the fourier series truncated to 5, 15, 50, and 500 terms. Can't even tell it's not the function itself in the 500 one, can ya'?

    Good job.


    Attached Files:

  14. Jun 8, 2005 #13
    Awesome plots.

    Thanks alot for the help.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook