I've got an "interesting" problem. I've gotten a way through it, but I'd like someone to look if what I've done so far is correct, and what to do next.
We've got a function that is $0$ on the interval $[-\pi,0]$, and $\sin(x)$ on $[0,\pi]$.
I've calculated the Fourier coefficients to be $$ -\frac{(-1)^{n}}{\pi n^{2}-\pi}, $$
and the series being
$$ 1/\pi + \sum\limits_{n=1}^{\infty}-\frac{(-1)^{n}}{\pi n^{2}-\pi} e^{inx}. $$
However, the next part of the assignment is to rewrite this series as
$$ 1/\pi + \frac{1}{2} \sin(x) -\frac{2}{\pi} \sum\limits_{n=1}^{\infty}\frac{1}{4n^{2}-1} \cos(2nx), $$
and this is giving me some trouble. I'm thinking I'm supposed to use Euler's theorem to split up the exponential, and then move $\frac{2}{\pi}$ outside of the sum, but however I try, I can't quite make it all add up. Do I have an error in my earlier calculations, or am I just going about this the wrong way?
\begin{align} 2\pi c_n&=\int_0^\pi\sin(x)e^{-inx}\,dx=\int_0^\pi\frac1{2i}(e^{ix}-e^{-ix})e^{-inx}\,dx\\ 4\pi ic_n&=\int_0^\pi e^{-i(n-1)x}\,dx-\int_0^\pi e^{-i(n+1)x}\,dx\\ &=\begin{cases} \pi&\text{for }n=1\\ -\pi&\text{for }n=-1\\ \frac{i}{n-1}(e^{i(n-1)\pi}-1)-\frac{i}{n+1}(e^{i(n+1)\pi}-1)&\text{else} \end{cases}\\[1em] \implies c_n&=\begin{cases} \pm\frac1{4i}&\text{for }n=\pm 1\\ 0&\text{for all other odd }n\\ -\frac{1}{\pi(n^2-1)}\text{for even }n. \end{cases} \end{align} Which is slightly, but not totally, different from your result.