An idea is define f(x)=x2
on [−π,π]
. Its trigonometric Fourier series was:
2a0+n=1∑∞(ancos(nx)+bnsin(nx))
which is periodic and converges to f(x)
in [−π,π]
.
Observing that f(x)
is even, hence
bn=π1∫−ππf(x)sin(nx)dx=0
for all n=1,2,3,…
. Now compute a0
a0=π1∫−ππx2dx=π2∫0πx2dx=π2[3x3]0π=π23π3=32π2
and each an
is
an=π1∫−ππx2cos(nx)dx=π2∫0πx2cos(nx)dx
Now let's focus on integral by part
∫x2cos(nx)dx=x2(∫cos(nx)dx)−∫2x(∫cos(nx)dx)dx=x2nsin(nx)−2∫xnsin(nx)dx
and again
∫xnsin(nx)dx=x∫nsin(nx)dx−∫1(∫nsin(nx)dx)dx=xn2−cos(nx)−∫n2−cos(nx)dx=xn2−cos(nx)−n3−sin(nx)
It seems complicated, but in fact we have sin(nπ)=0
, hence we can ignore them in this definite integral
an=π2[n22xcos(nx)]0π=π2n22πcos(nπ)=n24cos(nπ)=n24(−1)n=(−1)nn24
Therefore, if we compute f(π)
can get
f(π)=π2=3π2+n=1∑∞((−1)nn24cos(nπ))=3π2+n=1∑∞((−1)n(−1)nn24)=3π2+n=1∑∞((−1)2nn24)=3π2+n=1∑∞(n24)=3π2+4n=1∑∞(n21)
Hence
32π2=4n=1∑∞(n21)6π2=n=1∑∞(n21)