- There was only the answer, so I add its question at the top and some links at the bottom. --Jaemin 14:50, 28 September 2010 (UTC).
Exercise: Compute the Fourier series coefficients of the following periodic signal:
$ \;\;\;x(t)=|\text{sin}(\pi t)|, \;\; \text{with the period }T=1 $
Answer
$ a_n = \frac{1}{T}\int_{0}^{T}x(t)e^{-j\frac{2\pi}{T}n t} dt = \int_{0}^{1}x(t)e^{-j2\pi n t} $
Substitute $ a=\pi, \;\; b=-j2\pi n $
$ \begin{align} a_n &= \int_{0}^{1}\text{sin}(at)e^{bt}dt = \left[\frac{1}{b}\text{sin}(at)e^{bt}\right]^{1}_{0} - \int_{0}^{1}\frac{a\text{cos}(at)}{b}e^{bt}dt \\ &= \left(\frac{e^b}{b}\text{sin}(a)\right) - \frac{a}{b}\left(\left[\frac{\text{cos}(at)}{b}e^{bt}\right]^{1}_{0} - \int_{0}^{1}\frac{-a\text{sin}(at)}{b}e^{bt}dt\right) \\ &= \left(\frac{e^b}{b}\text{sin}(a)\right) - \frac{a}{b} \left( \left( \frac{\text{cos}(a)}{b}e^{b}-\frac{1}{b}\right) + \frac{a}{b}\int_{0}^{1}\text{sin}(at)e^{bt}dt \right) \\ &= \frac{e^b}{a}\text{sin}(a)-\frac{a\text{cos}(a)}{b^2}e^b + \frac{a}{b^2} - \frac{a^2}{b^2}\int_{0}^{1}\text{sin}(at)e^{bt}dt \\ \end{align} $
As you can see $ \int_{0}^{1}\text{sin}(at)e^{bt}dt $ term repeats, therefore it needs to be subtracted to both sides.
Then, an can be calculated.
$ \frac{e^{-j2\pi n}}{-j2\pi n}\text{sin}\pi + \frac{\pi \text{cos}\pi}{4 \pi^2 n^2}e^{-j2\pi n} - \frac{\pi}{4 \pi^2 n^2} = \left(1-\frac{\pi^2}{4\pi^2 n^2}\right) \int_{0}^{1}\text{sin}(\pi t) e^{-j2\pi n t}dt = \left(1-\frac{\pi^2}{4\pi^2 n^2}\right) a_n $
From this equation, $ \frac{e^{-j2\pi n t}}{-j2\pi n}\text{sin}\pi=0 $ because of sinπ, and $ \frac{\pi \text{cos}\pi}{4 \pi^2 n^2}e^{-j2\pi n} = \frac{-\pi}{4\pi^2 n^2} $
There are two terms of $ -\frac{\pi}{4\pi^2 n^2} $.
$ a_n=\frac{-\frac{2\pi}{4\pi^2 n^2}}{1-\frac{\pi^2}{4\pi^2 n^2}} = -\frac{2\pi}{4\pi^2 n^2 - \pi^2} = \frac{2}{\pi(1-4n^2)} $