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!

Help with Triangle Wave using complex exponential Fourier Series

  1. Jun 3, 2014 #1
    I'm participating in research this summer and it's has to do with the Fourier Series. My professor wanted to give me practice problems before I actually started on the research. He gave me a square wave and I solved that one without many problems, but this triangle wave is another story. I've been stuck on it for a day or two and wanted to see if I'm even on the right track because I'm very,very lost. Here is the problem: The triangle wave has a period of 4 and starts at (0,0) to (1,1). Then from (1,1) to (3,-1). And then (3,-1) to (4,0). I solved a0 and got 0. Solving for ak is where I'm having a problem. I tried to type the problem out on here but I couldn't get the code to work properly, so instead I took a picture.

    My question is, did I solve the first one correctly? I didn't solve the (-t+2) or (t-4) integrals yet, just the very first one listed.
     

    Attached Files:

  2. jcsd
  3. Jun 3, 2014 #2

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    [edited with a correction: the given function is odd, not even]

    Here is a suggestion which will make the calculation much easier. Your triangle wave is an odd function: it satisfies ##s(t) = -s(-t)## for all ##t##. Also, you can integrate over any period of the function, so instead of integrating from 0 to 4, you can integrate from -2 to 2, which will allow you to exploit the oddness of the function. The formula for ##a_k## simplifies as follows:
    $$\begin{align}
    a_k &= \int_{-2}^{2}s(t)e^{-ik\omega t} dt \\
    &= \int_{-2}^{2} s(t)(\cos(k\omega t) - i \sin(k \omega t)) dt \\
    &= -i \int_{-2}^{2} s(t) \sin(k \omega t) dt \\
    &= -2i \int_{0}^{2} s(t) \sin(k \omega t) dt
    \end{align}$$
     
    Last edited: Jun 3, 2014
  4. Jun 3, 2014 #3
    jbunniii you said that it's an even function so is that why the isin(kwt) is no longer there when you simplied it?
     
  5. Jun 3, 2014 #4

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes, that's right. The cosine is an even function, and sine is an odd function. Also, an even function times an even function is even, an odd function times an odd function is even, and an even function times an odd function is odd.

    Therefore if ##s(t)## is even, then ##s(t)\cos(k\omega t)## is even, and ##s(t)\sin(k\omega t)## is odd.

    If ##s(t)## is odd, then ##s(t)\cos(k\omega t)## is odd, and ##s(t)\sin(k\omega t)## is even.

    If you integrate an odd function over an interval of the form ##[-x,x]##, the result is zero.

    If you integrate an even function over an interval of the form ##[-x,x]##, the result is two times the integral over ##[0,x]##.

    You should verify all of these facts if you're not sure - they follow directly from the definition of even and odd and basic calculus manipulations. They will frequently be useful when working with Fourier series.
     
    Last edited: Jun 3, 2014
  6. Jun 3, 2014 #5

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Oh wait, I misinterpreted your function. If you plot it, you will see that it is actually an ODD function, not even. I'll edit my first post accordingly.
     
  7. Jun 3, 2014 #6

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    OK, I fixed the first post. Sorry for the confusion. :redface:
     
  8. Jun 6, 2014 #7
    Thanks so much for the help jbunniii! :D
    I eventually got it and showed it to my mentor today, he's now assigned me a new triangle wave to solve and plot in MATLAB.
     
  9. Jun 6, 2014 #8

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Nice job!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Help with Triangle Wave using complex exponential Fourier Series
Loading...