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

I Fourier Series: I don't understand where I am wrong -- please help

  1. Jun 16, 2016 #1
    Good afternoon people. Recently I started taking a course at my college about Fourier series but I got extremely confused. Here's what's going on. In school we were asigned to use the symmetry formulas to find the Fourier series of the following:

    f\left ( t \right )=\begin{cases}
    1 & \text{ if } \frac{-\pi}{2}<t<\frac{\pi}{2} \\
    -1 & \text{ if } \frac{\pi}{2}<t<\frac{3\pi}{2}

    When I graphed this in Grapher I got this:
    So judging it by its symmetry I see that this is an even function. Therefore:
    [itex]a_{0}=\frac{2}{T}\int_{0}^{\frac{T}{2}}f\left ( t \right )dt[/itex]
    [itex]a_{n}=\frac{4}{T}\int_{0}^{\frac{T}{2}}f\left ( t \right )cos\left ( n\omega_0 t\right )dt[/itex]
    Therefore, since this is an even function it can be represented through a summation of cosines:
    [itex]f\left ( t \right )=\frac{a_0}{2}+\sum_{n=1}^{\infty }a_{n}cos\left ( n\omega_0t \right )[/itex]

    Next, in the integrals for both a0 and an we have the limit from 0 to T/2. According to my professor, this means we take this piecewise function from 0 to half the period. I calculated the period as the subtraction of 3π/2 and -π/2 and I get a period of 2π. Therefore T/2=2π/2=π. So the integrals become:
    [itex]a_{0}=\frac{1}{\pi}\int_{0}^{\pi}f\left ( t \right )dt[/itex]
    [itex]a_{n}=\frac{2}{\pi}\int_{0}^{\pi}f\left ( t \right )cos\left ( n\omega_0 t\right )dt[/itex].

    So now here is where my struggle begins. When I calculate a0 and an I get this problem. Let's suppose I calculate a0 first. So I need to see which pieces of that piecewise function are in the interval for the integrals (i.e. between 0 and π as we previously calcuated). These functions are 1 and -1; since 1 is in the interval from 0 to π/2, and -1 is in the interval from π/2 to π. So a0 becomes:
    When I calculate it I get that a0=0. This same thing occurs when I calculate an:
    [itex]a_{n}=\frac{2}{\pi}\int_{0}^{\frac{\pi}{2}}(1)cos\left ( nt \right )dt+\frac{2}{\pi}\int_{\frac{\pi}{2}}^{\pi}(-1)cos\left ( nt \right )dt[/itex].
    It also becomes zero because the only thing we are doing is multiplying the cosines to the original, but the integrals themselves still add to zero.
    It's logical for those integrals to be zero because the areas that result from below those curves are equal but are opposite in sign so when I add them they cancel each other.
    I don't know where I'm wrong in this: whether if its that the symmetry is not even or that the formulas are wrong, that's how they taught this in college. I wonder how to solve this and how to prevent this from happen.
    Thanks for your answers.
  2. jcsd
  3. Jun 16, 2016 #2
    I don't think so.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted