# Fourier Series/x squared over Minus Pi to Pi

(Redirected from Fourier Series of x squared)

## Theorem

For $x \in \closedint {-\pi} \pi$:

$\displaystyle x^2 = \frac {\pi^2} 3 + \sum_{n \mathop = 1}^\infty \paren {\paren {-1}^n \frac 4 {n^2} \cos n x}$

## Proof

From Even Power is Even Function, $x^2$ is an even function.

$\displaystyle x^2 \sim \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty a_n \cos n x$

where:

 $\displaystyle a_n$ $=$ $\displaystyle \frac 2 \pi \int_0^\pi x^2 \map \cos {n x} \rd x$ $\displaystyle \leadsto \ \$ $\displaystyle \frac 1 2 a_0$ $=$ $\displaystyle \frac 2 {2 \pi} \int_0^\pi x^2 \rd x$ Cosine of Zero is One $\displaystyle$ $=$ $\displaystyle \frac 1 \pi \cdot \frac {\pi^3} 3$ Primitive of Power, Fundamental Theorem of Calculus $\displaystyle$ $=$ $\displaystyle \frac {\pi^2} 3$

Then:

 $\displaystyle \frac 2 \pi \int_0^\pi x^2 \map \cos {n x} \rd x$ $=$ $\displaystyle \frac 2 \pi \intlimits {\frac {2 x \cos n x} {n^2} + \paren {\frac {x^2} n - \frac 2 {n^3} } \sin n x} 0 \pi$ Primitive of $x^2 \cos a x$, Fundamental Theorem of Calculus $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \intlimits {\frac {2 x \cos n x} {n^2} } 0 \pi$ Sine of Multiple of Pi $\displaystyle$ $=$ $\displaystyle \frac 2 \pi \cdot \frac {2 \pi \cos n \pi} {n^2}$ $\displaystyle$ $=$ $\displaystyle \frac {4 \cos n \pi} {n^2}$ $\displaystyle$ $=$ $\displaystyle \paren {-1}^n \frac 4 {n^2}$ Cosine of Multiple of Pi

Substituting for $a_n$ in $(1)$:

$\displaystyle x^2 = \frac {\pi^2} 3 + \sum_{n \mathop = 1}^\infty \paren {\paren {-1}^n \frac 4 {n^2} \cos n x}$

as required.

$\blacksquare$