$$f(x) =\sin \left(\frac{x}{2}\right)$$ on interval $0 < x < \pi$
Hello, I'm trying to do the sine series. I understand I have to do $b_n$ but somehow I always get $0$ as result, but it doesn't seem logical to me.
I always end up to the point where I get $\sin$ of something minus that same $\sin$.
This is what I have so far:
\begin{align} b_n &=\frac{2}{\pi} \int_o^\pi \sin\left(\frac{x}{2}\right)\sin nx\,dx\\ &=\frac{2}{\pi} \int_o^\pi \frac{{\cos\left(\frac{x}{2} - x\right)}-{\cos\left(\frac{x}{2} - x\right)}}{2}dx\\ &=\frac{1}{\pi} \int_o^\pi \left({\cos\left(-\frac {x}{2}\right)}-{\cos\left(\frac{x}{2}\right)}\right)dx \end{align}
And its pretty much clear what happens, I end up with $0$ as result. I'm so confused.
I'd like to see how would you do $b_n$ because I think I did something wrong along the line, but I tried so many times I can't see it anymore :)
Much appreciated.