I have been given the following question.
"The function $f(x)$ is odd, has a period $2\pi$ and satisfies:
$$f(x)=\begin{cases} 1 & 0\lt x \lt \pi \\ -1 & \pi \lt x \lt 2\pi \end{cases}$$
Find its fourier series.
As it is an odd function I have put that $a_0=0$ and $a_n=0$.
I have worked out that $b_n=\frac{2}{n\pi}(-1)^{n+1}$
Thus the solution $f(x)$ would be $ \sum_{n=1}^{\infty}b_n \sin(nx)$
Is this correct? I cannot find the solution.
Thanks.