= Fourier series
{c}
{title2=$f(x)\sim a_0/2+\sum_{n\geq1}[a_n\cos(nx)+b_n\sin(nx)]$}
{wiki}
= Fourier expansion
{c}
{synonym}
A <Fourier series> describes a <periodic function> through <sines> and <cosines> whose frequencies are <integer> multiples of one base <frequency>. These <Fourier harmonics> give a useful alternative to describing the value at every input: each <Fourier coefficient> measures how much of one oscillating pattern is present. For a real, integrable <function> of period $2\pi$, the real form is
$$
f(x)\sim\frac{a_0}{2}+\sum_{n=1}^{\infty}\bigl[a_n\cos(nx)+b_n\sin(nx)\bigr],
\qquad
a_n=\frac1\pi\int_{-\pi}^{\pi}f(x)\cos(nx)\,dx,
\qquad
b_n=\frac1\pi\int_{-\pi}^{\pi}f(x)\sin(nx)\,dx.
$$
The cosine formula includes $n=0$; the sine formula uses $n\geq1$. Thus $a_0/2$ is the mean value over a <period>, not $a_0$ itself. The symbol $\sim$ associates a <function> with its <Fourier coefficients>; an equality requires a specified kind of convergence, such as <pointwise convergence>. For general period $T>0$, replace $nx$ by $2\pi nt/T$ and the coefficient prefactor by $2/T$. <Fourier orthogonality> explains why integrating against one mode removes the others. https://ocw.mit.edu/courses/res-18-015-topics-in-fourier-analysis-spring-2024/mitres_18_015_s24_lec01.pdf[Daniel Stroock, Basic Theory of Fourier Series: orthogonality and periodic expansions]{ref}.
For a finite example, take
$$
f(x)=\frac12+\cos x+\frac12\sin(2x).
$$
Its mean is $1/2$, its real <Fourier coefficients> are $a_0=1$, $a_1=1$, $b_2=1/2$, and all other $a_n,b_n$ vanish. At $x=\pi/4$, the three contributions add to $1/2+1/\sqrt2+1/2=1+1/\sqrt2\approx1.70710678$. The <function> is already a <trigonometric polynomial>, so retaining these modes reconstructs it exactly. Here $x$ is an angular coordinate in <radians>; if it instead represents time, a base <angular frequency> must supply the corresponding units.
\Image[/fourier-harmonic-reconstruction.png]
{title=Three simple components reconstruct a <periodic> <signal> exactly}
{description=The <constant function> $1/2$, the <cosine> $\cos x$, and the <sine> $\tfrac12\sin(2x)$ add to the displayed <trigonometric polynomial>. The marked input $x=\pi/4$ has output $1+1/\sqrt2$. Each contribution can be measured separately by its <Fourier coefficient>.}
The change of viewpoint is useful because many <linear> problems act separately on these modes. The second <derivative> maps $\sin(nx)$ to $-n^2\sin(nx)$ and maps $\cos(nx)$ in the same way. Consequently a differential equation that is complicated for a whole profile can become a simpler calculation for each <Fourier harmonic>. A <linear time-invariant system> similarly has a separate response to each <complex exponential>. <Superposition> combines the responses when the relevant sums and operations are justified. https://ocw.mit.edu/ans7870/18/18.013a/textbook/HTML/chapter30/section08.html[MIT Calculus with Applications, section 30.8: Fourier series and forced responses]{ref}.
The infinite case contains a subtlety absent from the finite example. Under <pointwise convergence of a piecewise smooth Fourier series>, the value at a <jump discontinuity> is the average of the two one-sided limits. For a <square-integrable function>, the <complex Fourier series> instead converges in the $L^2$ norm: the integrated squared error tends to zero. Neither statement says that the error becomes small everywhere at once. A <square wave> shows the difference vividly through the <Gibbs phenomenon>.
A historical source for this connection between profiles and modes is <Joseph Fourier>'s 1822 book Théorie analytique de la chaleur. Chapter III develops expansions in <sines> and <cosines> while studying the propagation of <heat>. The <heat equation> gives a continuing application of this approach. <Théorie analytique de la chaleur by Joseph Fourier/Propagation de la chaleur dans un solide rectangle infini>{ref}.
Back to article page