Half-Range Fourier Sine Series/Sine of Half x over 0 to Pi, Minus Sine of Half x over Pi to 2 Pi

Theorem
Let $f \left({x}\right)$ be the real function defined on $\left({0 \,.\,.\, 2 \pi}\right)$ as:


 * $f \left({x}\right) = \begin{cases}

\sin \dfrac x 2 & : 0 \le x < \pi \\ -\sin \dfrac x 2 & : \pi < x \le 2 \pi \end{cases}$

Then its Fourier series can be expressed as:


 * $f \left({x}\right) \sim \displaystyle \frac 8 \pi \sum_{n \mathop = 1}^\infty \left({-1}\right)^{n - 1} \frac {n \sin n x} {4 n^2 - 1}$

Proof
By definition of half-range Fourier sine series:


 * $\displaystyle f \left({x}\right) \sim \sum_{n \mathop = 1}^\infty b_n \sin \dfrac {n x} 2$

where:

for all $n \in \Z_{>0}$.

Thus:

When $\dfrac {n x} 2 \ne \dfrac x 2$, that is, when $n \ne 1$, we have:

and so for $n \ne 1$:

When $\dfrac {n x} 2 = \dfrac x 2$, that is, when $n = 1$, we have:

and so for $n = 1$:

Hence:

When $n$ is odd, we have $n = 2 r + 1$ for $r \ge 1$, and so:

When $n$ is even, we have $n = 2 r$ for $r \ge 1$, and so: