# Fourier series

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).

The first four partial sums of the Fourier series for a square wave. As more harmonics are added, the partial sums converge to (become more and more like) the square wave.

Function {displaystyle s_{6}(x)} (in red) is a Fourier series sum of 6 harmonically related sine waves (in blue). Its Fourier transform {displaystyle S(f)} is a frequency-domain representation that reveals the amplitudes of the summed sine waves.

Almost any[A] periodic function can be represented by a Fourier series that converges.[B] Convergence of Fourier series means that as more and more harmonics from the series are summed, each successive partial Fourier series sum will better approximate the function, and will equal the function with a potentially infinite number of harmonics. The mathematical proofs for this may be collectively referred to as the Fourier Theorem (see § Convergence).

Fourier series can only represent functions that are periodic. However, non-periodic functions can be handled using an extension of the Fourier Series called the Fourier transform which treats non-periodic functions as periodic with infinite period. This transform thus can generate frequency domain representations of non-periodic functions as well as periodic functions, allowing a waveform to be converted between its time domain representation and its frequency domain representation.

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 as the basis set for 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.

Contents 1 Definition 1.1 Common forms 1.1.1 Amplitude-phase form 1.1.2 Sine-cosine form 1.1.3 Exponential form 1.2 Example 1.3 Convergence 1.4 Complex-valued functions 1.5 Other common notations 2 History 2.1 Beginnings 2.2 Fourier's motivation 2.3 Complex Fourier series animation 2.4 Other applications 3 Table of common Fourier series 4 Table of basic properties 5 Symmetry properties 6 Other properties 6.1 Riemann–Lebesgue lemma 6.2 Parseval's theorem 6.3 Plancherel's theorem 6.4 Convolution theorems 6.5 Derivative property 6.6 Compact groups 6.7 Riemannian manifolds 6.8 Locally compact Abelian groups 7 Extensions 7.1 Fourier series on a square 7.2 Fourier series of Bravais-lattice-periodic-function 7.3 Hilbert space interpretation 8 Fourier theorem proving convergence of Fourier series 8.1 Least squares property 8.2 Convergence theorems 8.3 Divergence 9 See also 10 Notes 11 References 11.1 Further reading 12 External links Definition The Fourier series {displaystyle s_{scriptscriptstyle N}(x)} represents a synthesis of a periodic function {displaystyle s(x)} by summing harmonically related sinusoids (called harmonics) whose coefficients are determined by harmonic analysis.

Common forms The Fourier series can be represented in different forms. The amplitude-phase form, sine-cosine form, and exponential form are commonly used and are expressed here for a real-valued function {displaystyle s(x)} . (See § Complex-valued functions and § Other common notations for alternative forms).

The number of terms summed, {displaystyle N} , is a potentially infinite integer. Even so, the series might not converge or exactly equate to {displaystyle s(x)} at all values of {displaystyle x} (such as a single-point discontinuity) in the analysis interval. For the well-behaved functions typical of physical processes, equality is customarily assumed, and the Dirichlet conditions provide sufficient conditions.

The integer index, {displaystyle n} , is also the number of cycles the {displaystyle n^{text{th}}} harmonic makes in the function's period {displaystyle P} .[C] Therefore: The {displaystyle n^{text{th}}} harmonic's wavelength is {displaystyle {tfrac {P}{n}}} and in units of {displaystyle x} . The {displaystyle n^{text{th}}} harmonic's frequency is {displaystyle {tfrac {n}{P}}} and in reciprocal units of {displaystyle x} . Fig 1. The top graph shows a non-periodic function s(x) 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 s(x) wasn't. Amplitude-phase form The Fourier series in amplitude-phase form is: Fourier series, amplitude-phase form {displaystyle s_{scriptscriptstyle N}(x)={frac {A_{0}}{2}}+sum _{n=1}^{N}A_{n}cdot cos left({tfrac {2pi }{P}}nx-varphi _{n}right)}         (Eq.1) Its {displaystyle n^{text{th}}} harmonic is {displaystyle A_{n}cdot cos left({tfrac {2pi }{P}}nx-varphi _{n}right)} . {displaystyle A_{n}} is the {displaystyle n^{text{th}}} harmonic's amplitude and {displaystyle varphi _{n}} is its phase shift. The fundamental frequency of {displaystyle s_{scriptscriptstyle N}(x)} is the term for when {displaystyle n} equals 1, and can be referred to as the {displaystyle 1^{text{st}}} harmonic. {displaystyle {tfrac {A_{o}}{2}}} is sometimes called the {displaystyle 0^{text{th}}} harmonic or DC component. It is the mean value of {displaystyle s(x)} .

