Theorem: Fourier Series/4 minus x squared over Range of 2

Let $\map f x$ be the real function defined on $\openint 0 2$ as:
:600pxthumbright$\map f x$ and its $7$th approximation
:$\map f x = 4 - x^2$
Then its Fourier series can be expressed as:
:$\map f x \sim \ds \frac 8 3 - \frac 4 {\pi^2} \sum_{n \mathop = 1}^\infty \frac {\cos n \pi x} {n^2} + \frac 4 \pi \sum_{n \mathop = 1}^\infty  \frac {\sin n \pi x} n$

Proof:
By definition of Fourier series:
:$\ds \map f x \sim \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty \paren {a_n \cos n \pi x + b_n \sin n \pi x}$
where:
{{begin-eqn}}
{{eqn | l = a_n
      | r = \int_0^2 \map f x \cos n \pi x \rd x
}}
{{eqn | l = b_n
      | r = \int_0^2 \map f x \sin n \pi x \rd x
}}
{{end-eqn}}
for all $n \in \Z_{>0}$.
Thus:
{{begin-eqn}}
{{eqn | l = a_0
      | r = \int_0^2 \map f x \rd x
      | c = Cosine of Zero is One
}}
{{eqn | r = \int_0^2 \paren {4 - x^2} \rd x
      | c = 
}}
{{eqn | r = \intlimits {4 x - \frac {x^3} 3} 0 2
      | c = Primitive of Power
}}
{{eqn | r = \paren {4 \times 2 - \frac {2^3} 3} - \paren {0 - 0}
      | c = 
}}
{{eqn | r = 8 - \frac 8 3
      | c = 
}}
{{eqn | r = \frac {16} 3
      | c = 
}}
{{end-eqn}}
{{qed|lemma}}
For $n > 0$:
{{begin-eqn}}
{{eqn | l = a_n
      | r = \int_0^2 \map f x \cos n \pi x \rd x
      | c = 
}}
{{eqn | r = \int_0^2 \paren {4 - x^2} \cos n \pi x \rd x
      | c = Definition of $f$
}}
{{eqn | r = 4 \int_0^2 \cos n \pi x \rd x - \int_0^2 x^2 \cos n \pi x \rd x
      | c = Linear Combination of Definite Integrals
}}
{{end-eqn}}
Splitting this up into bits:
{{begin-eqn}}
{{eqn | o = 
      | r = 4 \int_0^2 \cos n \pi x \rd x
      | c = 
}}
{{eqn | r = 4 \intlimits {\frac {\sin n \pi x} {n \pi} } 0 2
      | c = Primitive of $\cos n \pi x$
}}
{{eqn | r = 4 \paren {\frac {\sin 2 n \pi} {n \pi} } - 4 \paren {\frac {\sin 0} {n \pi} }
      | c = 
}}
{{eqn | r = 0
      | c = Sine of Multiple of Pi
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | o = 
      | r = \int_0^2 x^2 \cos n \pi x \rd x
      | c = 
}}
{{eqn | r = \intlimits {\frac {2 x \cos n \pi x} {\paren {n \pi}^2} + \paren {\frac {x^2} {n \pi} - \frac 2 {\paren {n \pi}^3} } \sin n \pi x} 0 2
      | c = Primitive of $x^2 \cos n \pi x$
}}
{{eqn | r = \paren {\frac {4 \cos 2 n \pi} {n^2 \pi^2} + \paren {\frac 4 {n \pi} - \frac 2 {\paren {n \pi}^3} } \sin 2 n \pi} - \paren {\frac {0 \cos 0} {n^2 \pi^2} + \paren {\frac 0 {n \pi} - \frac 2 {\paren {n \pi}^3} } \sin 0}
      | c = 
}}
{{eqn | r = \frac {4 \cos 2 n \pi} {n^2 \pi^2}
      | c = Sine of Multiple of Pi and removal of vanishing terms
}}
{{eqn | r = \frac 4 {n^2 \pi^2}
      | c = Cosine of Multiple of Pi
}}
{{end-eqn}}
Reassembling $a_n$ from the remaining non-vanishing terms:
{{begin-eqn}}
{{eqn | l = a_n
      | r = 0 - \frac 4 {n^2 \pi^2}
      | c = 
}}
{{eqn | r = -\frac 4 {n^2 \pi^2}
      | c = 
}}
{{end-eqn}}
{{qed|lemma}}
Now for the $\sin n \pi x$ terms:
{{begin-eqn}}
{{eqn | l = b_n
      | r = \int_0^2 \map f x \sin n \pi x \rd x
      | c = 
}}
{{eqn | r = \int_0^2 \paren {4 - x^2} \sin n \pi x \rd x
      | c = Definition of $f$
}}
{{eqn | r = 4 \int_0^2 \sin n \pi x \rd x - \int_0^2 x^2 \sin n \pi x \rd x
      | c = Linear Combination of Definite Integrals
}}
{{end-eqn}}
Splitting this up into bits:
{{begin-eqn}}
{{eqn | o = 
      | r = 4 \int_0^2 \sin n \pi x \rd x
      | c = 
}}
{{eqn | r = 4 \intlimits {\frac {-\cos n \pi x} {n \pi} } 0 2
      | c = Primitive of $\sin n \pi x$
}}
{{eqn | r = 4 \paren {\frac {-\cos 2 n \pi} {n \pi} } - 4 \paren {\frac {-\cos 0} {n \pi} }
      | c = 
}}
{{eqn | r = 4 \paren {\frac {-1} {n \pi} } - 4 \paren {\frac {-1} {n \pi} }
      | c = Cosine of Multiple of Pi
}}
{{eqn | r = 0
      | c = 
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | o = 
      | r = \int_0^2 x^2 \sin n x \rd x
      | c = 
}}
{{eqn | r = \intlimits {\frac {2 x \sin n \pi x} {\paren {n \pi}^2} + \paren {\frac 2 {\paren {n \pi}^3} - \frac {x^2} {n \pi} } \cos n \pi x} 0 2
      | c = Primitive of $x^2 \sin n \pi x$
}}
{{eqn | r = \paren {\frac {4 \sin 2 n \pi} {n^2 \pi^2} + \paren {\frac 2 {\paren {n \pi}^3} - \frac 4 {n \pi} } \cos 2 n \pi} - \paren {\frac {0 \sin 0} {n^2 \pi^2} + \paren {\frac 2 {\paren {n \pi}^3} - \frac 0 {n \pi} } \cos 0}
      | c = 
}}
{{eqn | r = \paren {\frac 2 {\paren {n \pi}^3} - \frac 4 {n \pi} } \cos 2 n \pi - \frac 2 {\paren {n \pi}^3} \cos 0
      | c = Sine of Multiple of Pi and removal of vanishing terms
}}
{{eqn | r = -\frac 4 {n \pi}
      | c = Cosine of Multiple of Pi and simplifying
}}
{{end-eqn}}
Reassembling $b_n$ from the remaining non-vanishing terms:
{{begin-eqn}}
{{eqn | l = b_n
      | r = 0 - \paren {-\frac 4 {n \pi} }
      | c = 
}}
{{eqn | r = \frac 4 {n \pi}
      | c = 
}}
{{end-eqn}}
{{qed|lemma}}
Finally:
{{begin-eqn}}
{{eqn | l = \map f x
      | o = \sim
      | r = \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty \paren {a_n \cos n x + b_n \sin n x}
      | c = 
}}
{{eqn | r = \dfrac 1 2 \paren {\frac {16} 3} + \sum_{n \mathop = 1}^\infty \paren {-\frac 4 {n^2 \pi^2} \cos n \pi x + \frac 4 {n \pi} \sin n \pi x}
      | c = substituting for $a_0$, $a_n$ and $b_n$ from above
}}
{{eqn | r = \frac 8 3 - \frac 4 {\pi^2} \sum_{n \mathop = 1}^\infty \frac {\cos n \pi x} {n^2} + \frac 4 \pi \sum_{n \mathop = 1}^\infty \frac {\sin n \pi x} n
      | c = rearranging
}}
{{end-eqn}}
{{qed}}