I'm having trouble simplifying a Fourier sine expansion for the following function: $$f(x) = \max\{{\frac{\pi}{2}, x}\}$$ on the interval of $[0,\pi]$. Since we're doing a sine series then $a_n = 0$ and the function collapses down to $f(x) = \sum_{n=1}^{\infty}b_n\sin(nx)$, where $$b_n = \frac{2}{\pi}\int_{0}^{\pi}f(x)\sin(nx)dx = \frac{2}{\pi}\bigg(\int_{0}^{\pi/2}\frac{\pi}{2}\sin(nx) dx \quad+ \quad\int_{\pi/2}^{\pi}x\sin(nx)dx)\bigg)$$ which I've managed to calculate (hopefully correctly) as: $$b_n = \frac{2}{\pi}\bigg(\frac{\pi}{2n} - \frac{\pi}{n}\cdot(-1)^n - \frac{1}{n^2}\sin\big(\frac{n\pi}{2}\big) \bigg)$$
Now I'm kinda stuck. I mean I could just put this into the final formula but I think there is a way to simplify it, just can't quite find it. The problematic part is obviously $\sin\big(\frac{n\pi}{2}\big)$ since for $n = 2k$ it is equal to zero. But if $n$ is an odd number it's either $-1$ or $1$. I've tried to get rid of the even elements in the sum (I had hoped they would be zero), but: $$b_{2n}= \frac{2}{\pi}\bigg(\frac{\pi}{4n} - \frac{\pi}{2n}\cdot(-1)^{2n}-\frac{1}{(2n)^2}\sin\big(n\pi\big)\bigg) = \frac{2}{\pi}\bigg(\frac{\pi}{4n} - \frac{\pi}{2n}\bigg) = \frac{2}{\pi}\cdot\bigg(-\frac{\pi}{4n}\bigg) = -\frac{1}{2n}$$
Looks pretty neat but still doesn't help me all that much. Any ideas on how to simplify this?
Thanks.