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

## Mistake

$\map f x \sim \ds \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 gained a spurious multiple of $2$ in the $\sin n x$ term, apparently by mistakenly including the $\sin n x$ terms within the coefficient $2$ which applies to only the $\cos n x$ terms.

The correct expression, according to Fourier Series: $\paren {x - \pi}^2$, $\pi^2$, should be:

$\map f x \sim \ds \frac 2 3 \pi^2 + \sum_{n \mathop = 1}^\infty \sqbrk {\frac {2 \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}$

This is the graph of $\map f x$ and its expansion to $a_5$ and $b_5$ according to the correct analysis:

In comparison, this is the corresponding graph as a result of I.N. Sneddon's analysis: