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 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
$\varphi(y)=a\cos\frac{\pi y}{2}+a'\cos 3\frac{\pi y}{2}+a''\cos5\frac{\pi y}{2}+\cdots.$

Multiplying both sides by $\cos(2i+1)\frac{\pi y}{2}$, and then integrating from $y=-1$ to $y=+1$ yields:

$a_i=\int_{-1}^1\varphi(y)\cos(2i+1)\frac{\pi y}{2}\,dy.$

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&pi;, which is to say that f(x+2&pi;) = 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 [-&pi;,&pi;], as Fourier did (see the quote above), and we will then discuss different formulations and generalizations.

Fourier's formula for 2&pi;-periodic functions using sines and cosines
For a 2&pi;-periodic function f(x) the numbers


 * $$a_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x) \cos(nx)\, dx$$

and


 * $$b_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x) \sin(nx)\, dx$$

are called the Fourier coefficients of f. The infinite sum


 * $$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 [-&pi;,&pi;]. 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 [-&pi;,&pi;], then it can be represented in that interval by the previous formula.

Example: a simple 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):


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

In this case, the Fourier coefficients are given by


 * $$\begin{align}

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{align}$$

And therefore:



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 &pi; meters, with coordinates $$(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=&pi;, is maintained at the temperature gradient T(x,&pi;) = x degrees celsius, for x in (0,&pi;), then one can show that the stationary heat distribution (or the heat distribution after a long period of time has elapsed) is given by


 * $$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&pi;). 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, $$e^{inx}=\cos(nx)+i\sin(nx)$$, where $$i$$ is the imaginary unit, to give a more concise formula:


 * $$f(x) = \sum_{n=-\infty}^{\infty} c_n e^{inx}.$$

The Fourier coefficients are then given by:


 * $$c_n = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x) e^{-inx}\, dx.$$

The Fourier coefficients $$a_n, b_n, c_n$$ are related via


 * $$a_n = { c_n + c_{-n} }$$ for $$n=0,1,2,\dots,$$

and


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

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



\begin{align} 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{align} $$

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:


 * $$g(x)=\sum_{n=-\infty}^\infty G[n]\cdot e^{i 2\pi \frac{n}{\tau} x}\,$$

is a periodic function, whose period is $$\tau\,$$ on the domain $$\mathbb{R}.$$ If a function is square-integrable in the interval $$[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:


 * $$G[n] = \frac{1}{\tau}\int_a^{a+\tau} g(x)\cdot e^{-i 2\pi \frac{n}{\tau} x}\, dx.$$

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

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



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

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

Fourier series on a square
We can also define the Fourier series for functions of two variables x and y in the square [-&pi;,&pi;]&times;[-&pi;,&pi;]:


 * $$f(x,y) = \sum_{j,k \in \mathbb{Z}} c_{j,k}e^{ijx}e^{iky},$$
 * $$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 $$\{ e_n = e^{i n x},n\in\mathbb{Z}\}$$ is an orthonormal basis for the space $$L^2([-\pi,\pi])$$ of square-integrable functions of $$[-\pi,\pi]$$. This space is actually a Hilbert space with an inner product given by:


 * $$\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


 * $$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:


 * $$\int_{-\pi}^{\pi} \cos(mx)\, \cos(nx)\, dx = \pi \delta_{mn},$$
 * $$\int_{-\pi}^{\pi} \sin(mx)\, \sin(nx)\, dx = \pi \delta_{mn}$$

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


 * $$\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 $$f \in C^k(\mathbb{T})$$ if $$f$$ is a function of $$\mathbb{R}$$ which is $$k$$ times differentiable, its kth derivative is continuous, and is $$2\pi$$-periodic.


 * If f is a $$2\pi$$-periodic odd function, then $$a_n=0$$ for all $$n$$.


 * If f is a $$2\pi$$-periodic even function, then $$b_n=0$$ for all $$n$$.


 * If f is integrable, $$\lim_{|n|\rightarrow \infty}\hat{f}(n)=0$$, $$\lim_{n\rightarrow +\infty}a_n=0$$ and $$\lim_{n\rightarrow +\infty}b_n=0.$$ This result is known as the Riemann-Lebesgue Lemma.


 * If $$f \in C^1(\mathbb{T})$$, then the Fourier coefficients $$\hat{f'}(n)$$ of the derivative $$f'(t)$$ can be expressed in terms of the Fourier coefficients $$\hat{f}(n)$$ of the function $$f(t)$$, via the formula $$\hat{f'}(n) = in \hat{f}(n)$$.


 * If $$f \in C^k(\mathbb{T})$$, then $$\widehat{f^{(k)}}(n) = (in)^k \hat{f}(n)$$. In particular, since $$\widehat{f^{(k)}}(n)$$ tends to zero, we have that $$|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 $$f \in L^2([-\pi,\pi])$$, then $$\sum_{n=-\infty}^{\infty} |\hat{f}(n)|^2 = \frac{1}{2\pi}\int_{-\pi}^{\pi} |f(x)|^2 \, dx$$.


 * THEOREM (Plancherel). ''If $$c_0,\, c_{\pm 1},\, c_{\pm 2},\ldots$$ are coefficients and $$\sum_{n=-\infty}^\infty |c_n|^2 < \infty$$ then there is a unique function $$f\in L^2([-\pi,\pi])$$ such that $$\hat{f}(n) = c_n$$ for every $$n$$.


 * The Convolution theorem states that if f and g are in $$L^2([-\pi,\pi])$$, then $$\widehat{f*g}(n) = \hat{f}(n)\hat{g}(n)$$, where $$f*g$$ denotes the $$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 $$\delta$$ is not actually a function, it is a measure but it still has a Fourier transform, and $$\hat{\delta}(n)={1 \over 2\pi}$$ for every $$n$$. This generalization enlarges the domain of definition of the Fourier transform from $$L^2([-\pi,\pi])$$ to a superset of $$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 $$L^2(G)$$, where $$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 $$[-\pi,\pi]$$ case.

Riemannian manifolds


If the domain is not a group, then there is no intrinsically defined convolution. However, if $$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 $$X$$. Then, by analogy, one can consider heat equations on $$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 $$L^2(X)$$, where $$X$$ is a Riemannian manifold. The Fourier series converges in ways similar to the $$[-\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 $$L^1(G)$$ or $$L^2(G)$$, where G is an LCA group. If $$G$$ is compact, one also obtains a Fourier series, which converges similarly to the $$[-\pi,\pi]$$ case, but if $$G$$ is noncompact, one obtains instead a Fourier integral. This generalization yields the usual Fourier transform when the underlying locally compact Abelian group is $$\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 $$\sum_{-\infty}^\infty$$ by a finite one,


 * $$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


 * $$p(x)=\sum_{n=-N}^N p_n e^{inx}.$$

Note that $$S_N(x)$$ is a trigonometric polynomial of degree N. Parseval's theorem implies that

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

Here, the Hilbert space norm is


 * $$\| 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 $$f\in L^2([-\pi,\pi])$$, then the Fourier series converges in $$L^2([-\pi,\pi])$$, i.e., $$\|S_N - f\|$$ converges to 0 as $$N$$ goes to infinity.

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

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

In particular, $$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 $$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.