Clearly Eq.1 can represent functions that are just a sum of one or more of the harmonic frequencies. The remarkable thing, for those not yet familiar with this concept, is that it can also represent the intermediate frequencies and/or non-sinusoidal functions because of the potentially infinite number of terms ( {displaystyle N} ).

Fig 2. The blue curve is the cross-correlation of a square wave and a cosine function, as the phase lag of the cosine varies over one cycle. The amplitude and phase lag at the maximum value are the polar coordinates of one harmonic in the Fourier series expansion of the square wave. The corresponding Cartesian coordinates can be determined by evaluating the cross-correlation at just two phase lags separated by 90º.

The coefficients {displaystyle A_{n}} and {displaystyle varphi _{n}} can be determined by a harmonic analysis process. Consider a real-valued function {displaystyle s(x)} that is integrable on an interval that starts at any {displaystyle x_{0}} and has length {displaystyle P} . The cross-correlation function: {displaystyle mathrm {X} _{f}(tau )={tfrac {2}{P}}int _{x_{0}}^{x_{0}+P}s(x)cdot cos left(2pi f(x-tau )right),dx;quad tau in left[0,{tfrac {2pi }{f}}right]}         (Eq.2) is essentially a matched filter, with template {displaystyle cos(2pi fx)} .[D] The maximum of {displaystyle mathrm {X} _{f}(tau )} is a measure of the amplitude {displaystyle (A)} of frequency {displaystyle f} in the function {displaystyle s(x)} , and the value of {displaystyle tau } at the maximum determines the phase {displaystyle (varphi )} of that frequency. Figure 2 is an example, where {displaystyle s(x)} is a square wave (not shown), and frequency {displaystyle f} is the {displaystyle 4^{text{th}}} harmonic.

