# Using the Fourier Series To Find Some Interesting Sums

Estimated Read Time: 4 minute(s)
Common Topics: decoration, periodic, period, calculate, result

Table of Contents

## Preliminaries

If f(x) is periodic with period 2p and f’(x) exists and is finite for -π<x<π, then f can be written as a Fourier series:

$f(x)=\sum_{n=-\infty}^{\infty}a_{n}e^{inx}$

where

$a_{n}=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)e^{-int}dt$.

We shall also need Parseval’s formula. It says that for such an f we have:

$\parallel f \parallel^{2}=\sum_{n=-\infty}^{\infty}\vert a_{n}\vert^{2}$

where

$\parallel f \parallel^{2}=\frac{1}{2\pi}\int_{-\pi}^{\pi}\vert f(t) \vert ^{2}dt$

We shall also use the fact that

$\int_{-\pi}^{\pi}e^{-int}dt=0$

and

$e^{-in\pi}=(e^{-i\pi})^{n}=(-1)^{n}=(e^{i\pi})^{n}=e^{in\pi}$

## First Series

Let f(x) be periodic with period 2π where f(x) = x for -π<x<π and f(-π)=f(π)=0.  Let us calculate an for n≠0. The easiest way is to use partial integration:

$a_{n}=\frac{1}{2\pi}\int_{-\pi}^{\pi}te^{-int}dt =\frac{(-1)^{n}}{2\pi in}(\pi-(-\pi))-\frac{(-1)^{n}}{2\pi in}\int_{-\pi}^{\pi}e^{-int}dt=\frac{(-1)^{n}}{in}-0$

For n=0 we have

$a_{0}=\frac{1}{2\pi}\int_{-\pi}^{\pi}tdt =\frac{1}{2\pi}\frac{1}{2}(\pi^{2}-(-\pi)^{2})=0$

The only thing left to calculate is

$\parallel f \parallel^{2}=\frac{1}{2\pi}\int_{-\pi}^{\pi}t^{2}dt=\frac{1}{2\pi}\cdot\frac{1}{3}(\pi^{3}-(-\pi)^{3})=\frac{\pi^{2}}{3}$

Applying Parseval’s formula, we get

$\frac{\pi^{2}}{3}=\sum_{n=-\infty}^{-1}\frac{1}{n^{2}}+0+\sum_{n=1}^{\infty}\frac{1}{n^{2}}$

Now $(-n)^{2}=n^{2}$, so we can merge the two sums on the right:

$\frac{\pi^{2}}{3}=2\sum_{n=1}^{\infty}\frac{1}{n^{2}}$

or

$\sum_{n=1}^{\infty}\frac{1}{n^{2}}=\frac{\pi^{2}}{6}$

which is our first result.

## Second Series

Let f(x) be periodic with period 2π where f(x) = x2 for -π≤x≤π. Then

$a_{n}=\frac{1}{2\pi}\int_{-\pi}^{\pi}t^{2}e^{-int}dt=\frac{(-1)^{n}}{2\pi in}(\pi^{2}-(-\pi)^{2})-\frac{(-1)^{n}}{2\pi in}\int_{-\pi}^{\pi}2te^{-int}dt$

We have already calculated the difficult part of the last integral under “First Series”, therefore it is easy to find

$a_{n}=\frac{1}{2\pi}\int_{-\pi}^{\pi}t^{2}e^{-int}dt=0-\frac{(-1)^{n}}{2\pi in}\int_{-\pi}^{\pi}2te^{-int}dt=\frac{2\cdot(-1)^{2n}}{n^{2}}=\frac{2}{n^{2}}$

For n=0 we have

$a_{0}=\frac{1}{2\pi}\int_{-\pi}^{\pi}t^{2}dt =\frac{1}{2\pi}\frac{1}{3}(\pi^{3}-(-\pi)^{3})=\frac{\pi^{2}}{3}$

The only thing left to calculate is

$\parallel f \parallel^{2}=\frac{1}{2\pi}\int_{-\pi}^{\pi}t^{4}dt=\frac{1}{2\pi}\cdot\frac{1}{5}(\pi^{5}-(-\pi)^{5})=\frac{\pi^{4}}{5}$

Applying Parseval’s formula, we get

$\frac{\pi^{4}}{5}=\sum_{n=-\infty}^{-1}\frac{4}{n^{4}}+\frac{\pi^{4}}{9}+\sum_{n=1}^{\infty}\frac{4}{n^{4}}$

Now $(-n)^{4}=n^{4}$, so we can merge the two sums on the right:

$\frac{\pi^{4}}{5}-\frac{\pi^{4}}{9}=2\sum_{n=1}^{\infty}\frac{4}{n^{4}}$

Rearranging gives us

$\sum_{n=1}^{\infty}\frac{1}{n^{4}}=\pi^{4}\frac{9-5}{2\cdot 4\cdot5\cdot 9}=\frac{\pi^{4}}{90}$

which is our second result.

## Third series

Now it would be obvious to use f(x)=x3, but that function is somewhat problematic around ±π. A better function is f(x) = x32x which is 0 for ±π. Therefore: Let f(x) be periodic with period 2π where f(x) = x32x for -π≤x≤π. Then

