# Boundary Value Problems/Lesson 4

## Solution of a BVP

The Fourier series is a mathematical tool used for analyzing periodic functions by decomposing such a function into a weighted sum of much simpler sinusoidal component functions sometimes referred to as normal Fourier modes, or simply modes for short. The weights, or coefficients, of the modes, are a one-to-one mapping of the original function. Generalizations include generalized Fourier series and other expansions over orthonormal bases.

Fourier series serve many useful purposes, as manipulation and conceptualization of the modal coefficients are often easier than with the original function. Areas of application include electrical engineering, vibration analysis, acoustics, optics, signal and image processing, and data compression. Using the tools and techniques of spectroscopy, for example, astronomers can deduce the chemical composition of a star by analyzing the frequency components, or spectrum, of the star's emitted light. Similarly, engineers can optimize the design of a telecommunications system using information about the spectral components of the data signal that the system will carry. See also spectrum analyzer.

The Fourier series is named after the French scientist and mathematician Joseph Fourier, who used them in his influential work on heat conduction, Théorie Analytique de la Chaleur (The Analytical Theory of Heat), published in 1822.

## Definition

### General form

Given a complex-valued function f of real argument t, f: RC, where f(t) is piecewise smooth and continuous, periodic with period T, and square-integrable over the interval from ${\displaystyle t_{1}}$  to ${\displaystyle t_{2}}$  of length T, that is,

${\displaystyle \int _{t_{1}}^{t_{2}}|f(t)|^{2}\,dt<+\infty }$

where

• ${\displaystyle T=t_{2}-t_{1}}$  is the period,
• ${\displaystyle t_{1}}$  and ${\displaystyle t_{2}}$  are integration bounds.

The Fourier series expansion of f is

• ${\displaystyle f(t)={\frac {1}{2}}a_{0}+\sum _{n=1}^{\infty }[a_{n}\cos(\omega _{n}t)+b_{n}\sin(\omega _{n}t)]}$

where, for any non-negative integer n,

• ${\displaystyle \omega _{n}=n{\frac {2\pi }{T}}}$      is the nth harmonic (in radians) of the function f,
• ${\displaystyle a_{n}={\frac {2}{T}}\int _{t_{1}}^{t_{2}}f(t)\cos(\omega _{n}t)\,dt}$      are the even Fourier coefficients of f, and
• ${\displaystyle b_{n}={\frac {2}{T}}\int _{t_{1}}^{t_{2}}f(t)\sin(\omega _{n}t)\,dt}$      are the odd Fourier coefficients of f.

Equivalently, in complex exponential form,

• ${\displaystyle f(t)=\sum _{n=-\infty }^{+\infty }c_{n}e^{i\omega _{n}t}}$

where:

• ${\displaystyle c_{n}={\frac {1}{T}}\int _{t_{1}}^{t_{2}}f(t)e^{-i\omega _{n}t}\,dt,}$
• ${\displaystyle i}$  is the imaginary unit, and
• ${\displaystyle e^{i\omega _{n}t}=\cos(\omega _{n}t)+i\sin(\omega _{n}t)}$      in accordance with Euler's formula.

For a formal justification, see Modern derivation of the Fourier coefficients below.

### Canonical form

In the special case where the period T = 2π, we have

${\displaystyle \omega _{n}=n\,}$

In this case, the Fourier series expansion reduces to a particularly simple form:

${\displaystyle f(t)={\frac {1}{2}}a_{0}+\sum _{n=1}^{\infty }[a_{n}\cos(nt)+b_{n}\sin(nt)]}$

where

