$ f(t)= \begin{cases} |t|&\text{if}\, -1 \leq t \leq 1\\ &\text{continue periodically} \end{cases} $
I need to find the complex Fourier series (so using the $f(t) = \sum\limits_{n=-\infty}^{\infty}\alpha_n \cdot e^{i \cdot n \cdot \omega \cdot t}$ formula).
Firstly I need to find $\alpha_n$
lets say $i \cdot n \cdot \omega = k$ \begin{align} \alpha_n &=\frac{1}{T}\int\limits_{-1}^{1}f(t) \cdot e^{-k \cdot t}dt \\ &=\frac{1}{2}\int\limits_{-1}^{ 0}-2t \cdot e^{-k \cdot t}dt + \frac{1}{2}\int\limits_{ 0}^{ 1} 2t \cdot e^{-k \cdot t}dt \\ &=\int\limits_{-1}^{ 0} -t \cdot e^{-k \cdot t}dt +\int\limits_{ 0}^{ 1} t \cdot e^{-k \cdot t}dt \\ &=\left[\frac{(k\cdot t+1)\cdot e^{-k \cdot t}}{k^2}\right]_{-1}^{0} +\left[-\frac{(k\cdot t+1)\cdot e^{-k \cdot t}}{k^2}\right]_{0}^{1} \\ &=\left[\frac{(k-1)\cdot e^{-k}}{k^2}+\frac{1}{k^2}\right] +\left[\frac{1}{k^2}-\frac{(k+1)e^{-k}}{k^2}\right]\\ &= \frac{(k-1)\cdot e^{k}}{k^2}-\frac{(k+1) \cdot e^{-k}}{k^2}+\frac{2}{k^2}\\ &= \frac{e^{k} \cdot (1-k) - e^{-k} \cdot (1+k)+2}{k^2} \end{align}
Now I can say that $\omega = \frac{2 \pi}{T} = \pi$ this makes $k = i \cdot n \cdot \pi$
$$ \alpha_n= \frac{e^{i \cdot n \cdot \pi} \cdot (1-i \cdot n \cdot \pi) + e^{-i \cdot n \cdot \pi} \cdot (1+i \cdot n \cdot \pi)+2}{(i \cdot n \cdot \pi)^2} $$
Is there a way to write this better? Is this correct so far?
I think I made a mistake cause when $n=0$ this would mean $\alpha_n= \infty$
For coefficients with $\ell=1$ we have $$c_n=\dfrac{1}{2\ell}\int_{-\ell}^{\ell}f(t)e^{-int\pi/\ell}\ dt=\dfrac{1}{2}\left(\int_{-1}^{0}-te^{-int\pi}\ dt + \int_{0}^{1}te^{-int\pi}\ dt\right)=2\dfrac{(-1)+(-1)^n}{n^2\pi^2}$$ therefore $$f(t)=\sum_{n=-\infty}^{\infty}c_ne^{in\pi t/\ell}=\sum_{n=-\infty}^{\infty}\dfrac{(-1)+(-1)^n}{n^2\pi^2}e^{in\pi t}$$