# Generalised Fourier Series

In all my time as a PhD student I have been involved with teaching undergraduate and postgraduate physics students at Imperial College London (they even gave me a prize in 2018!) as a teaching assistant in classroom-style tutorials and seminars. For my final year, though, I’ve also moved up into helping write the teaching materials, particularly for the differential equations part of the second-year course.

The first differential equations seminar we had was showing off some of the properties and uses of the Legendre polynomials, which the students had just met by solving Legendre’s equation. My part of the seminar was illustrating how any orthogonal basis of functions can be used to make a series expansion, and then getting the students to investigate how different types of functional expansion behave at different orders. If you just want to play with this, load up the Jupyter notebook on Colab or myBinder. The source code for this notebook is available on GitHub. You can see an example plot of these below.

The end result we’ll achieve mathematically is an abstract way of making series expansions. In general, a series expansion approximates a function $f(x)$ by using a (possibly infinite) sequence of terms, where each term is a constant multiplied by some basis function. Different series expansions use different bases and different methods of determining the coefficients.

Perhaps the most familiar example is the Taylor series. The Taylor series $T_{f}(x)$ that approximates a function $f(x)$ around some point $x_{0}$ is

$T_{f}(x)=k=0∑∞ k!f_{(k)}(x_{0}) (x−x_{0})_{k},$where the $f_{(k)}(x_{0})$ notation means the $k$th derivative of $f(x)$ with respect to $x$, evaluated at $x_{0}$. This series uses the monomials ($x_{m}$ for integer $m$) as its basis, and it’s very common in physics to use finite approximations to the Taylor series (*i.e.* by taking only the first $m$ terms) to analyse behaviour of a complicated function around some point.

Taylor series are taught at A Level in the UK, and are the first functional approximation method most people come across. Early in undergraduate physics courses, we introduce another method, motivated by investigation of periodic functions: the Fourier series. For real-valued functions where the range $−1≤x<1$ spans one period, this is generally written as

$F_{f}(x)=21 a_{0}+k=1∑∞ (a_{k}cos(kπx)+b_{k}sin(kπx)),$where $a_{k}=∫_{−1}f(x)cos(kπx)dx$, and the $b_{k}$ are the same except for $sin$ instead of $cos$. The basis functions of this series are $sin(mπx)$ and $cos(mπx)$ for integer $m$.

Fourier series are constructed by using an idea of “orthogonality” of its basis functions, whereas Taylor series come from locally approximating a function with successive polynomials. We haven’t yet seen *why* the Fourier coefficients are the way they are, but once we have, we can use the same method to make many different series expansions. First, though, we take an apparent detour into linear algebra and vectors—if you already know what an “inner-product space” is, there’s probably nothing new for you in the next part.

The next article of this series runs through the all the background maths for this part of the seminar, including some linear algebra results that the students learned in their first year at university. The rest of the series covers how to produce the arbitrary series expansions, then looks at the results I hoped the students would discover by playing around with the interactive notebook.

This article is the introduction to a series. You can find all of the rest of the articles in this series here: