# Fourier series

In mathematics, a Fourier series decomposes a periodic function into a sum of simple oscillating functions, namely sines and cosines. The study of Fourier series is a branch of Fourier analysis. Fourier series were introduced by Joseph Fourier (1768–1830) for the purpose of solving the heat equation in a metal plate, it led to a revolution in mathematics, forcing mathematicians to reexamine the foundations of mathematics and leading to many modern theories such as Lebesgue integration.

The heat equation is a partial differential equation. Prior to Fourier's work, there was no known solution to the heat equation in a general situation. Although particular solutions were known if the heat source behaved in a simple way, in particular if the heat source was a sine or cosine wave. These simple solutions are now sometimes called eigensolutions. Fourier's idea was to model a complicated heat source as a superposition (or linear combination) of simple sine and cosine waves, and to write the solution as a superposition of the corresponding eigensolutions. This superposition or linear combination is called the Fourier series.

Although the original motivation was to solve the heat equation, it later became obvious that the same techniques could be applied to a wide array of mathematical and physical problems. The basic results are very easy to understand using the modern theory.

The Fourier series has many applications in electrical engineering, vibration analysis, acoustics, optics, signal processing, image processing, etc.

## Historical development

Fourier series are named in honor of Joseph Fourier (1768-1830), who made important contributions to the study of trigonometric series, after preliminary investigations by Madhava, Nilakantha Somayaji, Jyesthadeva, Leonhard Euler, Jean le Rond d'Alembert, and Daniel Bernoulli. He applied this technique to find the solution of the heat equation, publishing his initial results in 1807 and 1811, and publishing his Théorie analytique de la chaleur in 1822.

From a modern point of view, Fourier's results are somewhat informal, due to the lack of a precise notion of function and integral in the early nineteenth century (for example, one wondered[citation needed] if a function defined on two intervals with two different formulas was still a function). Later, Dirichlet and Riemann expressed Fourier's results with greater precision and formality.