Rather than computationally intensive cross-correlation which requires evaluating every phase, Fourier analysis exploits a trigonometric identity: Equivalence of polar and Cartesian forms {displaystyle cos left({tfrac {2pi }{P}}nx-varphi _{n}right) equiv cos(varphi _{n})cdot cos left({tfrac {2pi }{P}}nxright)+sin(varphi _{n})cdot sin left({tfrac {2pi }{P}}nxright)}         (Eq.3) Substituting this into Eq.2 gives: {displaystyle {begin{aligned}mathrm {X} _{n}(varphi )&={tfrac {2}{P}}int _{P}s(x)cdot cos left({tfrac {2pi }{P}}nx-varphi right),dx;quad varphi in [0,2pi ]\&=cos(varphi )cdot underbrace {{tfrac {2}{P}}int _{P}s(x)cdot cos left({tfrac {2pi }{P}}nxright),dx} _{triangleq a_{n}}+sin(varphi )cdot underbrace {{tfrac {2}{P}}int _{P}s(x)cdot sin left({tfrac {2pi }{P}}nxright),dx} _{triangleq b_{n}}\&=cos(varphi )cdot a_{n}+sin(varphi )cdot b_{n}end{aligned}}} Note the definitions of {displaystyle a_{n}} and {displaystyle b_{n}} ,[2] and that {displaystyle a_{0}} and {displaystyle b_{0}} can be simplified: {displaystyle a_{0}={tfrac {2}{P}}int _{P}s(x)dx~,quad b_{0}=0~.} The derivative of {displaystyle mathrm {X} _{n}(varphi )} is zero at the phase of maximum correlation. {displaystyle mathrm {X} '_{n}(varphi _{n})=sin(varphi _{n})cdot a_{n}-cos(varphi _{n})cdot b_{n}=0quad longrightarrow quad tan(varphi _{n})={frac {b_{n}}{a_{n}}}quad longrightarrow quad varphi _{n}=arctan(b_{n},a_{n})} And the correlation peak value is: {displaystyle {begin{aligned}A_{n}triangleq mathrm {X} _{n}(varphi _{n}) &=cos(varphi _{n})cdot a_{n}+sin(varphi _{n})cdot b_{n}\&={frac {a_{n}}{sqrt {a_{n}^{2}+b_{n}^{2}}}}cdot a_{n}+{frac {b_{n}}{sqrt {a_{n}^{2}+b_{n}^{2}}}}cdot b_{n}={frac {a_{n}^{2}+b_{n}^{2}}{sqrt {a_{n}^{2}+b_{n}^{2}}}}&={sqrt {a_{n}^{2}+b_{n}^{2}}}.end{aligned}}} {displaystyle a_{n}} and {displaystyle b_{n}} are the Cartesian coordinates of a vector with polar coordinates {displaystyle A_{n}} and {displaystyle varphi _{n}.}   Figure 2 is an example of these relationships.

Sine-cosine form Substituting Eq.3 into Eq.1 gives: {displaystyle {displaystyle s_{scriptscriptstyle N}(x)={frac {A_{0}}{2}}+sum _{n=1}^{N}left[A_{n}cos(varphi _{n})cdot cos left({tfrac {2pi }{P}}nxright)+A_{n}sin(varphi _{n})cdot sin left({tfrac {2pi }{P}}nxright)right]}} In terms of the readily computed quantities, {displaystyle a_{n}} and {displaystyle b_{n}} , recall that: {displaystyle cos(varphi _{n})=a_{n}/A_{n}} {displaystyle sin(varphi _{n})=b_{n}/A_{n}} {displaystyle A_{0}={sqrt {a_{0}^{2}+b_{0}^{2}}}={sqrt {a_{0}^{2}}}=a_{0}} Therefore an alternative form of the Fourier series, using the Cartesian coordinates, is the sine-cosine form:[E] Fourier series, sine-cosine form {displaystyle s_{scriptscriptstyle N}(x)={frac {a_{0}}{2}}+sum _{n=1}^{N}left(a_{n}cos left({tfrac {2pi }{P}}nxright)+b_{n}sin left({tfrac {2pi }{P}}nxright)right)}         (Eq.4) Exponential form Another applicable identity is Euler's formula: {displaystyle {begin{aligned}cos left({tfrac {2pi }{P}}nx-varphi _{n}right)&{}equiv {tfrac {1}{2}}e^{ileft(2pi nx/P-varphi _{n}right)}+{tfrac {1}{2}}e^{-ileft(2pi nx/P-varphi _{n}right)}\[6pt]&=left({tfrac {1}{2}}e^{-ivarphi _{n}}right)cdot e^{i2pi (+n)x/P}+left({tfrac {1}{2}}e^{-ivarphi _{n}}right)^{*}cdot e^{i2pi (-n)x/P}end{aligned}}} (Note: the ∗ denotes complex conjugation.) Therefore, with definitions: {displaystyle c_{n}triangleq left{{begin{array}{lll}A_{0}/2&=a_{0}/2,quad &n=0\{tfrac {A_{n}}{2}}e^{-ivarphi _{n}}&={tfrac {1}{2}}(a_{n}-ib_{n}),quad &n>0\c_{|n|}^{*},quad &&n<0end{array}}right}={tfrac {1}{P}}int _{P}s(x)cdot e^{-i2pi nx/P},dx,} the final result is: Fourier series, exponential form {displaystyle s_{_{N}}(x)=sum _{n=-N}^{N}c_{n}cdot e^{i2pi nx/P}}         (Eq.5) This is the customary form for generalizing to § Complex-valued functions. Negative values of {displaystyle n} correspond to negative frequency (explained in Fourier transform § Use of complex sinusoids to represent real sinusoids). Example Plot of the sawtooth wave, a periodic continuation of the linear function {displaystyle s(x)=x/pi } on the interval {displaystyle (-pi ,pi ]} Animated plot of the first five successive partial Fourier series Consider a sawtooth function: {displaystyle s(x)={frac {x}{pi }},quad mathrm {for} -pi 1end{cases}}\end{aligned}}} Half-wave rectified sine [17]: p. 193  {displaystyle s(x)={begin{cases}A&quad {text{for }}0leq x1/2} . In the absolutely summable case, the inequality: {displaystyle sup _{x}|s(x)-s_{_{N}}(x)|leq sum _{|n|>N}|S[n]|} proves uniform convergence.

Many other results concerning the convergence of Fourier series are known, ranging from the moderately simple result that the series converges at {displaystyle x} if {displaystyle s} is differentiable at {displaystyle 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.[citation needed] The uniform boundedness principle yields a simple non-constructive proof of this fact.

In 1922, Andrey Kolmogorov published an article titled 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. He later constructed an example of an integrable function whose Fourier series diverges everywhere (Katznelson 1976).