• ${\displaystyle a_{n}={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(t)\cos(nt)\,dt}$
• ${\displaystyle b_{n}={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(t)\sin(nt)\,dt}$

for any non-negative integer n.

or, equivalently:

${\displaystyle f(t)=\sum _{n=-\infty }^{+\infty }c_{n}e^{int}}$

where

• ${\displaystyle c_{n}={\frac {1}{2\pi }}\int _{-\pi }^{\pi }f(t)e^{-int}\,dt={\frac {1}{2}}(a_{n}-ib_{n}).}$

### Choice of the form

The form for period T can be easily derived from the canonical one with the change of variable defined by ${\displaystyle x={\frac {2\pi }{T}}t}$ . Therefore, both formulations are equivalent. However, the form for period T is used in most practical cases because it is directly applicable. For the theory, the canonical form is preferred because it is more elegant and easier to interpret mathematically, as will later be seen.

## Examples

### Simple Fourier series

Let f be periodic of period ${\displaystyle 2\pi }$ , with ${\displaystyle f(x)=x}$  for x from −π to π. Note that this function is a periodic version of the identity function.

We will compute the Fourier coefficients for this function.

{\displaystyle {\begin{aligned}a_{n}&{}={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(x)\cos(nx)\,dx\\&{}={\frac {1}{\pi }}\int _{-\pi }^{\pi }x\cos(nx)\,dx\\&{}=0.\end{aligned}}}

{\displaystyle {\begin{aligned}b_{n}&{}={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(x)\sin(nx)\,dx\\&{}={\frac {1}{\pi }}\int _{-\pi }^{\pi }x\sin(nx)\,dx\\&{}={\frac {2}{\pi }}\int _{0}^{\pi }x\sin(nx)\,dx\\&{}={\frac {2}{\pi }}\left(\left[-{\frac {x\cos(nx)}{n}}\right]_{0}^{\pi }+\left[{\frac {\sin(nx)}{n^{2}}}\right]_{0}^{\pi }\right)\\&{}=2{\frac {(-1)^{n+1}}{n}}.\end{aligned}}}

Notice that an are 0 because the ${\displaystyle x\mapsto x\cos(nx)}$  are odd functions. Hence the Fourier series for this function is:

${\displaystyle f(x)={\frac {a_{0}}{2}}+\sum _{n=1}^{\infty }\left[a_{n}\cos \left(nx\right)+b_{n}\sin \left(nx\right)\right]}$
${\displaystyle =2\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}}{n}}\sin(nx),\quad \forall x\in [-\pi ,\pi ].}$

One application of this Fourier series is to compute the value of the Riemann zeta function at s = 2; by Parseval's theorem, we have:

${\displaystyle {\frac {1}{2\pi }}\int _{-\pi }^{\pi }x^{2}dx={\frac {1}{2}}\sum _{n>0}\left[2{\frac {(-1)^{n}}{n}}\right]^{2}}$

which yields: ${\displaystyle \sum _{n>0}{\frac {1}{n^{2}}}={\frac {\pi ^{2}}{6}}}$ .

## Modern derivation of the Fourier coefficients

The method used by Fourier to derive the coefficients of the series is very practical and well-suited to the problem he was dealing with (heat propagation). However, this method has since been generalized to a much wider class of problems: writing a function as a sum of periodic functions.

More precisely, if f:RC is a function, we would like to write this function as a sum of trigonometric functions, i.e. ${\displaystyle f(x)=\sum c_{n}e^{inx}}$ . We have to restrict our choice of functions in order for this to make sense. First of all, if f has period T, then by changing variables, can study ${\displaystyle x\mapsto f\left({\frac {T}{2\pi }}x\right)}$  which has period 2π. This simplifies notations a lot and allows us to use a canonical (standard) form. We can restrict the study of ${\displaystyle x\mapsto f\left({\frac {T}{2\pi }}x\right)}$  to any interval of length 2π, [-π,π], say.

We will take the functions f:RC in the set of piecewise continuous, 2π periodic functions with ${\displaystyle \int _{-\pi }^{\pi }|f(x)|^{2}\,dx<+\infty }$ . Technically speaking, we are in fact taking functions from the Lp space L2(μ), where μ is the normalized Lebesgue measure of the interval [-π,π] (i.e. such that ${\displaystyle \int _{[-\pi ,\pi ]}f\,d\mu ={\frac {1}{2\pi }}\int _{-\pi }^{\pi }f(x)\,dx}$ .

### Complex Fourier coefficients

We can make L2(μ) into a Hilbert space, which is well-suited for orthogonal projections, by defining the scalar product:

${\displaystyle \langle f,g\rangle =\int _{[-\pi ,\pi ]}f{\overline {g}}\,d\mu ={\frac {1}{2\pi }}\int _{-\pi }^{\pi }f(x){\overline {g(x)}}\,dx,}$

where ${\displaystyle {\overline {f(x)}}}$  denotes the conjugate of f(x). We will denote by ${\displaystyle \|\cdot \|}$  the associated norm.

${\displaystyle E=\{t\mapsto e^{int},n\in \mathbb {Z} \}}$  is an orthonormal basis of L2(μ), which means we can write

${\displaystyle f(x)=\sum _{n\in \mathbb {Z} }\left\langle f,e^{inx}\right\rangle e^{inx}.}$

We usually define ${\displaystyle \forall n\in \mathbb {Z} ,c_{n}=\left\langle f,e^{inx}\right\rangle }$ . These numbers are called complex Fourier coefficients. Their expression is

${\displaystyle c_{n}={\frac {1}{2\pi }}\int _{-\pi }^{\pi }f(x)e^{-inx}\,dx.\,}$

An equivalent formulation is to write f as a sum of sine and cosine functions.

### Real Fourier coefficients

The sum in the previous section is symmetrical around 0: indeed, except for n=0, a c-n coefficient corresponds to every cn coefficient. This reminds one of the formulae

${\displaystyle \cos(x)={\frac {e^{ix}+e^{-ix}}{2}}{\rm {~~~~and~~~~}}\sin(x)={\frac {e^{ix}-e^{-ix}}{2i}}.}$

It is therefore possible to express the Fourier series with real-valued functions. To do this, we first notice that

${\displaystyle f(x)=\sum _{n\in \mathbb {Z} }c_{n}e^{inx}=c_{0}+\sum _{n>0}\left[c_{-n}e^{-inx}+c_{n}e^{inx}\right].}$

After replacing cn by its expression and simplifying the result we get

${\displaystyle f(x)=c_{0}+\sum _{n>0}\left[{\frac {1}{\pi }}\left(\int _{-\pi }^{\pi }f(t)\cos \left(nt\right)\,dt\right)\cos \left(nx\right)+{\frac {1}{\pi }}\left(\int _{-\pi }^{\pi }f(t)\sin \left(nt\right)\,dt\right)\sin \left(nx\right)\right].}$

If, for a non-negative integer n, we define the real Fourier coefficients an and bn by

${\displaystyle a_{n}={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(x)\cos \left(nx\right)\,dx,}$
${\displaystyle b_{n}={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(x)\sin \left(nx\right)\,dx,}$

we get:

${\displaystyle f(x)={\frac {a_{0}}{2}}+\sum _{n>0}\left[a_{n}\cos \left(nx\right)+b_{n}\sin \left(nx\right)\right].}$

### Properties

• The following properties can be easily derived from Euler's formula: ${\displaystyle e^{ix}=\cos x+i\sin x.\!}$
${\displaystyle a_{n}=c_{n}+c_{-n}{\mbox{ and }}b_{n}=i(c_{n}-c_{-n}){\mbox{ for all }}n{\mbox{ and }}\,}$
${\displaystyle c_{n}={\frac {a_{n}-ib_{n}}{2}}{\mbox{ and }}c_{-n}={\frac {a_{n}+ib_{n}}{2}}{\mbox{ for all }}n.}$
• If f is an odd function, then ${\displaystyle a_{n}=0}$  for all ${\displaystyle n}$  because ${\displaystyle f(x)\cos \left(n\pi {\frac {x}{T}}\right)}$  is then also odd, so its integral on ${\displaystyle [-T,T]}$  is zero. If f is an even function, then ${\displaystyle b_{n}=0}$  for a similar reason.
• If f is piecewise continuous, ${\displaystyle \lim _{n\rightarrow +\infty }c_{n}(f)=0}$ , ${\displaystyle \lim _{n\rightarrow +\infty }c_{-n}(f)=0}$ , ${\displaystyle \lim _{n\rightarrow +\infty }a_{n}(f)=0}$  and ${\displaystyle \lim _{n\rightarrow +\infty }b_{n}(f)=0.}$
• If f is k-times piecewise continuously differentiable, then we can easily compute the Fourier coefficients of ${\displaystyle f^{(k)}}$  given those of f:
${\displaystyle c_{n}\left(f^{(k)}\right)=(in)^{k}c_{n}(f),}$

where ${\displaystyle f^{(k)}}$  denotes the kth derivative of f.

• For any positive integer k, if f is Ck − 1 and piecewise Ck, then
${\displaystyle \lim _{n\rightarrow +\infty }|n^{k}c_{n}(f)|=0}$  because ${\displaystyle n^{k}c_{n}(f)=i^{-k}c_{n}\left(f^{(k)}\right)\rightarrow 0.}$

This means that the sequence ${\displaystyle c_{n}(f)}$  is rapidly decreasing.

### General case

Fourier series take advantage of the periodicity of a function f but what if f is periodic in more than one variable, or for that matter, what if f is not periodic? These problems led mathematicians and theoretical physicists to try to define Fourier series on any group G. The advantage of this is that it allows us, for example, to define Fourier series for functions of several variables. Fourier series and Fourier transforms usually used in signal processing then become special cases of this theory and are easier to interpret.

If G is a locally compact Abelian group and T is the unit circle, we can define the dual of G by ${\displaystyle {\widehat {G}}=\{\chi :G\rightarrow \mathbb {T} {\mbox{ homomorphism}}\}}$ . This is the set of rotations on the unit circle and its elements are called characters. We can define a scalar product ${\displaystyle \langle \cdot ,\cdot \rangle }$  on C[G] by: ${\displaystyle \langle \chi _{1},\chi _{2}\rangle =\int _{G}\chi _{1}(g){\overline {\chi _{2}(g)}}\,dg}$ . ${\displaystyle {\widehat {G}}}$  is then an orthonormal basis of C[G] with respect to this scalar product. Let f :GC. The Fourier coefficients of f are defined by: ${\displaystyle {\widehat {f}}(\chi )=\langle f,\chi \rangle }$  and we have ${\displaystyle f(g)=\int _{\widehat {G}}{\widehat {f}}(\chi )\chi (g)\,d\chi }$ . If the group is discrete, then the integral reduces to an ordinary sum.

For example, the Fourier series of this article are obtained by taking G=R/2πZ. We get

${\displaystyle {\widehat {G}}=\{\chi _{n}:t\mapsto e^{int},n\in \mathbb {Z} \}}$

and

${\displaystyle c_{n}(f)={\widehat {f}}(\chi _{n})=\int _{G}f(g){\overline {\chi (g)}}\,dg={\frac {1}{2\pi }}\int _{-\pi }^{\pi }f(t)e^{-int}\,dt.}$

Periodic functions in n dimensions can be defined on an n-dimensional torus (the function taking a value at each point on the torus). Such a torus is defined by Tn=Rn/(2πZ)n. For n=1 we get a circle, for n=2 the cartesian product of two circles, i.e. a torus in the usual sense. Choosing G=Tn gives the corresponding Fourier series.

## Approximation and convergence of Fourier series

### Definition of a Fourier series

Let ${\displaystyle \chi _{n}(x)=e^{in\pi {\frac {x}{T}}}}$ . We call Fourier series of the function f the series ${\displaystyle \sum c_{n}\chi _{n}}$ . For any positive integer N, we call ${\displaystyle f_{N}(x)=\sum _{n=-N}^{N}c_{n}\chi _{n}(x)}$  the N-th partial sum of the Fourier series of this function.

### Approximation with the partial sums

Say we want to find the best approximation of f using only the functions ${\displaystyle \chi _{n}}$  for n from ${\displaystyle -N}$  to N. Let ${\displaystyle {\mathcal {T}}_{N}=\left\{p=\sum _{n=-N}^{N}x_{n}\chi _{n},x_{n}\in \mathbb {C} \right\}}$ . We are trying to find coefficients ${\displaystyle (x_{-N},\dots ,x_{N})}$  such that ${\displaystyle \|f-p\|}$  is minimum (where ${\displaystyle \|\cdot \|}$  denotes the norm).

We have ${\displaystyle \|f-p\|^{2}=\|f\|^{2}-2{\mbox{Re}}\langle f,p\rangle +\|p\|^{2}}$ , where Re(z) denotes the real part of z.

${\displaystyle \langle f,p\rangle =\sum _{n=-N}^{N}{\overline {x_{n}}}\langle f,\chi _{n}\rangle .}$

Parseval's theorem (which can be derived independently from Fourier series) gives us

${\displaystyle \|p\|^{2}=\sum _{n=-N}^{N}|x_{n}|^{2}.}$

By definition, ${\displaystyle c_{n}=\langle f,\chi _{n}\rangle }$ ; therefore

${\displaystyle \|f-p\|^{2}=\|f\|^{2}+\sum _{n=-N}^{N}\left[|c_{n}-x_{n}|^{2}-|c_{n}|^{2}\right].}$

It is clear that this expression is minimum for ${\displaystyle x_{n}=c_{n}}$  and for this value only.

This means that there is one and only one ${\displaystyle f_{N}\in {\mathcal {T}}_{N}}$  such that

${\displaystyle \|f-f_{N}\|=\min _{p\in {\mathcal {T}}_{N}}\left\{\|f-p\|,p\in {\mathcal {T}}_{N}\right\},}$

it is given by

${\displaystyle f_{N}(x)=\sum _{n=-N}^{N}c_{n}\chi _{n}(x),}$

where

${\displaystyle c_{n}={\frac {1}{2T}}\int _{-T}^{T}f(t)\chi _{-n}(t)\,dt.}$

This means that the best approximation of f we can make using only the functions ${\displaystyle \chi _{n}(x)=e^{in\pi {\frac {x}{T}}}}$  for n from ${\displaystyle -N}$  to N is precisely the Nth partial sum of the Fourier series. An illustration of this is given on the animated plot of example 1.

### Convergence

While the Fourier coefficients an and bn can be formally defined for any function for which the integrals make sense, whether the series so defined actually converges to f(x) depends on the properties of f.

The simplest answer is that if f is square-integrable then

${\displaystyle \lim _{N\rightarrow \infty }\int _{-\pi }^{\pi }\left|f(x)-\sum _{n=-N}^{N}c_{n}\,\chi _{n}(x)\right|^{2}\,dx=0.}$

This is convergence in the norm of the space L2. The proof of this result is simple, unlike Lennart Carleson's much stronger result that the series actually converges almost everywhere.

There are many known tests that ensure that the series converges at a given point x, for example, if the function is differentiable at x. Even a jump discontinuity does not pose a problem: if the function has left and right derivatives at x, then the Fourier series will converge to the average of the left and right limits (but see Gibbs phenomenon). However, a fact that many find surprising, is that the Fourier series of a continuous function need not converge pointwise.

This unpleasant situation is counter-balanced by a theorem by Dirichlet which states that if f is ${\displaystyle 2T}$ -periodic and piecewise continuously differentiable function, then its Fourier series converges pointwise and ${\displaystyle \sum _{n\in \mathbb {Z} }c_{n}\chi _{n}(x)={\frac {f(x^{+})+f(x^{-})}{2}}}$ , where ${\displaystyle f(x^{+})=\lim _{t\rightarrow x,t>x}f(x)}$  and ${\displaystyle f(x^{-})=\lim _{t\rightarrow x,t . If f is continuous as well as piecewise continuously differentiable, then the Fourier series converges uniformly.

In 1922, Andrey Kolmogorov published an article entitled Une série de Fourier-Lebesgue divergente presque partout in which he gave an example of a Lebesgue-integrable function whose Fourier series diverges almost everywhere. This function is not in ${\displaystyle L^{2}(\mu )}$ .

### Plancherel's and Parseval's theorems

Another important property of the Fourier series is the Plancherel theorem. Let ${\displaystyle f,g\in L^{2}(\mu )}$  and ${\displaystyle c_{n}(f),c_{n}(g)}$  be the corresponding complex Fourier coefficients. Then

${\displaystyle \sum _{n\in \mathbb {Z} }c_{n}(f){\overline {c_{n}(g)}}={\frac {1}{2T}}\int _{-T}^{T}f(x){\overline {g(x)}}\,dx}$

where ${\displaystyle {\overline {z}}}$  denotes the conjugate of z.

Parseval's theorem, a special case of the Plancherel theorem, states that:

${\displaystyle \sum _{n\in \mathbb {Z} }|c_{n}(f)|^{2}={\frac {1}{2T}}\int _{-T}^{T}|f(x)|^{2}\,dx}$

which can be restated with the real Fourier coefficients:

${\displaystyle {\frac {a_{0}^{2}}{4}}+{\frac {1}{2}}\sum _{n=1}^{\infty }\left(a_{n}^{2}+b_{n}^{2}\right)={\frac {1}{2T}}\int _{-T}^{T}|f(x)|^{2}\,dx.}$

These theorems may be proven using the orthogonality relationships. They can be interpreted physically by saying that writing a signal as a Fourier series does not change its energy.