I really need to know the difference when doing a fourier seires between even and odd square waves. I've been trying to understand but I just get the same results and the same spectrums... Is the difference in the formula? If so, I can't find any formulas online that match with that my professor gave me. They're all a little different.

photo of work done, enhanced, rotated, trimmed

  • 1
    $\begingroup$ If you show your calculations for both kinds of waves, it'll be easier to tell if/where you might be making a mistake. $\endgroup$
    – MBaz
    Dec 6, 2016 at 23:05
  • $\begingroup$ Okay here, updated $\endgroup$
    – Alex
    Dec 6, 2016 at 23:13
  • $\begingroup$ when you just shift a signal in time (to make it even for example) the Fourier series coefficients magnitude spectrum will be the same but their phase spectrum will change. $\endgroup$
    – Fat32
    Dec 6, 2016 at 23:18

1 Answer 1


For a trigonometric Fourier series:

$$ \tilde{x}(t) = a_0 + \sum\limits_{n=1}^{\infty} a_n \cos(n \omega_0 t) + \sum\limits_{n=1}^{\infty} b_n \sin(n \omega_0 t) $$ with $$ a_0 = \frac{1}{T} \int_{-T/2}^{T/2} x(t) \ dt $$

$$ a_n = \frac{2}{T} \int_{-T/2}^{T/2} x(t) \cos (n \omega_0 t) \ dt, \quad n = 1, 2, \ldots $$

$$ b_n = \frac{2}{T} \int_{-T/2}^{T/2} x(t) \sin (n \omega_0 t) \ dt, \quad n = 1, 2, \ldots $$ and $ \omega_0 = \frac{2\pi}{T} $ .

the Fourier series of an odd square wave will be a sum of only sine terms, and the Fourier series of an even square wave will be a sum of only cosine terms.

This is because the product of an odd and an even function is an odd function, which when integrated over a symmetric interval (i.e. from $-T/2$ to $T/2$), will return zero. For an odd square wave, this means that all the $a_n$ will be zero, and for an even square wave, all the $b_n$ will be zero.

You can save yourself time and potential mistakes by exploiting this fact and only computing the coefficients that are nonzero.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.