$a_{n}=\frac{1}{2\pi}\int_{-\pi}^{\pi}(t^{3}-\pi^{2}t)e^{-int}dt=\frac{(-1)^{n}}{2\pi in}((\pi^{3}-\pi^{2}\cdot\pi)-((-\pi)^{3}-(-\pi)^{2}\cdot(-\pi))-\frac{(-1)^{n}}{2\pi in}\int_{-\pi}^{\pi}(3t^{2}-\pi^{2})e^{-int}dt$

$=0-\frac{(-1)^{n}}{2\pi in}\cdot 3\int_{-\pi}^{\pi}t^{2}e^{-int}dt +\frac{(-1)^{n}}{2\pi in}\cdot\pi^{2} \int_{-\pi}^{\pi}e^{-int}dt$

Now, the last integral is 0 (as mentioned in the preliminaries) and the first is solved in “Second series”. The result is that

$a_{n}=\frac{6}{in^{3}}$

For n=0 we have

$a_{0}=\frac{1}{2\pi}\int_{-\pi}^{\pi}(t^{3}-\pi^{2}t)dt=\vert_{-\pi}^{\pi}(\frac{t^{4}}{4}-\pi^{2}\frac{t^{2}}{2})=0$

The only thing left to calculate is

$\parallel f \parallel^{2}=\frac{1}{2\pi}\int_{-\pi}^{\pi}(t^{6}-2 \pi^{2}t^{4}+\pi^{4}t^{2}) dt=\frac{1}{2\pi}(2\cdot\frac{\pi^{7}}{7}-2\cdot 2\pi^{2}\frac{\pi^{5}}{5}+2\cdot \pi^{4}\frac{\pi^{3}}{3})=\frac{8\pi^{6}}{105}$

Applying Parseval’s formula:

$\frac{8\pi^{6}}{105}=\sum_{n=-\infty}^{-1}\frac{36}{n^{6}}+0+\sum_{n=1}^{\infty}\frac{36}{n^{6}}$

Now $(-n)^{6}=n^{6}$, so we can merge the two sums on the right and rearrange:

$\sum_{n=1}^{\infty}\frac{1}{n^{6}}=\frac{1}{2\cdot 36}\cdot\frac{8\pi^{6}}{105}=\frac{\pi^{6}}{945}$

which is our third result.

## Summing up

All the results in this insight are well-known, but the proofs are usually rather obtuse. I just thought that it would be fun to show that a trivial application of Fourier series theory would give the same answers.

Now I expect everybody has understood how to continue with increasing powers of x in f(x).  Who is going to do the next two?

Tags:
4 replies
1. stevendaryl says:

Very nice. I have done similar tricks for evaluating summations, but I didn't know the trick of using Parseval’s formula. My favorite trick is using representations of the Dirac delta function, and that's how I would evaluate $sum frac{1}{n^2}$. However, it's a lot more convoluted.Start with the representation for the delta function:$delta(x) = frac{1}{2pi} + frac{1}{pi} sum_n cos(nx)$Now, integrate both sides from $-x$ to $+x$.$sign(x) = frac{x}{pi} + frac{2}{pi} sum_n frac{1}{n} sin(nx)$(where $sign(x) = pm 1$ depending on whether $x>0$ or $x < 0$)Integrate again, this time from $0$ to $x$:$|x| = frac{x^2}{2pi} + frac{2}{pi} sum_n frac{1}{n^2} (1 – cos(nx))$Using a trig identity, $1-cos(nx) = 2 sin^2(frac{n}{2} x)$. So we have:$|x| = frac{x^2}{2pi} + frac{4}{pi} sum_n frac{1}{n^2} sin^2(frac{n}{2} x)$Now, we set $x = pi$ to get the identity:$pi = frac{pi}{2} + frac{4}{pi} sum_n frac{1}{n^2} sin^2(frac{n}{2} pi) = frac{4}{pi} sum_{odd n} frac{1}{n^2}$So:$frac{pi}{2} = frac{4}{pi} sum_n frac{1}{n^2} sin^2(frac{n}{2} pi) = frac{4}{pi} sum_{odd n} frac{1}{n^2}$Drat! The sum on the right side is only over odd values of $n$, because $sin^2(frac{n}{2} pi) = 0$ when $n$ is even. But all is not lost. We can reason as follows:$sum_n frac{1}{n^2} = sum_{odd n} frac{1}{n^2} + sum_{even n} frac{1}{n^2}$but $sum_{even n} frac{1}{n^2} = sum_{n} frac{1}{(2n)^2} = frac{1}{4} sum_{n} frac{1}{n^2}$. So we have:$sum_n frac{1}{n^2} = sum_{odd n} frac{1}{n^2} + frac{1}{4}sum_{n} frac{1}{n^2}$So $sum_{odd n} frac{1}{n^2} = frac{3}{4} sum_n frac{1}{n^2}$. Putting this back into our result, we have:$frac{pi}{2} = frac{4}{pi} sum_n frac{1}{n^2} sin^2(frac{n}{2} pi) = frac{4}{pi} frac{3}{4} sum_{n} frac{1}{n^2}$So $sum_n frac{1}{n^2} = frac{pi^2}{6}$Using Parseval is a lot simpler.

2. Svein says:

[QUOTE="micromass, post: 5651822, member: 205308"]Nice article. I think a follow up could consist of finding a general formula for$$sum frac{1}{n^{2p}}$$You can do that with Fourier series too![/QUOTE]Yes – but I thought it best to keep it reasonably simple the first time through.

### Leave a Reply

Want to join the discussion?
Feel free to contribute!