# 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:

[itex]f(x)=\sum_{n=-\infty}^{\infty}a_{n}e^{inx} [/itex]

where

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

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

[itex]\parallel f \parallel^{2}=\sum_{n=-\infty}^{\infty}\vert a_{n}\vert^{2} [/itex]

where

[itex]\parallel f \parallel^{2}=\frac{1}{2\pi}\int_{-\pi}^{\pi}\vert f(t) \vert ^{2}dt [/itex]

We shall also use the fact that

[itex]\int_{-\pi}^{\pi}e^{-int}dt=0 [/itex]

and

[itex]e^{-in\pi}=(e^{-i\pi})^{n}=(-1)^{n}=(e^{i\pi})^{n}=e^{in\pi} [/itex]

## First Series

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

[itex] 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[/itex]

For n=0 we have

[itex]a_{0}=\frac{1}{2\pi}\int_{-\pi}^{\pi}tdt =\frac{1}{2\pi}\frac{1}{2}(\pi^{2}-(-\pi)^{2})=0 [/itex]

The only thing left to calculate is

[itex]\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} [/itex]

Applying Parseval’s formula, we get

[itex]\frac{\pi^{2}}{3}=\sum_{n=-\infty}^{-1}\frac{1}{n^{2}}+0+\sum_{n=1}^{\infty}\frac{1}{n^{2}} [/itex]

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

[itex]\frac{\pi^{2}}{3}=2\sum_{n=1}^{\infty}\frac{1}{n^{2}} [/itex]

or

**[itex] \sum_{n=1}^{\infty}\frac{1}{n^{2}}=\frac{\pi^{2}}{6}[/itex]**

which is our first result.

## Second Series

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

[itex]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 [/itex]

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

[itex]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}} [/itex]

For n=0 we have

[itex]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} [/itex]

The only thing left to calculate is

[itex]\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} [/itex]

Applying Parseval’s formula, we get

[itex]\frac{\pi^{4}}{5}=\sum_{n=-\infty}^{-1}\frac{4}{n^{4}}+\frac{\pi^{4}}{9}+\sum_{n=1}^{\infty}\frac{4}{n^{4}}[/itex]

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

[itex]\frac{\pi^{4}}{5}-\frac{\pi^{4}}{9}=2\sum_{n=1}^{\infty}\frac{4}{n^{4}} [/itex]

Rearranging gives us

**[itex] \sum_{n=1}^{\infty}\frac{1}{n^{4}}=\pi^{4}\frac{9-5}{2\cdot 4\cdot5\cdot 9}=\frac{\pi^{4}}{90}[/itex]**

which is our second result.

## Third series

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

[itex] 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[/itex]

[itex]=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 [/itex]

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

[itex]a_{n}=\frac{6}{in^{3}}[/itex]

For n=0 we have

[itex]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 [/itex]

The only thing left to calculate is

[itex]\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}[/itex]

Applying Parseval’s formula:

[itex]\frac{8\pi^{6}}{105}=\sum_{n=-\infty}^{-1}\frac{36}{n^{6}}+0+\sum_{n=1}^{\infty}\frac{36}{n^{6}} [/itex]

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

**[itex]\sum_{n=1}^{\infty}\frac{1}{n^{6}}=\frac{1}{2\cdot 36}\cdot\frac{8\pi^{6}}{105}=\frac{\pi^{6}}{945}[/itex]**

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?

Master’s in Mathematics, Norway. Interested in Network-based time synchronisation.

Nice Insight @Svein!

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 [itex]sum frac{1}{n^2}[/itex]. However, it's a lot more convoluted.Start with the representation for the delta function:[itex]delta(x) = frac{1}{2pi} + frac{1}{pi} sum_n cos(nx)[/itex]Now, integrate both sides from [itex]-x[/itex] to [itex]+x[/itex].[itex]sign(x) = frac{x}{pi} + frac{2}{pi} sum_n frac{1}{n} sin(nx)[/itex](where [itex]sign(x) = pm 1[/itex] depending on whether [itex]x>0[/itex] or [itex]x < 0[/itex])Integrate again, this time from [itex]0[/itex] to [itex]x[/itex]:[itex]|x| = frac{x^2}{2pi} + frac{2}{pi} sum_n frac{1}{n^2} (1 – cos(nx))[/itex]Using a trig identity, [itex]1-cos(nx) = 2 sin^2(frac{n}{2} x)[/itex]. So we have:[itex]|x| = frac{x^2}{2pi} + frac{4}{pi} sum_n frac{1}{n^2} sin^2(frac{n}{2} x)[/itex]Now, we set [itex]x = pi[/itex] to get the identity:[itex]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}[/itex]So:[itex]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}[/itex]Drat! The sum on the right side is only over odd values of [itex]n[/itex], because [itex]sin^2(frac{n}{2} pi) = 0[/itex] when [itex]n[/itex] is even. But all is not lost. We can reason as follows:[itex]sum_n frac{1}{n^2} = sum_{odd n} frac{1}{n^2} + sum_{even n} frac{1}{n^2}[/itex]but [itex]sum_{even n} frac{1}{n^2} = sum_{n} frac{1}{(2n)^2} = frac{1}{4} sum_{n} frac{1}{n^2}[/itex]. So we have:[itex]sum_n frac{1}{n^2} = sum_{odd n} frac{1}{n^2} + frac{1}{4}sum_{n} frac{1}{n^2}[/itex]So [itex]sum_{odd n} frac{1}{n^2} = frac{3}{4} sum_n frac{1}{n^2}[/itex]. Putting this back into our result, we have:[itex]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}[/itex]So [itex]sum_n frac{1}{n^2} = frac{pi^2}{6}[/itex]Using Parseval is a lot simpler.

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

[QUOTE="Svein, post: 5649952, member: 538805"]Svein submitted a new PF Insights postUsing the Fourier Series To Find Some Interesting SumsContinue reading the Original PF Insights Post.[/QUOTE]Nice article. I think a follow up could consist of finding a general formula for[tex]sum frac{1}{n^{2p}}[/tex]You can do that with Fourier series too!