0
$\begingroup$

I'm making some mistake in the calculation of the integral for calculating the coefficients of the trigonometric fourier series of a sawtooth function.

The function (one period, simply repeated afterwards) is described as: $$x(t) = 1 + t \qquad \text{for} \ T_0/2 \leq t < T0/2 $$

Now the fourier series is given by (this is all theory):

$$ \mathcal{F}(x(t)) = a_0 + \sum \limits_{n=1}^{n=\infty} a_n \cos(n \omega_0t) + \sum \limits_{n=1}^{n=\infty} b_n \sin(n \omega_0t)$$

Where $\omega_n = \frac{2\pi}{T_0}$

This results in the follow, integrals over a single period: $$a_0 = \frac{1}{T_0} \int_{T_0}x(t)dt \\ a_n = \frac{2}{T_0} \int_{T_0}x(t)\cos(n \omega_0t)dt \\ b_n = \frac{2}{T_0} \int_{T_0}x(t)\sin(n \omega_0t)dt$$

$a_0 = 1$, this is easy just looking at the graph and noticing the average. Now the difficulty, and probably the error is somewhere here - is in calculating the other coefficients. I'm using a standard definition that $\int t \cos(at)dt = \frac{\cos(t) + a\sin(t)}{a^2}$ and $\int t \sin(at)dt = \frac{\sin(t) - a\cos(t)}{a^2}$ \begin{align} a_n &= \frac{2}{T_0} \int_{-T_0/2}^{T0/2}(1+t)\cos(n \omega t)dt\\ &= \frac{2}{T_0} \left( \sin(n\pi) + \sin(n\pi)\right) + \frac{2}{T_0} \left( \frac{\cos(n\omega t) + n\omega\sin(n\omega t)}{n^2 \omega^2} \middle|_{t=-T_0/2}^{T_0/2} \right) \\ &= 0 + \frac{T_0}{2n^2\pi^2} \left(\cos(n\pi) + n\omega \sin(n\pi) - \cos(-n\pi) - n \omega \sin(-n\pi) \right) \\ &= 0 \end{align}

So there are no cosine components in the resulting fourier series. (As expected, since the function is a constants + an odd function). Now similar the $b_n$ can be calculated.

\begin{align} b_n &= \frac{2}{T_0} \int_{-T_0/2}^{T0/2}(1+t)\sin(n \omega t)dt\\ &= \frac{2}{T_0} \left( -\cos(n\pi) + \cos(-n\pi)\right) + \frac{2}{T_0} \left( \frac{\sin(n\omega t) - n\omega\cos(n\omega t)}{n^2 \omega^2} \middle|_{t=-T_0/2}^{T_0/2} \right) \\ &= 0 + \frac{T_0}{2n^2\pi^2} \left(\sin(n\pi) - n\omega \cos(n\pi) - \sin(-n\pi) + n \omega \cos(-n\pi) \right) \\ &= 0 + \frac{T_0}{2n^2\pi^2} \left(2\sin(n\pi) + 0) \right) \\ &= 0 \end{align}

Which is totally wrong, as that would mean the fourier series results in: $$X(f) = 1$$

The answer should have: $$b_n = \frac{T_0}{n\pi}(-1)^{n+1} \quad \forall M \in \mathbb{N}$$

So where did I lose a term?

$\endgroup$
0
$\begingroup$

The second line for $b_n$ is wrong (and also for $a_n$ btw). In your 'standard' definition there are $t$ factors missing. Correct this and redo the partial integration.

$\endgroup$
  • $\begingroup$ Oh great, read the definition out of my calculus book wrong. $\int t \sin(at)dt = \frac{\sin(at) - at \cos(at)}{a^2}$ $\endgroup$ – paul23 Aug 4 '16 at 15:45
  • $\begingroup$ Well, I suppose that's what stack exchange is for ! ;-) $\endgroup$ – H. H. Rugh Aug 4 '16 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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