Fourier Series/Square of x minus pi, Square of pi/Mistake

Source Work

 * : Chapter One: $\S 2$. Fourier Series: Example $1$

Mistake

 * $f \left({x}\right) \sim \displaystyle \frac 2 3 \pi^2 + 2 \sum_{n \mathop = 1}^\infty \left[{\frac {\cos n x} {n^2} + \left\{ {\frac {\left({-1}\right)^n \pi} n - \frac {2 \left({1 - \left({-1}\right)^n}\right)} {\pi n^3} }\right\} \sin n x}\right]$

The author appears to have lost a factor of $\dfrac 1 2$ in the $\sin n x$ term.

The correct expression, according to Fourier Series: $\left({x - \pi}\right)^2$, $\pi^2$, appears to be:


 * $f \left({x}\right) \sim \displaystyle \frac 2 3 \pi^2 + 2 \sum_{n \mathop = 1}^\infty \left[{\frac {\cos n x} {n^2} + \left\{ {\frac {\left({-1}\right)^n \pi} {2 n} - \frac {\left({1 - \left({-1}\right)^n}\right)} {\pi n^3} }\right\} \sin n x}\right]$