# Fourier Series

This page is a sub-page of our page on Infinitesimal Calculus of One Real Variable.

///////

Related KMR-pages:

///////

Other relevant sources of information:

What is a Fourier series (Explained by drawing circles)
Fourier Series
Fourier Series Grapher
But what is a Fourier series? From heat flow to circle drawings

///////

Books:

Fourier Series and Boundary Value Problems, Brown and Churchill, McGraw-Hill, 1963.

///////

The interactive simulations on this page can be navigated with the Free Viewer
of the Graphing Calculator.

///////

Representation and Reconstruction of a Presentant with respect to a Background

Representation: $\, [ \, p_{resentant} \, ]_{B_{ackground}} \, \mapsto \, \left< \, r_{epresentant} \, \right>_{B_{ackground}}$

Reconstruction: $\, \left( \, \left< \, r_{epresentant} \, \right>_{B_{ackground}} \, \right)_{B_{ackground}} \mapsto \,\, p_{resentant}$

///////

$\, [ \, R_{eal}V_{ector}S_{pace} \, ]_{B_{asis}} \, = \, \left< \, \mathbb{R}^n \, \right>_{B_{asis}} \, = \, \left< \, (x_1, \cdots , x_n) \, \right>_{(e_1, \cdots , \, e_n)} \,$

Let $\, V \,$ be a real vector space of dimension $\, n$. The fact that the vector $\, x \in V \,$
has the coordinates $\, (x_1, \cdots , x_n) \in {\mathbb{R}}^n \,$ in the basis $\, (e_1, \cdots , e_n) \,$ for $\, V \,$
means that each $\, x \in V \,$ is uniquely expressible as the linear combination

$\, x \, \equiv \, x_1 e_1 + \cdots + x_n e_n$.

The terms of this sum are the components of the vector $\, x \,$
aligned with the basis $\, (e_1, \cdots , e_n) \,$ for $\, V$, and
the coefficients of this linear combination are the coordinates of the vector $\, x \,$
with respect to this basis.

Inner product

Let $\, x, y \in \mathbb{R}^n$. The vector space $\, \mathbb{R}^n \,$ can be equipped with an inner product:

$\, x \cdot y \equiv (x_1 e_1 + \cdots + x_n e_n) \cdot (y_1 e_1 + \cdots + y_n e_n)$,

and, since each inner product is multilinear, and since the standard basis vectors $\, (e_1, \cdots , e_n) \,$ are orthogonal to each other and have unit length, we have:

$\, x \cdot y = x_1 y_1 + \cdots + x_n y_n \,$.

Terminology: A basis with mutually orthogonal vectors is called an orthogonal basis.
If, moreover, each basis vector also has unit length, the basis is called orthonormal.

Important: In case of an orthonormal basis, each coordinate is directly computable through the inner product $\, x_n = x \cdot e_n$.

Hence, for an orthonormal basis, we have

$\, x \, \equiv \, (x \cdot e_1) e_1 + \cdots + (x \cdot e_n) e_n$.

In contrast, in the case of a non-orthogonal basis, we need to solve
a system of $\, n \,$ linear equations in $\, n \,$ unknowns
in order to compute the coordinate $\, x_n$.

Periodic functions

Let $\, F \,$ be the set of 2π-periodic functions from $\, \mathbb {R} \,$ to $\, \mathbb {R}$, let $\, f, g \in F \,$ and let $\, \lambda \in \mathbb {R}$. Define the following operations (addition and scaling) on the members of $\, F \,$ by

$\, (f + g)(x) \, \stackrel {\mathrm{def}}{=} \, f(x) + g(x) \,$,

$\, (\lambda f)(x) \, \stackrel {\mathrm{def}}{=} \, \lambda f(x)$.

Exercise: Verify that with these definitions $\, F \,$ becomes a vector space.

Note: This is true also for non-periodic functions,
since the periodicity of the functions is NOT used in the verification.

