Show that $\frac{\pi^2}{12} = \sum^\infty_{k=1}\frac 1 {k^2}$ using Fourier series

742 Views Asked by At

So i Have created a Fourier as $$f(x)=\frac{1}{3} + \sum^{\infty}_{n=1}(\frac{-4}{n^{2} \pi^{2}}\cos(n \pi x))$$ and i believe i can rearrange this to: $$ f(x) = \frac{1}{3} - \frac{4}{\pi^{2}}\sum^{\infty}_{n=1} \frac{1}{n^2}\cos(n \pi x)$$ Now how would i use this to get a answer for $$S = \sum^{\infty}_{k=1} \frac{1}{k^{2}} $$ So by taking a suitable point x. Can i use x=0, giving $\cos(n \pi x)=1$ Giving the equation: $$f(0)=\frac{1}{3}-\frac{4}{\pi^{2}}\sum^{\infty}_{k=1}\frac{1}{k^{2}}$$ and rearrange this to (using$\quad f(0)=0)$: $$\frac{\pi^{2}}{12} = \sum^{\infty}_{k=1}\frac{1}{k^{2}}$$

Would this be the right final answer for the approximation of this sum? Any help would be appreciated thanks in advance.

2

There are 2 best solutions below

10
On

Your 1/3 is wrong. It has to be 2/3: $$ a_0 = \frac 2 P\int_0^P f(x)\,dx = \int_0^2 (2x-x^2)\,dx = \left[x^2 - \frac 1 3 x^3\right]_0^2 = 4 - \frac 8 3 = \frac 4 3. $$ So, $\frac{a_0}2 = \frac 2 3$. For the other coefficients we get $$ a_n = \int_0^2 (2x-x^2)\cos(n\pi x)\,dx = -\int_0^2 x^2\cos(n\pi x)\,dx, $$ because $x\cos(n\pi x)$ is odd with resp. to $1$ (not $0$ as usual). Now, \begin{align*} \int_0^2 x^2\cos(n\pi x)\,dx &= \left[\frac{x^2}{n\pi}\sin(n\pi x)\right]_0^2 - \frac 2{n\pi}\int_0^2 x\sin(n\pi x)\,dx\\ &= -\frac 2 {n\pi}\left( \left[-\frac x {n\pi}\cos(n\pi x)\right]_0^2 + \frac 1 {n\pi}\int_0^2\cos(n\pi x)\,dx \right)\\ &= \frac 4 {n^2\pi^2}, \end{align*} hence $a_n = -4/(n^2\pi^2)$.

3
On

You have $f(x) = \begin{cases} -2x-x^2, & -2 \leq x <0 \\ 2x-x^2, & 0 \leq x < 2 \end{cases}$. Note that $f(-x) = f(x)$, a fact that will simplify our computations.

The formulae for the Fourier coefficients are:

$$a_0 = \frac 1 2 \int \limits _{-2} ^2 f(x) \textrm d x = \int \limits _0 ^2 f(x) \textrm d x = \frac 4 3 \\ a_n = \frac 1 2 \int \limits _{-2} ^2 f(x) \cos \frac {n \pi x} 2 \textrm d x = \int \limits _0 ^2 f(x) \cos \frac {n \pi x} 2 \textrm d x = -8 \frac {1 + (-1)^n} {n^2 \pi^2} \\ b_n = \frac 1 2 \int \limits _{-2} ^2 f(x) \sin \frac {n \pi x} 2 \textrm d x = 0 .$$

(The last integral is $0$ because it is the integral of an odd integrand over a symmetric interval, no need to compute anything. The value of $a_n$ has been obtained by integrating by parts twice and the interval has been halved because the integrand is even and the interval symmetric.)

Therefore, you may write that (remembering that the first term is $\frac {a_0} 2$)

$$f(x) = \frac 2 3 + \sum \limits _{n=1} ^\infty -8 \frac {1 + (-1)^n} {n^2 \pi^2} \cos \frac {n \pi x} 2 .$$

Since $-8 \frac {1 + (-1)^n} {n^2 \pi^2}$ is $0$ for odd $n$, and $- \frac {16 } {n^2 \pi^2}$ when $n=2k$, the previous formula becomes

$$f(x) = \frac 2 3 - \frac {16} {\pi^2} \sum \limits _{k=1} ^\infty \frac {\cos (k \pi x)} {(2k)^2} = \frac 2 3 - \frac 4 {\pi^2} \sum \limits _{k=1} ^\infty \frac {\cos (k \pi x)} {k^2} .$$

Take now $x=0$ making all the numerators inside the series equal to $1$. Then

$$0 = \frac 2 3 - \frac 4 {\pi^2} \sum \limits _{k=1} ^\infty \frac 1 {k^2}$$

which can be rearranged as

$$\frac {\pi^2} 6 = \sum \limits _{k=1} ^\infty \frac 1 {k^2}$$

(notice that it is $\frac {\pi^2} 6$, not $\frac {\pi^2} {12}$ as you wrote in your question).