How to construct the complex Fourier series of a function over a non-symmetric interval?

168 Views Asked by At

I need to calculate the coefficients $$c_n=\frac{1}{2L}\int_{-L}^Lf(x)e^{-\frac{in\pi x}{L}}dx,\qquad n=0,\pm1,\pm2,\cdots$$ of the complex Fourier series for the function: $$f(x)=\begin{cases}-x\ &0<x<1,\\ x\ &1<x<2,\\ \end{cases}$$ but clearly this function is not defined over an interval of the form $(-L,L)$, but $(0,2)$.

I already know that, for the trigonometric real Fourier series, I can fix this by projecting the function in a certain way over $(-2,0)$, making $f(x)$ an ever, odd or periodic function. I thought I could use this for my case, but how do I apply this for the complex series? Do I need to "re-transform" $$e^{-\frac{in\pi x}{L}}=\cos\left(\frac{n\pi x}{L}\right)-i\sin\left(\frac{n\pi x}{L}\right)?$$