A Fourier series () is a series expansion of a periodic function into a sum of trigonometric functions. The Fourier series is an example of a trigonometric series. By expressing a function as a sum of sines and cosines, many problems involving the function become easier to analyze because trigonometric functions are well understood. For example, Fourier series were first used by Joseph Fourier to find solutions to the heat equation. This application is possible because the derivatives of trigonometric functions fall into simple patterns. Fourier series cannot be used to approximate arbitrary functions, because most functions have infinitely many terms in their Fourier series, and the series do not always converge. Well-behaved functions, for example smooth functions, have Fourier series that converge to the original function. The coefficients of the Fourier series are determined by integrals of the function multiplied by trigonometric functions, described in .
The study of the convergence of Fourier series focus on the behaviors of the partial sums, which means studying the behavior of the sum as more and more terms from the series are summed. The figures below illustrate some partial Fourier series results for the components of a square wave.
<gallery widths="224" heights="224">
File:SquareWaveFourierArrows,rotated,nocaption 20fps.gif|A square wave (represented as the blue dot) is approximated by its sixth partial sum (represented as the purple dot), formed by summing the first six terms (represented as arrows) of the square wave's Fourier series. Each arrow starts at the vertical sum of all the arrows to its left (i.e. the previous partial sum).
File:Fourier Series.svg|The first four partial sums of the Fourier series for a square wave. As more harmonics are added, the partial sums converge to the square wave.
File:Fourier series and transform.gif|Function <math>s_6(x)</math> (in red) is a Fourier series sum of 6 harmonically related sine waves (in blue). Its Fourier transform <math>S(f)</math> is a frequency-domain representation that reveals the amplitudes of the summed sine waves.
</gallery>
Fourier series are closely related to the Fourier transform, a more general tool that can even find the frequency information for functions that are not periodic. Periodic functions can be identified with functions on a circle; for this reason Fourier series are the subject of Fourier analysis on the circle group, denoted by <math>\mathbb{T}</math> or <math>S_1</math>. The Fourier transform is also part of Fourier analysis, but is defined for functions on <math>\mathbb{R}^n</math>.
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 in Fourier's time. Fourier originally defined the Fourier series for real-valued functions of real arguments, and used the sine and cosine functions in the decomposition. Many other Fourier-related transforms have since been defined, extending his initial idea to many applications and birthing an area of mathematics called Fourier analysis.
History
The Fourier series is named in honor of Jean-Baptiste Joseph Fourier (1768–1830), who made important contributions to the study of trigonometric series, after preliminary investigations by Leonhard Euler, Jean le Rond d'Alembert, and Daniel Bernoulli. Fourier introduced the series for the purpose of solving the heat equation in a metal plate, publishing his initial results in his 1807 Mémoire sur la propagation de la chaleur dans les corps solides (Treatise on the propagation of heat in solid bodies), and publishing his Théorie analytique de la chaleur (Analytical theory of heat) in 1822. The Mémoire introduced Fourier analysis, specifically Fourier series. Through Fourier's research the fact was established that an arbitrary (at first, continuous and later generalized to any piecewise-smooth Early ideas of decomposing a periodic function into the sum of simple oscillating functions date back to the 3rd century BC, when ancient astronomers proposed an empiric model of planetary motions, based on deferents and epicycles.
Independently of Fourier, astronomer Friedrich Wilhelm Bessel introduced Fourier series to solve Kepler's equation. His work was published in 1819, unaware of Fourier's work which remained unpublished until 1822.
The heat equation is a partial differential equation. Prior to Fourier's work, no solution to the heat equation was known in the general case, 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.
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. Later, Peter Gustav Lejeune Dirichlet and Bernhard Riemann expressed Fourier's results with greater precision and formality.
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, and especially those involving linear differential equations with constant coefficients, for which the eigensolutions are sinusoids. The Fourier series has many such applications in electrical engineering, vibration analysis, acoustics, optics, signal processing, image processing, quantum mechanics, econometrics, shell theory, etc.
Beginnings
Joseph Fourier wrote
This immediately gives any coefficient a<sub>k</sub> of the trigonometric series for φ(y) for any function which has such an expansion. It works because if φ has such an expansion, then (under suitable convergence assumptions) the integral
<math display="block">\begin{align}
&\int_{-1}^1\varphi(y)\cos(2k+1)\frac{\pi y}{2}\,dy \\
&= \int_{-1}^1\left(a\cos\frac{\pi y}{2}\cos(2k+1)\frac{\pi y}{2}+a'\cos 3\frac{\pi y}{2}\cos(2k+1)\frac{\pi y}{2}+\cdots\right)\,dy
\end{align}</math>
can be carried out term-by-term. But all terms involving <math>\cos(2j+1)\frac{\pi y}{2} \cos(2k+1)\frac{\pi y}{2}</math> for vanish when integrated from −1 to 1, leaving only the <math>k^{\text{th</math> term, which is 1.
In these few lines, which are close to the modern formalism used in Fourier series, Fourier 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 any arbitrary function. In what sense that is actually true is a somewhat subtle issue and 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 a later competition essay in 1811, the committee (which included 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".
Fourier's motivation
thumb|right|This resulting heat distribution in a metal plate is easily solved using Fourier's method
The Fourier series expansion of the sawtooth function (below) looks more complicated than the simple formula <math>s(x)=\tfrac{x}{\pi}</math>, so it is not immediately apparent why one would need the Fourier series. While there are many applications, Fourier's motivation was in solving the heat equation. For example, consider a metal plate in the shape of a square whose sides measure <math>\pi</math> meters, with coordinates <math>(x,y) \in [0,\pi] \times [0,\pi]</math>. 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 <math>y=\pi</math>, is maintained at the temperature gradient <math>T(x,\pi)=x</math> degrees Celsius, for <math>x</math> in <math>(0,\pi)</math>, then one can show that the stationary heat distribution (or the heat distribution after a long time has elapsed) is given by
: <math>T(x,y) = 2\sum_{n=1}^\infty \frac{(-1)^{n+1{n} \sin(nx) {\sinh(ny) \over \sinh(n\pi)}.</math>
Here, <math>\sinh</math> is the hyperbolic sine function. This solution of the heat equation is obtained by multiplying each term of the equation from Analysis § Example by <math>\sinh(ny)/\sinh(n\pi)</math>. While our example function <math>s(x)</math> seems to have a needlessly complicated Fourier series, the heat distribution <math>T(x,y)</math> is nontrivial. The function <math>T</math> cannot be written as a closed-form expression. This method of solving the heat problem was made possible by Fourier's work.
Other applications
Another application is to solve the Basel problem by using Parseval's theorem. The example generalizes and one may compute ζ(2n), for any positive integer n.
Definition
The Fourier series of a complex-valued -periodic function <math>s(x)</math>, integrable over the interval <math>[0,P]</math> on the real line, is defined as a trigonometric series of the form
<math display="block">\sum_{n=-\infty}^\infty c_n e^{i 2\pi \tfrac{n}{P} x }, </math>
such that the Fourier coefficients <math>c_n</math> are complex numbers defined by the integral
<math display="block">c_n = \frac{1}{P}\int_0^P s(x)\ e^{-i 2\pi \tfrac{n}{P} x }\,dx.</math>
The series does not necessarily converge (in the pointwise sense) and, even if it does, it is not necessarily equal to <math>s(x)</math>. Only when certain conditions are satisfied (e.g. if <math>s(x)</math> is continuously differentiable) does the Fourier series converge to <math>s(x)</math>, i.e.,
<math display="block">s(x) = \sum_{n=-\infty}^\infty c_n e^{i 2\pi \tfrac{n}{P} x }.</math>
For functions satisfying the Dirichlet sufficiency conditions, pointwise convergence holds. However, these are not necessary conditions and there are many theorems about different types of convergence of Fourier series (e.g. uniform convergence or mean convergence). The definition naturally extends to the Fourier series of a (periodic) distribution <math>s</math> (also called Fourier-Schwartz series). Then the Fourier series converges to <math>s(x)</math> in the distribution sense.
The process of determining the Fourier coefficients of a given function or signal is called analysis, while forming the associated trigonometric series (or its various approximations) is called synthesis.
Synthesis
A Fourier series can be written in several equivalent forms, shown here as the <math>N^\text{th}</math> partial sums <math>s_N(x)</math> of the Fourier series of <math>s(x)</math>:
right|thumb|350x350px|Fig 1. The top graph shows a non-periodic function <math>s(x)</math> in blue defined only over the red interval from 0 to P. The function can be analyzed over this interval to produce the Fourier series in the bottom graph. The Fourier series is always a periodic function, even if original function <math>s(x)</math> is not.
<br/>
The harmonics are indexed by an integer, <math>n,</math> which is also the number of cycles the corresponding sinusoids make in interval <math> P</math>. Therefore, the sinusoids have:
- a wavelength equal to <math>\tfrac{P}{n}</math> in the same units as <math>x</math>.
- a frequency equal to <math>\tfrac{n}{P}</math> in the reciprocal units of <math>x</math>.
These series can represent functions that are just a sum of one or more frequencies in the harmonic spectrum. In the limit <math>N\to\infty</math>, a trigonometric series can also represent the intermediate frequencies or non-sinusoidal functions because of the infinite number of terms.
Analysis
The coefficients can be given/assumed, such as a music synthesizer or time samples of a waveform. In the latter case, the exponential form of Fourier series synthesizes a discrete-time Fourier transform where variable <math>x</math> represents frequency instead of time. In general, the coefficients are determined by analysis of a given function <math>s(x)</math> whose domain of definition is an interval of length <math>P</math>.
The <math>\tfrac{2}{P}</math> scale factor follows from substituting into and utilizing the orthogonality of the trigonometric system. The equivalence of and follows from Euler's formula
<math display="block">
\cos x = \frac{e^{ix} + e^{-ix{2}, \quad \sin x = \frac{e^{ix} - e^{-ix{2i},</math>
resulting in:
with <math>c_{0}</math> being the mean value of <math>s</math> on the interval <math>P</math>. Conversely:
Example
thumb|right|400px|Plot of the [[sawtooth wave, a periodic continuation of the linear function <math>s(x)=x/\pi</math> on the interval <math>(-\pi,\pi]</math>]]
thumb|right|400px|Animated plot of the first five successive partial Fourier series
Consider a sawtooth function:
<math display="block">s(x) = s(x + 2\pi k) = \frac{x}{\pi}, \quad \mathrm{for } -\pi < x < \pi,\text{ and } k \in \mathbb{Z}.</math>
In this case, the Fourier coefficients are given by
<math display="block">\begin{align}
a_0 &= 0.\\
a_n & = \frac{1}{\pi}\int_{-\pi}^{\pi}s(x) \cos(nx)\,dx = 0, \quad n \ge 1. \\
b_n & = \frac{1}{\pi}\int_{-\pi}^{\pi}s(x) \sin(nx)\, dx\\
&= -\frac{2}{\pi n}\cos(n\pi) + \frac{2}{\pi^2 n^2}\sin(n\pi)\\
&= \frac{2\,(-1)^{n+1{\pi n}, \quad n \ge 1.\end{align}</math>
It can be shown that the Fourier series converges to <math>s(x)</math> at every point <math>x</math> where <math>s</math> is differentiable, and therefore:
<math display="block">\begin{align}
s(x) &= a_0 + \sum_{n=1}^\infty \left[a_n\cos\left(nx\right)+b_n \sin\left(nx\right)\right] \\[4pt]
&=\frac{2}{\pi}\sum_{n=1}^\infty \frac{(-1)^{n+1{n} \sin(nx), \quad \mathrm{for}\ (x-\pi)\ \text{is not a multiple of}\ 2\pi.
\end{align}</math>
When <math>x=\pi</math>, the Fourier series converges to 0, which is the half-sum of the left- and right-limit of <math>s</math> at <math>x=\pi</math>. This is a particular instance of the Dirichlet theorem for Fourier series.
This example leads to a solution of the Basel problem.
Amplitude-phase form
If the function <math>s(x)</math> is real-valued then the Fourier series can also be represented as
where <math>A_{n}</math> is the amplitude and <math>\varphi_{n}</math> is the phase shift of the <math>n^{th}</math> harmonic.
The equivalence of and follows from the trigonometric identity:
<math display="block">\cos\left(2\pi \tfrac{n}{P}x-\varphi_n\right) = \cos(\varphi_n)\cos\left(2\pi \tfrac{n}{P} x\right)
+ \sin(\varphi_n)\sin\left(2\pi \tfrac{n}{P} x\right),</math>
which implies
<math display="block>a_n = A_n \cos(\varphi_n)\quad \text{and}\quad b_n = A_n \sin(\varphi_n)</math>
right|thumb|300px|Fig 2. The blue curve is the cross-correlation of a square wave and a cosine template, as the phase lag of the template varies over one cycle. The amplitude and phase at the maximum value are the polar coordinates of one harmonic in the Fourier series expansion of the square wave. The corresponding rectangular coordinates can be determined by evaluating the correlation at just two samples separated by 90°.
are the rectangular coordinates of a vector written in polar coordinates as
<math display="block">A_n \angle \varphi_n = a_n + i b_{n}</math>
where
<math display="block">A_n = \sqrt{a_n^2 + b_n^2}\quad \text{and}\quad \varphi_n = \operatorname{atan2}(b_n, a_n) = -\operatorname{Arg}(c_n)</math>
An example of determining the parameter <math>\varphi_n </math> for one value of <math>n</math> is shown in Figure 2. It is the value of <math>\varphi </math> at the maximum correlation between <math>s(x)</math> and a cosine template, <math>\cos(2\pi \tfrac{n}{P} x - \varphi)</math>. The blue graph is the cross-correlation function, also known as a matched filter:
:<math>\begin{align}
\Chi(\varphi) &= \int_{P} s(x) \cdot \cos\left( 2\pi \tfrac{n}{P} x -\varphi \right)\, dx\quad \varphi \in \left[ 0, 2\pi \right]\\
&=\cos(\varphi)
\underbrace{\int_{P} s(x) \cdot \cos\left( 2\pi \tfrac{n}{P} x\right) dx}_{X(0)}
+
\sin(\varphi) \underbrace{\int_{P} s(x) \cdot \sin\left( 2\pi \tfrac{n}{P} x\right) dx}_{ X(\pi/2) }
\end{align}</math>
Fortunately, it is not necessary to evaluate this entire function, because its derivative is zero at the maximum:
<math display="block">X'(\varphi) = \sin(\varphi)\cdot X(0) - \cos(\varphi)\cdot X(\pi/2) = 0, \quad \textrm{at}\ \varphi = \varphi_n.</math> Hence
<math display="block">\varphi_n \equiv \arctan(b_n/a_n) = \arctan(X(\pi/2)/X(0)).
</math>
Common notations
The notation <math>c_n</math> is inadequate for discussing the Fourier coefficients of several different functions. Therefore, it is customarily replaced by a modified form of the function (<math>s,</math> in this case), such as <math>\widehat{s}(n)</math> or <math>S[n],</math> and functional notation often replaces subscripting:
:<math>\begin{align}
s(x) &= \sum_{n=-\infty}^\infty \widehat{s}(n)\cdot e^{i 2\pi \tfrac{n}{P} x} && \scriptstyle \text{common mathematics notation} \\
&= \sum_{n=-\infty}^\infty S[n]\cdot e^{i 2\pi \tfrac{n}{P} x} && \scriptstyle \text{common engineering notation}
\end{align}</math>
In engineering, particularly when the variable <math>x</math> represents time, the coefficient 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.
Another commonly used frequency domain representation uses the Fourier series coefficients to modulate a Dirac comb:
:<math>S(f) \ \triangleq \ \sum_{n=-\infty}^\infty S[n]\cdot \delta \left(f-\frac{n}{P}\right),</math>
where <math>f</math> represents a continuous frequency domain. When variable <math>x</math> has units of seconds, <math>f</math> has units of hertz. The "teeth" of the comb are spaced at multiples (i.e. harmonics) of <math>\tfrac{1}{P}</math>, which is called the fundamental frequency. <math>s(x)</math> can be recovered from this representation by an inverse Fourier transform:
:<math>\begin{align}
\mathcal{F}^{-1}\{S(f)\} &= \int_{-\infty}^\infty \left( \sum_{n=-\infty}^\infty S[n]\cdot \delta \left(f-\frac{n}{P}\right)\right) e^{i 2 \pi f x}\,df, \\[6pt]
&= \sum_{n=-\infty}^\infty S[n]\cdot \int_{-\infty}^\infty \delta\left(f-\frac{n}{P}\right) e^{i 2 \pi f x}\,df, \\[6pt]
&= \sum_{n=-\infty}^\infty S[n]\cdot e^{i 2\pi \tfrac{n}{P} x} \ \ \triangleq \ s(x).
\end{align}</math>
The constructed function <math>S(f)</math> is therefore commonly referred to as a Fourier transform, even though the Fourier integral of a periodic function is not convergent at the harmonic frequencies.
Table of common Fourier series
Some common pairs of periodic functions and their Fourier series coefficients are shown in the table below.
- <math>s(x)</math> designates a periodic function with period <math>P.</math>
- <math>a_0, a_n, b_n</math> designate the Fourier series coefficients (sine-cosine form) of the periodic function <math>s(x).</math>
{| class="wikitable"
!Time domain
<math>s(x)</math>
!Plot
!Frequency domain (sine-cosine form)
<math>\begin{align}& a_0 \\ & a_n \quad \text{for } n \ge 1 \\ & b_n \quad \text{for } n \ge 1\end{align}</math>
!Remarks
!Reference
|-
|<math>s(x)=A \left| \sin\left(\frac{2\pi}{P}x\right)\right| \quad \text{for } 0 \le x < P</math>
|center|250x250px
|<math>\begin{align}
a_0 = & \frac{2A}{\pi}\\
a_n = & \begin{cases}
\frac{-4A}{\pi}\frac{1}{n^2-1} & \quad n \text{ even} \\
0 & \quad n \text{ odd}
\end{cases}\\
b_n = & 0\\
\end{align}</math>
|Full-wave rectified sine
|
|-
|<math>s(x)=\begin{cases}
A \sin\left(\frac{2\pi}{P}x\right) & \quad \text{for } 0 \le x < P/2 \\
0 & \quad \text{for } P/2 \le x < P\\
\end{cases}
</math>
|center|250x250px
|<math>\begin{align}
a_0 = & \frac{A}{\pi}\\
a_n = & \begin{cases}
\frac{-2A}{\pi}\frac{1}{n^2-1} & \quad n \text{ even} \\
0 & \quad n \text{ odd}
\end{cases}\\
b_n = & \begin{cases}
\frac{A}{2} & \quad n=1 \\
0 & \quad n > 1
\end{cases}\\
\end{align}</math>
|Half-wave rectified sine
|
|-
| Shift in frequency / Modulation in time
| <math>s(x) \cdot e^{i 2\pi \frac{n_0}{P}x}</math>
| <math>S[n-n_0] \!</math>
| <math>n_0 \in \mathbb{Z}</math>
|
Derivative property
If <math>s</math> is a <math>P</math>-periodic function on <math>\mathbb{R}</math> which is <math>k</math> times differentiable, and its <math>k^{\text{th</math> derivative is continuous, then <math>s</math> belongs to the function space <math>C^k(\mathbb{R})</math>.
- If <math>s \in C^k(\mathbb{R})</math>, then the Fourier coefficients of the <math>k^{\text{th</math> derivative of <math>s</math> can be expressed in terms of the Fourier coefficients <math>\widehat{s}[n]</math> of <math>s</math>, via the formula <math display="block">\widehat{s^{(k)[n] = \left(i\frac{2\pi n}{P}\right)^k \widehat{s}[n].</math> In particular, since for any fixed <math>k\geq 1</math> we have <math>\widehat{s^{(k)[n]\to 0</math> as <math>n\to\infty</math>, it follows that <math>|n|^k\widehat{s}[n]</math> tends to zero, i.e., the Fourier coefficients converge to zero faster than the <math>k^{\text{th</math> power of <math>|n|</math>.
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<sup>2</sup>(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 case.
An alternative extension to compact groups is the Peter–Weyl theorem, which proves results about representations of compact groups analogous to those about finite groups.
thumb|right|The [[atomic orbitals of chemistry are partially described by spherical harmonics, which can be used to produce Fourier series on the sphere.]]
Riemannian manifolds
If the domain is not a group, then there is no intrinsically defined convolution. However, if <math>X</math> 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 <math>X</math>. Then, by analogy, one can consider heat equations on <math>X</math>. 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 <math>L^2(X)</math>, where <math>X</math> is a Riemannian manifold. The Fourier series converges in ways similar to the <math>[-\pi,\pi]</math> case. A typical example is to take <math>X</math> 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 straightforward generalization to Locally Compact Abelian (LCA) groups.
This generalizes the Fourier transform to <math>L^1(G)</math> or <math>L^2(G)</math>, where <math>G</math> is an LCA group. If <math>G</math> is compact, one also obtains a Fourier series, which converges similarly to the <math>[-\pi,\pi]</math> case, but if <math>G</math> is noncompact, one obtains instead a Fourier integral. This generalization yields the usual Fourier transform when the underlying locally compact Abelian group is <math>\mathbb{R}</math>.
Extensions
Fourier-Stieltjes series
Formally, the Fourier-Stieltjes series can be defined as the Fourier series whose coefficients are given by
<math display="block">c_n = \hat\mu(n)=\frac{1}{P}\int_0^P \ e^{-i 2\pi \tfrac{n}{P} x }\,d\mu(x), \quad \forall n\in\mathbb{Z},</math>
for any <math>\mu \in M</math>, where <math>M</math> is the space finite Borel measures on the interval <math>[0,P]</math>. As such, when <math>\mu \in M</math>, the function <math>\hat{\mu}(n)</math> is also referred to as a Fourier-Stieltjes transform.
This follows from an earlier and more concrete representation of a Radon measure (i.e. a locally finite Borel measure) on <math>\mathbb{R}</math>, given by F. Riesz. That is, if <math>F</math> is a function of bounded variation on the interval <math>[0,P]</math> then the Fourier coefficients can be expressed by the Riemann-Stieltjes integral
<math display="block">c_n = \frac{1}{P}\int_0^P \ e^{-i 2\pi \tfrac{n}{P} x }\,dF(x), \quad \forall n\in\mathbb{Z},</math>
called the Fourier-Stieltjes coefficients of <math>F</math>. As the distributional derivative of <math>F</math> is a Radon measure, it is subject to the Lebesgue decomposition and can be expressed as <math>dF = F'dx + dF_s</math>. If <math>dF_s = 0</math> the expression reduces to the original definition of the Fourier coefficients, hence a Fourier series is a Fourier-Stieltjes series.
The question whether or not <math>\mu</math> exists for a given sequence of <math>c_n</math> forms the basis of the trigonometric moment problem.
The Fourier series can be generalized still further from measures to distributions. If the Fourier coefficients are determined by a distribution <math>F \in \mathcal{D}'</math> then the series is sometimes described as a Fourier-Schwartz series.
While it is often extremely difficult to decide whether a given series is a Fourier or a Fourier-Stieltjes series, deciding whether or not it is a Fourier-Schwartz series is relatively trivial.
Fourier series on a square
We can also define the Fourier series for functions of two variables <math>x</math> and <math>y</math> in the square <math>[-\pi,\pi]\times[-\pi,\pi]</math>:
<math display="block">\begin{align}
f(x,y) & = \sum_{j,k \in \Z} c_{j,k}e^{ijx}e^{iky},\\[5pt]
c_{j,k} & = \frac{1}{4 \pi^2} \int_{-\pi}^\pi \int_{-\pi}^\pi f(x,y) e^{-ijx}e^{-iky}\, dx \, dy.
\end{align}</math>
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, a discrete form of the Fourier cosine transform, which uses only cosine as the basis function.
For two-dimensional arrays with a staggered appearance, half of the Fourier series coefficients disappear, due to additional symmetry.
Fourier series of a Bravais-lattice-periodic function
<!--Linked from Reciprocal Lattice to anchor Multidimensional-->
A three-dimensional Bravais lattice is defined as the set of vectors of the form
<math display="block">\mathbf{R} = n_1\mathbf{a}_1 + n_2\mathbf{a}_2 + n_3\mathbf{a}_3</math>
where <math>n_i</math> are integers and <math>\mathbf{a}_i</math> are three linearly independent but not necessarily orthogonal vectors. Let us consider some function <math>f(\mathbf{r})</math> with the same periodicity as the Bravais lattice, i.e. <math>f(\mathbf{r}) = f(\mathbf{R}+\mathbf{r})</math> for any lattice vector <math>\mathbf{R}</math>. This situation frequently occurs in solid-state physics where <math>f(\mathbf{r})</math> might, for example, represent the effective potential that an electron "feels" inside a periodic crystal. In presence of such a periodic potential, the quantum-mechanical description of the electron results in a periodically modulated plane-wave commonly known as Bloch state.
In order to develop <math>f(\mathbf{r})</math> in a Fourier series, it is convenient to introduce an auxiliary function <math display="block">g(x_1,x_2,x_3) \triangleq f(\mathbf{r}) = f{ \left (x_1\frac{\mathbf{a}_1}{a_1} + x_2\frac{\mathbf{a}_2}{a_2} + x_3\frac{\mathbf{a}_3}{a_3} \right )}.</math> Both <math>f(\mathbf{r})</math> and <math>g(x_1,x_2,x_3)</math> contain essentially the same information. However, instead of the position vector <math>\mathbf{r}</math>, the arguments of <math>g</math> are coordinates <math>x_{1,2,3}
</math> along the unit vectors <math>\mathbf{a}_{i}/{a_i}</math> of the Bravais lattice, such that <math>g</math> is an ordinary periodic function in these variables,<math display="block">g(x_1,x_2,x_3) = g(x_1+a_1,x_2,x_3) = g(x_1,x_2+a_2,x_3) = g(x_1,x_2,x_3+a_3)\quad\forall\;x_1,x_2,x_3.</math> This trick allows us to develop <math>g</math> as a multi-dimensional Fourier series, in complete analogy with the square-periodic function discussed in the previous section. Its Fourier coefficients are<math display="block">\begin{align}
c(m_1, m_2, m_3)
= \frac{1}{a_3}\int_0^{a_3} dx_3 \frac{1}{a_2}\int_0^{a_2} dx_2 \frac{1}{a_1}\int_0^{a_1} dx_1\, g(x_1, x_2, x_3)\, e^{-i 2\pi \left(\tfrac{m_1}{a_1} x_1+\tfrac{m_2}{a_2} x_2 + \tfrac{m_3}{a_3} x_3\right)}
\end{align},</math> where <math>m_1,m_2,m_3</math> are all integers. <math>c(m_1,m_2,m_3)</math> plays the same role as the coefficients <math>c_{j,k}</math> in the previous section but in order to avoid double subscripts we note them as a function.
Once we have these coefficients, the function <math>g</math> can be recovered via the Fourier series <math display="block">g(x_1, x_2, x_3)=\sum_{m_1, m_2, m_3 \in \Z } \,c(m_1, m_2, m_3) \, e^{i 2\pi \left( \tfrac{m_1}{a_1} x_1+ \tfrac{m_2}{a_2} x_2 + \tfrac{m_3}{a_3} x_3\right)}.</math> We would now like to abandon the auxiliary coordinates <math>x_{1,2,3}
</math> and to return to the original position vector <math>\mathbf{r}</math>. This can be achieved by means of the reciprocal lattice whose vectors <math>\mathbf{b}_{1,2,3}</math> are defined such that they are orthonormal (up to a factor <math>2\pi</math>) to the original Bravais vectors <math>\mathbf{a}_{1,2,3}</math>, <math display="block">\mathbf{a}_i\cdot\mathbf{b_j}=2\pi\delta_{ij}, </math>with <math>\delta_{ij}
</math> the Kronecker delta. With this, the scalar product between a reciprocal lattice vector <math>\mathbf{Q}</math> and an arbitrary position vector <math>\mathbf{r}</math> written in the Bravais lattice basis becomes
<math display="block">\mathbf{Q} \cdot \mathbf{r} = \left ( m_1\mathbf{b}_1 + m_2\mathbf{b}_2 + m_3\mathbf{b}_3 \right ) \cdot \left (x_1\frac{\mathbf{a}_1}{a_1}+ x_2\frac{\mathbf{a}_2}{a_2} +x_3\frac{\mathbf{a}_3}{a_3} \right ) = 2\pi \left( x_1\frac{m_1}{a_1}+x_2\frac{m_2}{a_2}+x_3\frac{m_3}{a_3} \right ),</math>which is exactly the expression occurring in the Fourier exponents. The Fourier series for <math>f(\mathbf{r}) =g(x_1,x_2,x_3)</math> can therefore be rewritten as a sum over all the reciprocal lattice vectors <math>\mathbf{Q}= m_1\mathbf{b}_1+m_2\mathbf{b}_2+m_3\mathbf{b}_3 </math>,<math display="block">f(\mathbf{r})=\sum_{\mathbf{Q c(\mathbf{Q})\, e^{i \mathbf{Q} \cdot \mathbf{r,</math> and the coefficients are<math display="block">c(\mathbf{Q}) = \frac{1}{a_3} \int_0^{a_3} dx_3 \, \frac{1}{a_2}\int_0^{a_2} dx_2 \, \frac{1}{a_1}\int_0^{a_1} dx_1 \, f\left(x_1\frac{\mathbf{a}_1}{a_1} + x_2\frac{\mathbf{a}_2}{a_2} + x_3\frac{\mathbf{a}_3}{a_3} \right) e^{-i \mathbf{Q} \cdot \mathbf{r.</math> The remaining task will be to convert this integral over lattice coordinates back into a volume integral. The relation between the lattice coordinates <math>x_{1,2,3}</math> and the original cartesian coordinates <math>\mathbf{r} = (x,y,z)</math> is a linear system of equations,
<math display="block">\mathbf{r} = x_1\frac{\mathbf{a}_1}{a_1}+x_2\frac{\mathbf{a}_2}{a_2}+x_3\frac{\mathbf{a}_3}{a_3},</math>which, when written in matrix form, <math display="block">\begin{bmatrix}x\\y\\z\end{bmatrix} =\mathbf{J}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix} =\begin{bmatrix}\frac{\mathbf{a}_1}{a_1},\frac{\mathbf{a}_2}{a_2},\frac{\mathbf{a}_3}{a_3}\end{bmatrix}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}\,,</math>involves a constant matrix <math>\mathbf{J}</math> whose columns are the unit vectors <math>\mathbf{a}_j/a_j
</math> of the Bravais lattice. When changing variables from <math>\mathbf{r}</math> to <math>(x_1,x_2,x_3)</math> in an integral, the same matrix <math>\mathbf{J}</math> appears as a Jacobian matrix<math display="block">\mathbf{J}=\begin{bmatrix}
\dfrac{\partial x}{\partial x_1} & \dfrac{\partial x}{\partial x_2} & \dfrac{\partial x}{\partial x_3
} \\[12pt]
\dfrac{\partial y}{\partial x_1} & \dfrac{\partial y}{\partial x_2} & \dfrac{\partial y}{\partial x_3} \\[12pt]
\dfrac{\partial z}{\partial x_1} & \dfrac{\partial z}{\partial x_2} & \dfrac{\partial z}{\partial x_3}
\end{bmatrix}\,.</math>
Its determinant <math>J
</math> is therefore also constant and can be inferred from any integral over any domain; here we choose to calculate the volume of the primitive unit cell <math>\Gamma
</math> in both coordinate systems:
<math display="block">V_{\Gamma} = \int_{\Gamma} d^3 r = J \int_{0}^{a_1} dx_1 \int_{0}^{a_2} dx_2 \int_{0}^{a_3} dx_3=J\, a_1 a_2 a_3 </math> The unit cell being a parallelepiped, we have <math>V_{\Gamma}=\mathbf{a}_1\cdot(\mathbf{a}_2 \times \mathbf{a}_3)</math> and thus <math display="block">d^3r=J dx_1 dx_2 dx_3 =\frac{\mathbf{a}_1\cdot(\mathbf{a}_2 \times \mathbf{a}_3)}{a_1 a_2 a_3} dx_1 dx_2 dx_3.</math> This allows us to write <math>c (\mathbf{Q})</math> as the desired volume integral over the primitive unit cell <math>\Gamma
</math> in ordinary cartesian coordinates:
<math display="block">c(\mathbf{Q}) = \frac{1}{\mathbf{a}_1\cdot(\mathbf{a}_2 \times \mathbf{a}_3)}\int_{\Gamma} d^3 r\, f(\mathbf{r})\cdot e^{-i \mathbf{Q} \cdot \mathbf{r\,. </math>
Hilbert space
As the trigonometric series is a special class of orthogonal system, Fourier series can naturally be defined in the context of Hilbert spaces. For example, the space of square-integrable functions on <math>[-\pi,\pi]</math> forms the Hilbert space <math>L^2([-\pi,\pi])</math>. Its inner product, defined for any two elements <math>f</math> and <math>g</math>, is given by:
<math display="block">\langle f, g \rangle = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)\overline{g(x)}\,dx.</math>
This space is equipped with the orthonormal basis <math>\left\{e_n=e^{inx}: n \in \Z\right\}</math>.
Then the (generalized) Fourier series expansion of <math>f \in L^{2}([-\pi,\pi])</math>, given by
<math display="block">f(x) = \sum_{n=-\infty}^\infty c_n e^{i n x },</math>
can be written as
<math display="block">f=\sum_{n=-\infty}^\infty \langle f,e_n \rangle \, e_n.</math>
thumb|400px|right|Sines and cosines form an orthogonal set, as illustrated above. The integral of sine, cosine and their product is zero (green and red areas are equal, and cancel out) when <math>m</math>, <math>n</math> or the functions are different, and π only if <math>m</math> and <math>n</math> are equal, and the function used is the same. They would form an orthonormal set, if the integral equaled 1 (that is, each function would need to be scaled by <math>1/\sqrt{\pi}</math>).
The sine-cosine form follows in a similar fashion. Indeed, the sines and cosines form an orthogonal set:
<math display="block">\int_{-\pi}^{\pi} \cos(mx)\, \cos(nx)\, dx = \frac{1}{2}\int_{-\pi}^{\pi} \cos((n-m)x)+\cos((n+m)x)\, dx = \pi \delta_{mn}, \quad m, n \ge 1, </math>
<math display="block">\int_{-\pi}^{\pi} \sin(mx)\, \sin(nx)\, dx = \frac{1}{2}\int_{-\pi}^{\pi} \cos((n-m)x)-\cos((n+m)x)\, dx = \pi \delta_{mn}, \quad m, n \ge 1</math>
(where is the Kronecker delta), and
<math display="block">\int_{-\pi}^{\pi} \cos(mx)\, \sin(nx)\, dx = \frac{1}{2}\int_{-\pi}^{\pi} \sin((n+m)x)+\sin((n-m)x)\, dx = 0;</math>
Hence, the set
<math display="block">\left\{\frac{1}{\sqrt{2,\frac{\cos x}{\sqrt{2,\frac{\sin x}{\sqrt{2,\dots,\frac{\cos (nx)}{\sqrt{2,\frac{\sin (nx)}{\sqrt{2,\dots \right\},</math>
also forms an orthonormal basis for <math>L^2([-\pi,\pi])</math>. The density of their span is a consequence of the Stone–Weierstrass theorem, but follows also from the properties of classical kernels like the Fejér kernel.
Fourier theorem proving convergence of Fourier series
In engineering, the Fourier series is generally assumed to converge except at jump discontinuities since the functions encountered in engineering are usually better-behaved than those in other disciplines. In particular, if <math>s</math> is continuous and the derivative of <math>s(x)</math> (which may not exist everywhere) is square integrable, then the Fourier series of <math>s</math> converges absolutely and uniformly to <math>s(x)</math>. If a function is square-integrable on the interval <math>[x_0,x_0+P]</math>, then the Fourier series converges to the function almost everywhere. It is possible to define Fourier coefficients for more general functions or distributions, in which case pointwise convergence often fails, and convergence in norm or weak convergence is usually studied.
<gallery widths="224" heights="224">
Fourier_series_square_wave_circles_animation.gif|link=//upload.wikimedia.org/wikipedia/commons/b/bd/Fourier_series_square_wave_circles_animation.svg|Four partial sums (Fourier series) of lengths 1, 2, 3, and 4 terms, showing how the approximation to a square wave improves as the number of terms increases [ (animation)]
Fourier_series_sawtooth_wave_circles_animation.gif|link=//upload.wikimedia.org/wikipedia/commons/1/1e/Fourier_series_sawtooth_wave_circles_animation.svg|Four partial sums (Fourier series) of lengths 1, 2, 3, and 4 terms, showing how the approximation to a sawtooth wave improves as the number of terms increases [ (animation)]
Example_of_Fourier_Convergence.gif |Example of convergence to a somewhat arbitrary function. Note the development of the "ringing" (Gibbs phenomenon) at the transitions to/from the vertical sections.
</gallery>
The theorems proving that a Fourier series is a valid representation of any periodic function (that satisfies the Dirichlet conditions), and informal variations of them that do not specify the convergence conditions, are sometimes referred to generically as Fourier's theorem or the Fourier theorem.
Least squares property
The earlier :
:<math>s_N(x) = \sum_{n=-N}^N S[n]\ e^{i 2\pi\tfrac{n}{P} x},</math>
is a trigonometric polynomial of degree <math>N</math> that can be generally expressed as:
:<math>p_N(x)=\sum_{n=-N}^N p[n]\ e^{i 2\pi\tfrac{n}{P}x}.</math>
Parseval's theorem implies that:
