# Fourier Series: before I begin…

Update: Graphs now fixed

Exams are coming and so I am starting to reread text books and the like in preparation. One of these is Andrew Tanenbaum‘s excellent Computer Networks.

Now, it’s not really relevant to the questions I may get asked and I am about to display some mathematical vulnerability here, but I just need to know the answers, so here we go anyway…(plus it also allows me to test out the native LaTeX support on the blog).

Tanenbaum’s book is structured as an examination of the various layers in a network stack and so begins its examination of the physical layer – starting with an examination of the impact of bandwidth and Nyquist and Shannon’s work on the fundamental limitations of any physical medium.

He starts his explanation of the impact of limited bandwidth with the concept of the Fourier series. [Fourier's work showed that any periodic function could be represented as a superposition of other periodic, orthogonal, functions - crudely you can make any finite line by adding together lots of sine and cosine lines of different frequency and amplitude].

Now, I have obviously come across these before – both in A level maths and at university: it would be difficult to have a degree in the physical sciences without having done so! But that was a quarter of a century and more ago and I really cannot recall whether I was given a rigorous or semi-rigorous explanation or just asked to take it all on trust.

So I wanted to explain it all to myself – I don’t doubt it, clearly. Even intuitively it seems close to obvious, but I wanted to understand the maths a bit more.

Looking through various explanations I found the one on Wolfram Mathworld rather easier to grasp than the one on Wikipedia. But here’s the rub…

$\int_{-\pi}^\pi \! \mathrm{sin(}mx \mathrm{)sin(}nx\mathrm{)}dx = \pi\delta_{mn}$

where $\delta_{mn}$ is Kronecker’s delta and:

$\delta_{mn} = 1$ when $m = n$ and $\delta_{mn} = 0$ when $m \neq n$.

So I thought I’d try this out, and used a crude spread sheet to do it. Here is a graph of $\mathrm{sin(}mx \mathrm{)sin(}nx\mathrm{)}$ where $m = n$.

And here it is when $n = 2m$

And so on … the first function would clearly integrate to something close to $\pi$ – just assume it’s average value is 0.5 and you can see that (as the domain is $-\pi$ to $\pi$) and similarly visual inspection shows the second to be zero.

Update: Below here I start to go all wrong … see here

And in fact this seem to work well for even fractional ratios over 2 – here’s 2.5 and 9.5:

But this is what I get with $n = 1.5m$:

Plainly that does not integrate to 0 (nor $\pi$ for that matter). So what have I got wrong?