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

Source Work

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

Mistake

 * $\map f x \sim \displaystyle \frac 2 3 \pi^2 + 2 \sum_{n \mathop = 1}^\infty \sqbrk {\frac {\cos n x} {n^2} + \set {\frac {\paren {-1}^n \pi} n - \frac {2 \paren {1 - \paren {-1}^n} } {\pi n^3} } \sin n x}$

Correction
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: $\paren {x - \pi}^2$, $\pi^2$, appears to be:


 * $\map f x \sim \displaystyle \frac 2 3 \pi^2 + 2 \sum_{n \mathop = 1}^\infty \sqbrk {\frac {\cos n x} {n^2} + \set {\frac {\paren {-1}^n \pi} {2 n} - \frac {\paren {1 - \paren {-1}^n} } {\pi n^3} } \sin n x}$