1. Limited time only! Sign up for a free 30min personal 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!

Homework Help: Fourier Series

  1. Jul 25, 2016 #1
    1. The problem statement, all variables and given/known data

    I got the problem down to:

    [tex] \frac{2}{\pi} \left[ \int_{0}^{\pi/2} \frac{2}{\pi}xsin(nx) dx + \int_{\frac{\pi}{2}}^{\pi} (\frac{-2}{\pi}x+2)sin(nx) dx \right] [/tex]

    [tex] \frac{4}{\pi^2} \left[ \int_{0}^{\pi/2} xsin(nx) dx + \int_{pi/2}^{\pi} -xsin(nx) dx + \int_{pi/2}^{\pi} \pi sin(nx) dx
    \right] [/tex]

    [tex] \frac{4}{\pi^2} \left[ \left[ \frac{-x}{2n} cos(nx) +\frac{1}{n^2}sin(nx) \right]_{0}^{pi/2} + \left[ \frac{1}{n}xcos(nx)-\frac{1}{n^2}sin(nx) \right]_{\pi/2}^{\pi} + \left[\frac{-\pi}{n}cos(nx) \right]_{\pi/2}^{\pi} \right][/tex]

    [tex] \frac{4}{\pi^2} \left[\left[\left[\frac{-\pi}{2n}cos(n\frac{\pi}{2}) +\frac{1}{n^2}sin(n\frac{\pi}{2}) \right] -\left[0\right]\right] + \left[ \left[\frac{\pi}{n}cos(n\pi)) - \frac{1}{n^2}sin(n\pi) \right] - \left[\frac{\pi}{2n}cos(n\frac{\pi}{2}) +\frac{1}{n^2}sin(n\frac{\pi}{2}) \right] \right] +
    \left[\frac{-\pi}{n}cos(n\frac{\pi}{2})+\frac{\pi}{n}cos(n\pi) \right]
    \right] [/tex]

    [tex] \frac{4}{\pi^2} \left[-\frac{\pi}{2n}cos(n\frac{\pi}{2}) +\frac{1}{n^2}sin(n\frac{\pi}{2}) + \frac{\pi}{n}cos(n\pi)) - \frac{1}{n^2}sin(n\pi) - \frac{\pi}{2n}cos(n\frac{\pi}{2}) -\frac{1}{n^2}sin(n\frac{\pi}{2}) -


    [tex] \frac{4}{\pi^2} \left[-\frac{\pi}{4n}cos(n\frac{\pi}{2}) + \frac{\pi}{n}cos(n\pi)) - \frac{1}{n^2}sin(n\pi) -


    I feel like i sccrewed something up to this point ... maybe turning some positive terms negative or vice versa? can someone just double check my work upto this point pleaseee.

    Many thanks.
  2. jcsd
  3. Jul 25, 2016 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Don't you remember the values for ##\sin(n \pi)## and ##\cos(n \pi)## for integer ##n##? What about the values of ##\cos(n \pi/2)## for even ##n## and for odd ##n##?

    Also, when using LaTeX/TeX, use "\sin' and "\cos' instead of 'sin' and 'cos', because that will look much better and be much, much easier to read: you will get ##\sin x, \: \cos x## instead of ##sin x, \; cos x##.
  4. Jul 25, 2016 #3

    Charles Link

    User Avatar
    Homework Helper
    Gold Member

    Just a quick look-over=in your integration by parts, first term, 3rd line, I don't get a "2" in the denominator.
  5. Jul 25, 2016 #4
    you are right. thank you.. i was copying from my notes and might have caried that from the next step. good catch
  6. Jul 25, 2016 #5
    Thanks for the reply.

    So, looking back:

    [tex] \cos(n\pi) = (-1)^n [/tex]

    [tex] \sin(n\pi) = 0 [/tex]

    [tex] \sin(\frac{n2}{\pi}) = (-1)^{((n-1)/2)} for n odd, 0 for even [/tex] the sin cancels out though and doesn't matter?

    [tex] \cos(\frac{2n}{\pi}) = \frac{(1+(-1)^n)}{2*(-1)^{n/2}} [/tex]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted