Fourier series of $x^2$ over $[-\pi,\ \pi]$ is $$\sum_{n=1}^{\infty} \frac{4 \left(-1\right)^{n} \cos{\left(n x \right)}}{n^{2}} + \frac{\pi^{2}}{3} $$
Graphing the two functions we can see them coinciding, apparently over $[-\pi,\ \pi]$.
But the function $x^2$ doesn't satisfy one of Dirichlet's conditions of being periodic and hence its Fourier series should not coverage to it. So how is the series converging to the function?