### A revolutionary article

 “ ${\displaystyle \varphi (y)=a\cos {\frac {\pi y}{2}}+a'\cos 3{\frac {\pi y}{2}}+a''\cos 5{\frac {\pi y}{2}}+\cdots .}$ Multiplying both sides by ${\displaystyle \cos(2i+1){\frac {\pi y}{2}}}$, and then integrating from ${\displaystyle y=-1}$ to ${\displaystyle y=+1}$ yields: ${\displaystyle a_{i}=\int _{-1}^{1}\varphi (y)\cos(2i+1){\frac {\pi y}{2}}\,dy.}$ ” —Joseph Fourier, Mémoire sur la propagation de la chaleur dans les corps solides, pp. 218--219.[1]

In these few lines, which are surprisingly close to the modern formalism used in Fourier series, Fourier unwittingly revolutionized both mathematics and physics. Although similar trigonometric series were previously used by Euler, d'Alembert, Daniel Bernoulli and Gauss, Fourier believed that such trigonometric series could represent arbitrary functions. While this is not true, the attempts over many years to clarify this idea have led to important discoveries in the theories of convergence, function spaces, and harmonic analysis.

When Fourier submitted his paper in 1807, the committee (composed of no lesser mathematicians than Lagrange, Laplace, Malus and Legendre, among others) concluded: ...the manner in which the author arrives at these equations is not exempt of difficulties and [...] his analysis to integrate them still leaves something to be desired on the score of generality and even rigour.

### The birth of harmonic analysis

Since Fourier's time, many different approaches to defining and understanding the concept of Fourier series have been discovered, all of which are consistent with one another, but each of which emphasizes different aspects of the topic. Some of the more powerful and elegant approaches are based on mathematical ideas and tools that were not available at the time Fourier completed his original work. Fourier originally defined the Fourier series for real-valued functions of real arguments, and using the sine and cosine functions as the basis set for the decomposition.

Many other Fourier-related transforms have since been defined, extending the initial idea to other applications. This general area of inquiry is now sometimes called harmonic analysis.

## Definition

In this section, f(x) denotes a function of the real variable x. This function is usually taken to be periodic, of period 2π, which is to say that f(x+2π) = f(x), for all real numbers x. We will show how to write such a function as an infinite sum, or series. We will start by using an infinite sum of sine and cosine functions of the interval [-π,π], as Fourier did (see the quote above), and we will then discuss different formulations and generalizations.

### Fourier's formula for 2π-periodic functions using sines and cosines

For a 2π-periodic function f(x) the numbers

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

and

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

are called the Fourier coefficients of f. The infinite sum

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

is the Fourier series for f on the interval [-π,π]. The Fourier series does not always converge, so there may not be equality in the formula above. It is one of the main questions in Harmonic analysis to decide when equality holds. If a function is square-integrable on the interval [-π,π], then it can be represented in that interval by the previous formula.

### Example: a simple Fourier series

File:Periodic identity.png
Plot of a periodic identity function - a sawtooth wave.
File:Periodic identity function.gif
Animated plot of the first five successive partial Fourier series.

We now use the formulae above to give a Fourier series expansion of a very simple function. Consider a sawtooth function (as depicted in the figure):

${\displaystyle f(x)=x,\quad \mathrm {for} \quad -\pi
${\displaystyle f(x+2\pi )=f(x),\quad \mathrm {for} \quad -\infty

In this case, the Fourier coefficients are given by

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

And therefore:

File:Fourier heat in a plate.png
Heat distribution in a metal plate, using Fourier's method.

One notices that the Fourier series expansion of our function looks much less simple than the formula f(x)=x, and so it is not immediately apparent why one would need this Fourier series. While there are many applications, we cite Fourier's motivation of solving the heat equation. For example, consider a metal plate in the shape of a square whose side measures π meters, with coordinates ${\displaystyle (x,y)\in [0,\pi ]\times [0,\pi ]}$. If there is no heat source within the plate, and if three of the four sides are held at 0 degrees celsius, while the fourth side, given by y=π, is maintained at the temperature gradient T(x,π) = x degrees celsius, for x in (0,π), then one can show that the stationary heat distribution (or the heat distribution after a long period of time has elapsed) is given by

${\displaystyle T(x,y)=2\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}}{n}}\sin(nx){\sinh(ny) \over \sinh(n\pi )}.}$

Here, sinh is the hyperbolic sine function. This solution of the heat equation is obtained by multiplying each term of (Eq.1) by sinh(ny)/sinh(nπ). While our example function f(x) seems to have a needlessly complicated Fourier series, the heat distribution T(x,y) is nontrivial. The function T cannot be written as a closed-form expression. This method of solving the heat problem was only made possible by Fourier's work.

Another application of this Fourier series is to solve the Basel problem by using Parseval's theorem. The example generalizes and one may compute zeta(2n), for any positive integer n.

### The modern version using complex exponentials

We can use Euler's formula, ${\displaystyle e^{inx}=\cos(nx)+i\sin(nx)}$, where ${\displaystyle i}$ is the imaginary unit, to give a more concise formula:

${\displaystyle f(x)=\sum _{n=-\infty }^{\infty }c_{n}e^{inx}.}$

The Fourier coefficients are then given by:

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

The Fourier coefficients ${\displaystyle a_{n},b_{n},c_{n}}$ are related via

${\displaystyle a_{n}={c_{n}+c_{-n}}}$ for ${\displaystyle n=0,1,2,\dots ,}$

and

${\displaystyle b_{n}=i(c_{n}-c_{-n})}$ for ${\displaystyle n=1,2,\dots }$

The notation ${\displaystyle c_{n}}$ is inadequate for discussing the Fourier coefficients of several different functions. Therefore it is customarily replaced by a modified form of ${\displaystyle f\,}$ (in this case), such as ${\displaystyle F\,}$ or ${\displaystyle {\hat {f}},}$  and functional notation often replaces subscripting.  Thus:

{\displaystyle {\begin{aligned}f(x)&=\sum _{n=-\infty }^{\infty }{\hat {f}}(n)\cdot e^{inx}\\&=\sum _{n=-\infty }^{\infty }F[n]\cdot e^{inx}\quad {\mbox{(engineering)}}.\end{aligned}}}