The $\, T_{rig} \,$ basis for the vector space $\, F$

Let us define

$\, T_{rig} \stackrel {\mathrm{def}}{=} (({\cos}_1, \cdots , \, {\cos}_m , \cdots) , ({\sin}_1, \cdots , \, {\sin}_n, \cdots))$

where

$\, {\cos}_m(x) \stackrel {\mathrm{def}}{=} \cos(m x) \,$ and $\, {\sin}_n(x) \stackrel {\mathrm{def}}{=} \sin(n x)$.

It can be shown that $\, T_{rig} \,$ is a basis for $\, F$.
Moreover, with the proper inner product, $\, T_{rig} \,$ is an orthonormal basis for $\, F$.

///// MORE TEXT HERE

$\, [ \, f \, ]_{T_{rig}} \, = \, \left< \, ((c_1, \cdots , c_m , \cdots) , (s_1, \cdots , s_n , \cdots)) \, \right>_{T_{rig}} \,$

The vector space $\, F \,$ has infinite dimension. In fact, all periodic function spaces have the same “size” (= number of linearly independent elements) as the size (= the cardinality) of the natural numbers $\, \mathbb{N} \,$. This is expressed by saying that a periodic function space is countably infinite.

In contrast, a non-periodic real-to-real function space is non-countably infinite
which means that its dimensions cannot be counted by using natural numbers.

The fact that the function $\, f \in F \,$
has the coordinates $\, ((c_1, \cdots , c_m, \cdots) , (s_1, \cdots , s_n, \cdots)) \,$ in the basis $\, T_{rig} \,$
means that

$\, f(x) \, = \, c_1 {\cos}(x) + \cdots + c_m {\cos}(mx) + \cdots + \,$
$\qquad \quad + \, s_1 {\sin}(x) + \cdots + s_n {\sin}(nx) + \cdots \,$.

The terms of this series (= infinite sum) are the components of the vector $\, f \,$
aligned with the basis $\, T_{rig}$, and
the coefficients of this linear combination are the coordinates of the vector $\, f \,$
with respect to this basis.

Inner product

The vector space $\, F \,$ can be turned into an inner product space
by defining, for each pair of vectors $\, f, g, \in F$, an inner product

$\, f \cdot g \, \stackrel {\mathrm{def}}{=} \, \frac{1}{\pi} \int\limits_{-\pi}^{\pi} f(x) \, g(x) \, dx$.

Exercise: Verify that this definition satisfies the axioms for an inner product on $\, F$.

With this inner product, we have:

$\, {\cos}_m \cdot {\cos}_n \, \equiv \, \frac{1}{\pi} \int\limits_{-\pi}^{\pi} {\cos}(m x) \, {\cos}(n x) \, dx \, = \, {\delta}_{m n}$,
$\, {\cos}_m \cdot {\sin}_n \, \equiv \, \frac{1}{\pi} \int\limits_{-\pi}^{\pi} {\cos}(m x) \, {\sin}(n x) \, dx \, = \, {\delta}_{m n}$,
$\, {\sin}_m \cdot {\sin}_n \, \equiv \, \frac{1}{\pi} \int\limits_{-\pi}^{\pi} {\sin}(m x) \, {\sin}(n x) \, dx \, = \, {\delta}_{m n}$,

where $\, {\delta}_{m n} = 1 \,$ if $\, m = n \,$ and $\, {\delta}_{m n} = 0 \,$ if $\, m \neq n$.

Hence $\, T_{rig} \,$ is an orthonormal basis for the vector space $\, F$,
and thus the coordinates of a vector $\, f \in F \,$ are directly computable
through the inner products

$\, c_n \, = \, f \cdot {\cos}_n \, = \, \frac{1}{\pi} \int\limits_{-\pi}^{\pi} f(x) \, {\cos}(n x) \, dx$,
$\, s_n \, = \, f \cdot {\sin}_n \, = \, \frac{1}{\pi} \int\limits_{-\pi}^{\pi} f(x) \, {\sin}(n x) \, dx$.

