Theorem: Half-Range Fourier Sine Series/x by Pi minus x over 0 to Pi

Let $\map f x$ be the real function defined on $\openint 0 \pi$ as:
:$\map f x = x \paren {\pi - x}$
Then its half-range Fourier sine series can be expressed as:
:$\ds \map f x \sim \frac 8 \pi \sum_{r \mathop = 0}^\infty \frac {\sin \paren {2 r + 1} x} {\paren {2 r + 1}^3}$

Proof:
By definition of half-range Fourier sine series:
:$\ds \map f x \sim \sum_{n \mathop = 1}^\infty b_n \sin n x$
where for all $n \in \Z_{> 0}$:
:$b_n = \ds \frac 2 \pi \int_0^\pi \map f x \sin n x \rd x$
Thus by definition of $f$:
{{begin-eqn}}
{{eqn | l = b_n
      | r = \frac 2 \pi \int_0^\pi \map f x \sin n x \rd x
      | c = 
}}
{{eqn | r = \frac 2 \pi \int_0^\pi x \paren {\pi - x} \sin n x \rd x
      | c = Definition of $f$
}}
{{eqn | r = 2 \int_0^\pi x \sin n x \rd x - \frac 2 \pi \int_0^\pi x^2 \sin n x \rd x
      | c = Linear Combination of Definite Integrals and simplifying
}}
{{end-eqn}}
Splitting it up into two:
{{begin-eqn}}
{{eqn | l = 2 \int_0^\pi x \sin n x \rd x
      | r = 2 \intlimits {\frac {\sin n x} {n^2} - \frac {x \cos n x} n} 0 \pi
      | c = Primitive of $x \sin n x$
}}
{{eqn | r = 2 \paren {\paren {\frac {\sin n \pi} {n^2} - \frac {\pi \cos n \pi} n} - \paren {\frac {\sin 0} {n^2} - \frac {0 \cos 0} n} }
      | c = 
}}
{{eqn | r = -2 \frac {\pi \cos n \pi} n
      | c = Sine of Multiple of Pi and removing vanishing terms
}}
{{end-eqn}}
and:
{{begin-eqn}}
{{eqn | l = \frac 2 \pi \int_0^\pi x^2 \sin n x \rd x
      | r = 2 \intlimits {\frac {2 x \sin n x} {n^2} + \paren {\frac 2 {n^3} - \frac {x^2} n} \cos n x} 0 \pi
      | c = Primitive of $x^2 \sin n x$
}}
{{eqn | r = \frac 2 \pi \paren {\paren {\frac {2 \pi \sin n \pi} {n^2} + \paren {\frac 2 {n^3} - \frac {\pi^2} n} \cos n \pi} - \paren {\frac {0 \sin 0} {n^2} + \paren {\frac 2 {n^3} - \frac {0^2} n} \cos 0} }
      | c = 
}}
{{eqn | r = \frac 2 \pi \paren {\paren {\frac 2 {n^3} - \frac {\pi^2} n} \cos n \pi - \frac 2 {n^3} \cos 0}
      | c = Sine of Multiple of Pi and removing vanishing terms
}}
{{eqn | r = \frac 2 \pi \paren {\paren {\frac 2 {n^3} - \frac {\pi^2} n} \cos n \pi - \frac 2 {n^3} }
      | c = Cosine of Zero is One
}}
{{end-eqn}}
Thus:
{{begin-eqn}}
{{eqn | l = b_n
      | r = -2 \frac {\pi \cos n \pi} n - \frac 2 \pi \paren {\paren {\frac 2 {n^3} - \frac {\pi^2} n} \cos n \pi - \frac 2 {n^3} }
      | c = 
}}
{{eqn | r = \frac {4 \paren {1 - \cos n \pi} } {\pi n^3} - 2 \frac {\pi \cos n \pi} n + \frac {2 \pi \cos n \pi} n
      | c = simplifying
}}
{{eqn | r = \frac {4 \paren {1 - \paren {-1}^n} } {\pi n^3}
      | c = Cosine of Multiple of Pi and simplifying
}}
{{end-eqn}}
When $n$ is even, $\paren {-1}^n = 1$ and so $\dfrac {4 \paren {1 - \paren {-1}^n} } {\pi n^3} = 0$.
When $n$ is odd, $n$ can be expressed as $n = 2 r + 1$ for $r \ge 0$.
Thus:
{{begin-eqn}}
{{eqn | l = b_n
      | r = \frac {4 \paren {1 - \paren {-1}^{2 r + 1} } } {\pi \paren {2 r + 1}^3}
      | c = 
}}
{{eqn | r = \frac {4 \paren {1 + 1} } {\pi \paren {2 r + 1}^3}
      | c = as $\paren {-1}^{2 r + 1} = -1$
}}
{{eqn | r = \frac 8 {\pi \paren {2 r + 1}^3}
      | c = 
}}
{{end-eqn}}
Hence:
:$\ds \map f x \sim \frac 8 \pi \sum_{r \mathop = 0}^\infty \frac {\sin \paren {2 r + 1} x} {\paren {2 r + 1}^3}$
{{qed}}