Fourier series of half of $\sin(\pi x)$

1.3k Views Asked by At

So my question is: Find the Fourier series (using integrals) for the half wave rectified sine function: $$f(x)= \begin{cases}0&-1<x<0\\ \sin(\pi x)& 0<x<1\end{cases}$$ where f(x) has period 2.

How am I meant to answer this? As I get the answers $a_0=0$, $b_n=0$, except at $n=1$, and $a_n= [1+(-1)^{2m+1}]/[-4m\pi(m+1)]$ where $n=2m+1$

Have I made a mistake? Because i really don't know what I'm doing aha...