Hence, since $\, T_{rig} \,$ is an orthonormal basis, we can conclude that

$\, f \, \equiv \, (f \cdot {\cos}_1) \, {\cos}_1 + \cdots + (f \cdot {\cos}_m) \, {\cos}_m + \cdots + \,$
$\qquad + \, (f \cdot {\sin}_1) \, {\sin}_1 + \cdots + (f \cdot {\sin}_n) \, {\sin}_n + \cdots$,

or, equivalently:

$\, f(x) \, \equiv \, (f \cdot {\cos}_1) \cos(x) + \cdots + (f \cdot {\cos}_m) \cos(m x) + \cdots + \,$
$\qquad \quad + \, (f \cdot {\sin}_1) \sin(x) + \cdots + (f \cdot {\sin}_n) \sin(n x) + \cdots$.

We can combine the finite parts of the cos-series and the sin-series into
the $\, N$:th partial sum of the Fourier series for the function $\, f \,$:

$\, f_N(x) \, \stackrel {\mathrm{def}}{=} \, \dfrac {c_0}{2} + \displaystyle\sum_{n=1}^N \, [ \, c_n \cos (n x) + s_n \sin (n x) \, ]$.

The question is now whether (and in what sense) $\, \lim\limits_{N \to \infty} f_N = f$.

Convergence of $\, f_N \,$ towards $\, f \,$

///////
Discuss the different types of regularities of the functions $\, f \in F$, regularities that lead to different forms of convergence, such as: point-wise convergence, $\, L^2$-convergence, and convergence almost everywhere.
///////

Fourier series

///////

But what is a Fourier Series? – From heat flow to circle drawings

///////

Fourier series of a sawtooth wave:

Fourier Series Animation of a Saw Tooth Wave:

Brek Martin on YouTube (20 June 2018)

Fourier series of a square wave:

Odd wave function: $\, f_N(x) \, \stackrel {\mathrm{def}}{=} \, \dfrac{2}{\pi} \displaystyle\sum_{n=1}^N \, (-1)^{n-1} \dfrac {2}{2n-1} \sin ((2n-1)x) \,$.

Input to the Fourier Series Grapher (copy-paste): (2/pi)*(2/(2n-1))*sin((2n-1)*x)

Even wave function: $\, g_N(x) \, \stackrel {\mathrm{def}}{=} \, \dfrac{2}{\pi} \displaystyle\sum_{n=0}^N \, (-1)^n \dfrac {2}{2n+1} \cos ((2n+1)x) \,$.

Input to the Fourier Series Grapher (copy-paste): ((-1)^n)*(2/pi)*(2/(2n+1))*cos((2n+1)*x)
Remember to change the starting value of $\, n \,$ in the sum from $\, 1 \,$ to $\, 0 \,$.

Cosine series of even overtones: $\, \displaystyle\sum_{n=1}^\infty cos(2nx)/(n^2) \,$
Fourier Series Grapher (copy-paste): cos(2n*x)/(n^2)

///////

$\, \begin{matrix} V_{ector}S_{pace}: & & \mathbb{C}^n & \mathbb{F}_{[0, 2\pi]} & \mathbb{F}_{\mathbb{R}} \\ A_{ddition}: & & \begin{matrix} x_1 \\ \vdots \\ x_n \end{matrix} + \begin{matrix} y_1 \\ \vdots \\ y_n \end{matrix} = \begin{matrix} x_1 + y_1 \\ \vdots \\ x_n + y_n \end{matrix} & (f + g)(x) = f(x) + g(x) & (f + g)(x) = f(x) + g(x) \, \end{matrix} \,$

///////

Brek Martin on YouTube (22 Oct 2015)

///////

Analysis and Synthesis of Waves

A standing wave:

///////