Help with Triangle Wave using complex exponential Fourier Series

AI Thread Summary
The discussion revolves around solving a triangle wave using complex exponential Fourier Series, with the participant initially struggling to compute the coefficients. They confirmed the triangle wave is an odd function, which simplifies the integration process. By integrating over a symmetric interval, they learned that the sine terms drop out, making calculations easier. After receiving guidance on the properties of even and odd functions, the participant successfully solved the problem and was assigned a new task involving MATLAB. This exchange highlights the importance of understanding function properties in Fourier analysis.
Milani
Messages
3
Reaction score
0
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.
 

Attachments

  • IMG_0225.jpg
    IMG_0225.jpg
    42.2 KB · Views: 1,551
  • IMG_0226.jpg
    IMG_0226.jpg
    32.3 KB · Views: 1,188
Physics news on Phys.org
[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:
jbunniii you said that it's an even function so is that why the isin(kwt) is no longer there when you simplied it?
 
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:
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.
 
OK, I fixed the first post. Sorry for the confusion. :redface:
 
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.
 
Back
Top