In various fields of science, the sequence has other names, such as characteristic function (probability theory). In engineering, particularly when variable x represents time, the sequence is called a frequency domain representation. Square brackets are often used to emphasize that the domain of this function is a discrete set of frequencies.

### Fourier series on a general interval [a,b]

Let G[0], G[±1], G[±2], be real or complex coefficients. The Fourier series:

${\displaystyle g(x)=\sum _{n=-\infty }^{\infty }G[n]\cdot e^{i2\pi {\frac {n}{\tau }}x}\,}$

is a periodic function, whose period is ${\displaystyle \tau \,}$ on the domain ${\displaystyle \mathbb {R} .}$  If a function is square-integrable in the interval ${\displaystyle [a,\ a+\tau ],}$  it can be represented in that interval by the formula above. If g(x) is integrable, then the Fourier coefficients are given by:

${\displaystyle G[n]={\frac {1}{\tau }}\int _{a}^{a+\tau }g(x)\cdot e^{-i2\pi {\frac {n}{\tau }}x}\,dx.}$

Note that if the function to be represented is also ${\displaystyle \tau \,}$-periodic, then ${\displaystyle a\,}$ is an arbitrary choice. Two popular choices are ${\displaystyle a=0\,}$ and ${\displaystyle a=-\tau /2.\,}$

Another commonly used frequency domain representation uses the Fourier series coefficients to modulate a Dirac comb:

${\displaystyle G(f)\ {\stackrel {\mathrm {def} }{=}}\ \sum _{n=-\infty }^{\infty }G[n]\cdot \delta \left(f-{\frac {n}{\tau }}\right)}$

where variable ${\displaystyle f\,}$ represents a continuous frequency domain. When variable ${\displaystyle x\,}$ has units of seconds, ${\displaystyle f\,}$ has units of hertz. The "teeth" of the comb are spaced at multiples (i.e. harmonics) of  ${\displaystyle 1/\tau ,\,}$  which is called the fundamental frequency. The original ${\displaystyle g(x)\,}$ can be recovered from this representation by an inverse Fourier transform.[2] The function ${\displaystyle G(f)\,}$ is therefore commonly referred to as a Fourier transform, even though the Fourier integral of a periodic function is not convergent.[3]

### Fourier series on a square

We can also define the Fourier series for functions of two variables x and y in the square [-π,π]×[-π,π]:

${\displaystyle f(x,y)=\sum _{j,k\in \mathbb {Z} }c_{j,k}e^{ijx}e^{iky},}$
${\displaystyle c_{j,k}={1 \over 4\pi ^{2}}\int _{-\pi }^{\pi }\int _{-\pi }^{\pi }f(x,y)e^{-ijx}e^{-iky}\,dx\,dy\ .}$

Aside from being useful for solving partial differential equations such as the heat equation, one notable application of Fourier series on the square is in image compression. In particular, the jpeg image compression standard uses the two-dimensional discrete cosine transform, which is a Fourier transform using the cosine basis functions.

### Hilbert space interpretation

In the language of Hilbert spaces, the set of functions ${\displaystyle \{e_{n}=e^{inx},n\in \mathbb {Z} \}}$ is an orthonormal basis for the space ${\displaystyle L^{2}([-\pi ,\pi ])}$ of square-integrable functions of ${\displaystyle [-\pi ,\pi ]}$. This space is actually a Hilbert space with an inner product given by:

${\displaystyle \langle f,g\rangle \ {\stackrel {\mathrm {def} }{=}}\ {\frac {1}{2\pi }}\int _{-\pi }^{\pi }f(x){\overline {g(x)}}\,dx.}$

The basic Fourier series result for Hilbert spaces can be written as

${\displaystyle f=\sum _{n=-\infty }^{\infty }\langle f,e_{n}\rangle e_{n}.}$

This corresponds exactly to the complex exponential formulation given above. The version with sines and cosines is also justified with the Hilbert space interpretation. Clearly, the sines and cosines form an orthonormal set:

${\displaystyle \int _{-\pi }^{\pi }\cos(mx)\,\cos(nx)\,dx=\pi \delta _{mn},}$
${\displaystyle \int _{-\pi }^{\pi }\sin(mx)\,\sin(nx)\,dx=\pi \delta _{mn}}$

(where ${\displaystyle \delta _{mn}}$ is the Kronecker delta), and

${\displaystyle \int _{-\pi }^{\pi }\cos(mx)\,\sin(nx)\,dx=0.}$

The density of their span is a consequence of the Stone-Weierstrass theorem.

## Properties

We say that ${\displaystyle f\in C^{k}(\mathbb {T} )}$ if ${\displaystyle f}$ is a function of ${\displaystyle \mathbb {R} }$ which is ${\displaystyle k}$ times differentiable, its kth derivative is continuous, and is ${\displaystyle 2\pi }$-periodic.

• If f is a ${\displaystyle 2\pi }$-periodic odd function, then ${\displaystyle a_{n}=0}$ for all ${\displaystyle n}$.
• If f is a ${\displaystyle 2\pi }$-periodic even function, then ${\displaystyle b_{n}=0}$ for all ${\displaystyle n}$.
• If f is integrable, ${\displaystyle \lim _{|n|\rightarrow \infty }{\hat {f}}(n)=0}$, ${\displaystyle \lim _{n\rightarrow +\infty }a_{n}=0}$ and ${\displaystyle \lim _{n\rightarrow +\infty }b_{n}=0.}$ This result is known as the Riemann-Lebesgue Lemma.
• If ${\displaystyle f\in C^{1}(\mathbb {T} )}$, then the Fourier coefficients ${\displaystyle {\hat {f'}}(n)}$ of the derivative ${\displaystyle f'(t)}$ can be expressed in terms of the Fourier coefficients ${\displaystyle {\hat {f}}(n)}$ of the function ${\displaystyle f(t)}$, via the formula ${\displaystyle {\hat {f'}}(n)=in{\hat {f}}(n)}$.
• If ${\displaystyle f\in C^{k}(\mathbb {T} )}$, then ${\displaystyle {\widehat {f^{(k)}}}(n)=(in)^{k}{\hat {f}}(n)}$. In particular, since ${\displaystyle {\widehat {f^{(k)}}}(n)}$ tends to zero, we have that ${\displaystyle |n|^{k}{\hat {f}}(n)}$ tends to zero, which means that the Fourier coefficients converge to zero faster than the kth power of n.
• THEOREM (Parseval). If ${\displaystyle f\in L^{2}([-\pi ,\pi ])}$, then ${\displaystyle \sum _{n=-\infty }^{\infty }|{\hat {f}}(n)|^{2}={\frac {1}{2\pi }}\int _{-\pi }^{\pi }|f(x)|^{2}\,dx}$.
• THEOREM (Plancherel). If ${\displaystyle c_{0},\,c_{\pm 1},\,c_{\pm 2},\ldots }$ are coefficients and ${\displaystyle \sum _{n=-\infty }^{\infty }|c_{n}|^{2}<\infty }$ then there is a unique function ${\displaystyle f\in L^{2}([-\pi ,\pi ])}$ such that ${\displaystyle {\hat {f}}(n)=c_{n}}$ for every ${\displaystyle n}$.
• The Convolution theorem states that if f and g are in ${\displaystyle L^{2}([-\pi ,\pi ])}$, then ${\displaystyle {\widehat {f*g}}(n)={\hat {f}}(n){\hat {g}}(n)}$, where ${\displaystyle f*g}$ denotes the ${\displaystyle 2\pi }$-periodic convolution of f and g.

## General case

There are many possible avenues for generalizing Fourier series. The study of Fourier series and its generalizations is called Harmonic analysis.

### Generalized functions

One can extend the notion of Fourier coefficients to functions which are not square-integrable, and even to objects which are not functions. This is very useful in engineering and applications because we often need to take the Fourier transform of a Dirac delta function. The Dirac delta ${\displaystyle \delta }$ is not actually a function, it is a measure but it still has a Fourier transform, and ${\displaystyle {\hat {\delta }}(n)={1 \over 2\pi }}$ for every ${\displaystyle n}$. This generalization enlarges the domain of definition of the Fourier transform from ${\displaystyle L^{2}([-\pi ,\pi ])}$ to a superset of ${\displaystyle L^{2}}$. The Fourier series converges weakly.

### Compact groups

One of the interesting properties of the Fourier transform which we have mentioned, is that it carries convolutions to pointwise products. If that is the property which we seek to preserve, one can produce Fourier series on any compact group. Typical examples include those classical groups that are compact. This generalizes the Fourier transform to all spaces of the form ${\displaystyle L^{2}(G)}$, where ${\displaystyle G}$ is a compact group, in such a way that the Fourier transform carries convolutions to pointwise products. The Fourier series exists and converges in similar ways to the ${\displaystyle [-\pi ,\pi ]}$ case.

### Riemannian manifolds

File:AtomicOrbital n4 l2.png
The atomic orbitals of chemistry are spherical harmonics and can be used to produce Fourier series on the sphere.

If the domain is not a group, then there is no intrinsically defined convolution. However, if ${\displaystyle X}$ is a compact Riemannian manifold, it has a Laplace-Beltrami operator. The Laplace-Beltrami operator is the differential operator that corresponds to Laplace operator for the Riemannian manifold ${\displaystyle X}$. Then, by analogy, one can consider heat equations on ${\displaystyle X}$. Since Fourier arrived at his basis by attempting to solve the heat equation, the natural generalization is to use the eigensolutions of the Laplace-Beltrami operator as a basis. This generalizes Fourier series to spaces of the type ${\displaystyle L^{2}(X)}$, where ${\displaystyle X}$ is a Riemannian manifold. The Fourier series converges in ways similar to the ${\displaystyle [-\pi ,\pi ]}$ case. A typical example is to take X to be the sphere with the usual metric, in which case the Fourier basis consists of spherical harmonics.

### Locally compact Abelian groups

The generalization to compact groups discussed above does not generalize to noncompact, nonabelian groups. However, there is a straightfoward generalization to Locally Compact Abelian (LCA) groups.

This generalizes the Fourier transform to ${\displaystyle L^{1}(G)}$ or ${\displaystyle L^{2}(G)}$, where G is an LCA group. If ${\displaystyle G}$ is compact, one also obtains a Fourier series, which converges similarly to the ${\displaystyle [-\pi ,\pi ]}$ case, but if ${\displaystyle G}$ is noncompact, one obtains instead a Fourier integral. This generalization yields the usual Fourier transform when the underlying locally compact Abelian group is ${\displaystyle \mathbb {R} }$.

## Approximation and convergence of Fourier series

An important question for the theory as well as applications is that of convergence. In particular, it is often necessary in applications to replace the infinite series ${\displaystyle \sum _{-\infty }^{\infty }}$ by a finite one,

${\displaystyle S_{N}(x)=\sum _{n=-N}^{N}{\hat {f}}(n)e^{inx}.}$

This is called a partial sum. We would like to know, in which sense does SN(x) converge to f(x) as N tends to infinity.

### Least squares property

We say that p is a trigonometric polynomial of degree N when it is of the form

${\displaystyle p(x)=\sum _{n=-N}^{N}p_{n}e^{inx}.}$

Note that ${\displaystyle S_{N}(x)}$ is a trigonometric polynomial of degree N. Parseval's theorem implies that

THEOREM. ${\displaystyle S_{N}(x)}$ is the unique best trigonometric polynomial of degree ${\displaystyle N}$ approximating ${\displaystyle f(x)}$, in the sense that, for any trigonometric polynomial ${\displaystyle p\neq S_{N}}$ of degree ${\displaystyle N}$, we have ${\displaystyle \|S_{N}-f\|\lneqq \|p-f\|}$.

Here, the Hilbert space norm is

${\displaystyle \|g\|={\sqrt {{1 \over 2\pi }\int _{-\pi }^{\pi }|g(x)|^{2}\,dx}}.}$

### Convergence

Because of the least squares property, and because of the completeness of the Fourier basis, we obtain an elementary convergence result.

THEOREM. If ${\displaystyle f\in L^{2}([-\pi ,\pi ])}$, then the Fourier series converges in ${\displaystyle L^{2}([-\pi ,\pi ])}$, i.e., ${\displaystyle \|S_{N}-f\|}$ converges to 0 as ${\displaystyle N}$ goes to infinity.

We have already mentioned that if f is twice continuously differentiable, then ${\displaystyle n^{2}{\hat {f}}(n)}$ converges to zero as n goes to infinity. This immediately gives a second convergence result.

THEOREM. If ${\displaystyle f\in C^{2}(\mathbb {T} )}$, then ${\displaystyle \sup _{x}|f(x)-S_{N}(x)|\leq \sum _{|n|>N}|{\hat {f}}(n)|}$ converges to zero, i.e., ${\displaystyle S_{N}}$ converges to ${\displaystyle f}$ uniformly.

In particular, ${\displaystyle S_{N}}$ converges to f pointwise.

Many further cases are discussed in the main article, Convergence of Fourier series, ranging from the moderately simple result that the series converges at x if f is differentiable at x, to Lennart Carleson's much more sophisticated result that the Fourier series of an ${\displaystyle L^{2}}$ function actually converges almost everywhere.

### Divergence

Since Fourier series have such good convergence properties, many are often surprised by some of the negative results. For example, the Fourier series of a continuous T-periodic function need not converge pointwise.

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.

## Notes

1. Gallica - Fourier, Jean-Baptiste-Joseph (1768-1830). Oeuvres de Fourier. 1888
2. Formally, the inverse transform is given by:
{\displaystyle {\begin{aligned}{\mathcal {F}}^{-1}\{G(f)\}&={\mathcal {F}}^{-1}\left\{\sum _{n=-\infty }^{\infty }G[n]\cdot \delta \left(f-{\frac {n}{\tau }}\right)\right\}\\&=\sum _{n=-\infty }^{\infty }G[n]\cdot {\mathcal {F}}^{-1}\left\{\delta \left(f-{\frac {n}{\tau }}\right)\right\}\\&=\sum _{n=-\infty }^{\infty }G[n]\cdot e^{i2\pi {\frac {n}{\tau }}x}\cdot {\mathcal {F}}^{-1}\{\delta (f)\}\\&=\sum _{n=-\infty }^{\infty }G[n]\cdot e^{i2\pi {\frac {n}{\tau }}x}\quad =\ \ g(x)\end{aligned}}}
3. Since the integral defining the Fourier transform of a periodic function is not convergent, it is necessary to view the periodic function and its transform as distributions. In this sense ${\displaystyle {\mathcal {F}}\{e^{i2\pi {\frac {n}{\tau }}x}\}}$ is a Dirac delta function, which is an example of a distribution.

## References

• Joseph Fourier, translated by Alexander Freeman (published 1822, translated 1878, re-released 2003). The Analytical Theory of Heat. Dover Publications. ISBN 0-486-49531-0. Check date values in: |year= (help) 2003 unabridged republication of the 1878 English translation by Alexander Freeman of Fourier's work Théorie Analytique de la Chaleur, originally published in 1822.
• Yitzhak Katznelson, An introduction to harmonic analysis, Second corrected edition. Dover Publications, Inc., New York, 1976. ISBN 0-486-63331-4
• Felix Klein, Development of mathematics in the 19th century. Mathsci Press Brookline, Mass, 1979. Translated by M. Ackerman from Vorlesungen über die Entwicklung der Mathematik im 19 Jahrhundert, Springer, Berlin, 1928.
• Walter Rudin, Principles of mathematical analysis, Third edition. McGraw-Hill, Inc., New York, 1976. ISBN 0-07-054235-X
• William E. Boyce and Richard C. DiPrima, Elementary Differential Equations and Boundary Value Problems, Eighth edition. John Wiley & Sons, Inc., New Jersey, 2005. ISBN 0-471-43338-1