Fourier Series for $f(x)=x^4$ when $x \in (-\pi, \pi)$ How can we find the Fourier Series for the function 
$f(x)=x^4$ when $x \in (-\pi, \pi)$?
Could someone give me a hint on how to start this question? I'm a bit stuck; it's a while since I've learned about Fourier series.
 A: We may start with the Fourier sine series of a sawtooth wave:
$$ \forall x\in(-\pi,\pi),\qquad x=\sum_{n\geq 1}\frac{2(-1)^{n+1}\sin(nx)}{n}\tag{1} $$
and apply three times termwise integration. At the first step we get:
$$ \frac{x^2}{2}=\sum_{n\geq 1}\frac{2(-1)^{n+1}(1-\cos(nx))}{n^2}\tag{2.1} $$
from which:
$$ \forall x\in(-\pi,\pi),\qquad x^2 = \frac{\pi^2}{3}-\sum_{n\geq 1}\frac{4(-1)^{n+1}\cos(nx)}{n^2}\tag{2.2} $$
where the $\frac{\pi^2}{3}$ term comes from $\frac{1}{2\pi}\int_{-\pi}^{\pi} x^2 dx$ and:
$$ \forall x\in(-\pi,\pi),\qquad x^3= 2\pi^2\sum_{n\geq 1}\frac{(-1)^{n+1}}{n}\sin(nx)-12\sum_{n\geq 1}\frac{(-1)^{n+1}}{n^3}\sin(nx)\tag{3.2} $$
Integrating again, we get:
$$ \forall x\in(-\pi,\pi),\qquad x^4 = C-8\pi^2\sum_{n\geq 1}\frac{(-1)^{n+1}}{n^2}\cos(nx)+48\sum_{n\geq 1}\frac{(-1)^{n+1}}{n^4}\cos(nx)\tag{4.1} $$
where the constant $C$ has to be the mean value of the function $f(x)=x^4$ over the interval $(-\pi,\pi)$, hence:
$$\boxed{\, \forall x\in(-\pi,\pi),\qquad x^4 = \frac{\pi^4}{5}+\sum_{n\geq 1}\left(\frac{48}{n^4}-\frac{8\pi^2}{n^2}\right)(-1)^{n+1}\cos(nx)\,}\tag{4.2} $$
We may get just the same by computing
$$ c_n = \frac{1}{\pi}\int_{-\pi}^{\pi}x^4\cos(nx)\,dx $$
through integration by parts, but I think the above method, even if a bit longer, has many interesting by-products; for instance, can you see what happens when we consider the limit as $x\to\pi^-$ of both sides of $(2.2)$ or $(4.2)$? It happens that we find $\zeta(2)=\frac{\pi^2}{6}$ and $\zeta(4)=\frac{\pi^4}{90}$.
A: @Jack already provides a very good detailed way to calculate it. There is also a very useful rule for differentiation for the Fourier Transform which can be interpreted as multiplication by $x$ in the other domain (from Wolfram's Mathworld):
$$\frac{d}{dk}\mathcal{F}_x[f(x)](k) = \int_{-\infty}^\infty (-2\pi ix)f(x)e^{-2\pi ik x}dx$$
We then divide both sides $-2\pi i$, set $f(x) = x$ and iterate a few times, baking in a new $x$ into $f$ each time. (The $k$s here would roughly speaking be the $n$s in Jack's expression).
