Fourier coefficients of $1-|t|$ with $t \in [-1,1]$

41 Views Asked by At

I'm asked to find the fourier coefficients $c_k$ of the following signal:

enter image description here


What I did: (For simplicity, let $ a := \pi i k$. And obviously, the period $T=2$) $$c_k= \frac{1}{T}\int_{0}^{T}x(t)e^{-2 \pi i k t/T}=\frac{1}{2}\int_{-1}^{0}(1+t)e^{-2 \pi i k t/2}dt + \frac{1}{2}\int_{0}^{1}(1-t)e^{-2 \pi i k t/2}dt = \frac{1}{2}\int_{-1}^{1}e^{-2 \pi i k t/2} + \frac{1}{2}\int_{-1}^{1}|t|e^{-2 \pi i k t/2}=$$ $$ 0 + \frac{1}{2}((-\frac{1}{a^2} + \frac{(-1)^k}{-a}) + \frac{(-1)^k}{a^2}) + (-\frac{1}{a^2} + \frac{(-1)^k}{a}-\frac{(-1)^k}{a^2})) = -\frac{1}{a^2}= -\frac{1}{(\pi i k)^2}$$

(I hope I did no mistake.) However, my solution says that I should have gotten $$c_k=\frac{2 \sin^2{\pi \frac{k}{2}}}{\pi ^2 k^2}$$

May I ask you what I did wrong ?

Thanks for your help !

1

There are 1 best solutions below

0
On BEST ANSWER

You have $\displaystyle c_k=\frac12\int_{-1}^0 (1+t)E\ \mathrm{d}t+\frac12\int_{0}^1 (1-t)E\ \mathrm{d}t$, where $E$ is the exponential term. After collecting similar integrands, this should become $\displaystyle \frac12 \int_{-1}^1 E\ \mathrm{d}t +\frac12 \int_{-1}^1 (\color{red}{-}|t|)E\ \mathrm{d}t$ since $-|t|=\begin{cases}t,&t<0\\-t,&t>0\end{cases}$, so your second integral should be negative.