2. Fourier series#
The Fourier series of a function expresses the function as a linear combination of complex exponentials. This is extremely useful in many situations in mathematics, physics and engineering.
In terms of linear algebra, the theory of Fourier series provides an orthonormal basis for the Hilbert space of square-integrable functions on the interval \([0,1]\); see also Hilbert spaces.
2.1. Definition and basic properties#
Definition 2.1 (Fourier series)
Let \(f\) be a (real or complex) function on the interval \([0,1]\). The Fourier series of \(f\) is the infinite series
where the complex numbers \(c_n\) are defined by
We call these \(c_n\) the Fourier coefficients of \(f\).
One reason why Fourier series are useful is that the basis functions
form an orthonormal system: in Exercise 2.1, you will show that these functions satisfy
(See also Example 8.7 in the section on Hilbert spaces.)
There are also other ways of writing this series, namely via Euler’s formula
or the equivalent form
In particular, for functions \(f\) satisfying \(f(1-x)=f(x)\) this gives rise to Fourier cosine series
and for functions \(f\) satisfying \(f(1-x)=-f(x)\) to Fourier sine series
see Exercise 2.4 for details.
For most functions \(f\) that one encounters in practice, the Fourier series of \(f\) converges to \(f\) at every point. However, it is possible to come up with ‘pathological’ examples of functions (even continuous ones) where this fails. For an example where \(f\) is discontinuous, see Exercise 2.2.
Remark 2.1
In signal processing, one of the most fundamental uses of Fourier series is in decomposing a signal on a bounded interval (the unit interval \([0,1]\) in our case), or a periodic signal, as a sum of the signals \(\exp(2\pi i n x)\) with ‘pure’ frequency \(n\). In a slightly different direction, Fourier series are also closely related to the Z-transform (Wikipedia) used in signal processing. Suppose we start with an arbitrary sequence of complex numbers \(c_n\) for integers \(n\) (not necessarily coming from a function \(f\) on the unit interval). Such a sequence can be interpreted as a signal in discrete time. In the expression for the Fourier series (2.1), we can rewrite \(\exp(2\pi i n x)\) as \(z^n\), obtaining the series \(\sum_{n=-\infty}^\infty c_n z^n\). We can now take \(z\) (which lies on the complex unit circle if \(x\) is real) to vary over a suitable region within the complex plane where the series converges. This series can then be studied as a function of \(z\), known as the \(Z\)-transform of the signal.
2.2. Examples#
2.2.1. The Fourier series of a sawtooth function#
Consider the function \(f(x)=x\) on the interval \([0,1]\). To find its Fourier series, we compute the integrals defining the coefficients \(c_n\) for all integers \(n\). We have
For \(n\ne0\) we compute \(c_n\) using integration by parts:
We conclude that the Fourier series of \(f\) is
where the sum ranges over all non-zero integers \(n\). Combining the terms corresponding to \(n\) and \(-n\) and using the identity
we can simplify this to
Fig. 2.1 A sawtooth function and an approximation to its Fourier series#
2.2.2. The Fourier series of a half-wave rectified sine function#
Consider the half-wave rectified sine function
In Exercise 2.3, you will show that the Fourier coefficients are given by

Fig. 2.2 A half-wave rectified sine function and an approximation to its Fourier series#
In the applet below (simulation by PhET Interactive Simulations, University of Colorado Boulder, licensed under CC-BY-4.0 (https://phet.colorado.edu)) you can get a feeling for Fourier series by working with them interactively.
2.3. Exercises#
Exercise 2.1
Prove the orthogonality relation
where
Hint
You can integrate a complex exponential function in the same way as a real one. Alternatively, you can use Euler’s formula (2.2).
Exercise 2.2
Consider the function \(f\) on the interval \([0,1]\) defined by
Compute the Fourier series of \(f\).
Compute the value of this Fourier series at \(x=1/2\).
Exercise 2.3
Consider the the half-wave rectified sine function \(f\) defined by (2.3).
Prove the formula (2.4) for the Fourier coefficients of \(f\).
Show that the Fourier series of \(f\) can be rewritten as
\[ f(x) = \frac{1}{\pi} + \frac{1}{2}\sin(2\pi x) - \frac{2}{\pi} \sum_{n>0\text{ even}} \frac{1}{n^2-1}\cos(2\pi nx). \]
Exercise 2.4
Consider a complex-valued function \(f\) on the interval \([0,1]\) with Fourier series
Show that \(f\) can be written as a Fourier cosine series if and only if \(f(1-x)=f(x)\).
Show that \(f\) can be written as a Fourier sine series if and only if \(f(1-x)=-f(x)\).