Complex Fourier series of $1-t$.

48 Views Asked by At

I'm trying to compute the complex Fourier series of the function $f(t)$ which is defined as $$f (t) = \left\{ \begin{array}{ll} 1-t & t \in [0,1] \\ 0 & \,t \in [1,2] \\ \end{array} \right. $$ . Since $f(t)$ has a period of $2$ and I can compute the complex coefficient $c_n = \frac{1}{2}\int_0^1(1-t)e^{-in\pi t}dt$ but this gets me into integration by parts and results in a coefficient $c_n=-\frac{-1 + e^{-i n π} + i n π}{n^2 π^2}$ which seems unfitting in scope in the context of the other tasks that I'm doing which is why I have a feeling that I am making a mistake. Can anybody tell me if I am on the right track?