Fourier Series

⚡ Key Takeaways

Fourier series represent any reasonable periodic function as an infinite sum of sines and cosines (or complex exponentials). Key result: a function of period 2π2\pi that is piecewise smooth equals a02+∑n=1∞(ancos⁡nx+bnsin⁡nx)\frac{a_0}{2} + \sum_{n=1}^\infty (a_n\cos nx + b_n\sin nx), with coefficients given by integrals against the trig functions. Applies to: signal processing, heat conduction, vibrations, electrical engineering, quantum mechanics, number theory. Who/when: Joseph Fourier (1807, in his study of heat), building on Euler, Bernoulli, and d'Alembert.

💡 The Core Insight

The sines and cosines {1,cos⁡x,sin⁡x,cos⁡2x,sin⁡2x,… }\{1, \cos x, \sin x, \cos 2x, \sin 2x, \dots\} are mutually orthogonal over one period: the integral of any two distinct members' product vanishes. This means we can extract each coefficient independently by projecting ff onto that basis function — exactly like finding the components of a vector along orthogonal axes. The Fourier coefficient ana_n is simply "how much of cos⁡nx\cos nx is inside ff," measured by an inner product. The whole theory is linear algebra in infinite dimensions.

Formal Statement

DefinitionFourier Series of a 2π2\pi-Periodic Function

Let f:R→Rf:\mathbb{R}\to\mathbb{R} be periodic with period 2π2\pi and integrable on [−π,π][-\pi,\pi]. Its Fourier series is

1
f(x)∼a02+∑n=1∞(ancos⁡nx+bnsin⁡nx)\quad f(x) \sim \frac{a_0}{2} + \sum_{n=1}^{\infty}\bigl(a_n\cos nx + b_n\sin nx\bigr)

Derivation hint: postulate a trig expansion, then determine coefficients by exploiting orthogonality (see proof below). The symbol ∼\sim denotes "has Fourier series," deferring the question of convergence. with coefficients

2
an=1π∫−ππf(x)cos⁡nx dx,n=0,1,2,…\quad a_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\cos nx\,dx,\qquad n=0,1,2,\dots

Derivation hint: multiply [1] by cos⁡mx\cos mx, integrate over [−π,π][-\pi,\pi], and use ∫−ππcos⁡nxcos⁡mx dx=πδnm\int_{-\pi}^{\pi}\cos nx\cos mx\,dx = \pi\delta_{nm} for n,m≥1n,m\geq 1.

3
bn=1π∫−ππf(x)sin⁡nx dx,n=1,2,…\quad b_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\sin nx\,dx,\qquad n=1,2,\dots

Derivation hint: multiply [1] by sin⁡mx\sin mx and integrate; use ∫−ππsin⁡nxsin⁡mx dx=πδnm\int_{-\pi}^{\pi}\sin nx\sin mx\,dx = \pi\delta_{nm}. Here a0/2a_0/2 is the mean value (DC component) of ff, nn is the harmonic index, an,bna_n,b_n are the Fourier coefficients, and δnm\delta_{nm} is the Kronecker delta. The fundamental angular frequency is 11 (period 2π2\pi); harmonic nn oscillates nn times faster.

DefinitionComplex (Exponential) Form

Using Euler's formula einx=cos⁡nx+isin⁡nxe^{inx}=\cos nx + i\sin nx, the series compresses to

4
f(x)∼∑n=−∞∞cn einx,cn=12π∫−ππf(x) e−inx dx\quad f(x) \sim \sum_{n=-\infty}^{\infty} c_n\,e^{inx},\qquad c_n = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)\,e^{-inx}\,dx

Derivation hint: substitute cos⁡nx=12(einx+e−inx)\cos nx=\tfrac12(e^{inx}+e^{-inx}), sin⁡nx=12i(einx−e−inx)\sin nx=\tfrac{1}{2i}(e^{inx}-e^{-inx}) into [1]; collect terms to get cn=12(an−ibn)c_n=\tfrac12(a_n-ib_n), c−n=12(an+ibn)c_{-n}=\tfrac12(a_n+ib_n), c0=a0/2c_0=a_0/2. For a general period T=2LT=2L, the angular frequency becomes ω0=π/L\omega_0=\pi/L and

5
f(x)∼∑n=−∞∞cneinπx/L,cn=12L∫−LLf(x) e−inπx/L dx\quad f(x)\sim \sum_{n=-\infty}^{\infty} c_n e^{i n\pi x/L},\qquad c_n=\frac{1}{2L}\int_{-L}^{L} f(x)\,e^{-in\pi x/L}\,dx

Derivation hint: rescale the variable x↦πx/Lx\mapsto \pi x/L to map period 2L2L onto period 2π2\pi.

TheoremDirichlet Convergence Theorem

If ff is periodic with period 2π2\pi and piecewise smooth (piecewise continuous with a piecewise continuous derivative), then for every xx the Fourier series converges, and

6
a02+∑n=1∞(ancos⁡nx+bnsin⁡nx)=f(x+)+f(x−)2\quad \frac{a_0}{2}+\sum_{n=1}^\infty(a_n\cos nx+b_n\sin nx)=\frac{f(x^+)+f(x^-)}{2}

Derivation hint: write the partial sum SNS_N as a convolution with the Dirichlet kernel DND_N, then apply the Riemann–Lebesgue lemma to the remainder; the kernel's mass-1 property gives the average of one-sided limits. At points of continuity this equals f(x)f(x); at a jump it converges to the midpoint of the jump.

TheoremParseval's Identity / Completeness

For f∈L2[−π,π]f\in L^2[-\pi,\pi] the trigonometric system is complete, and energy is conserved:

7
1π∫−ππ∣f(x)∣2 dx=a022+∑n=1∞(an2+bn2)\quad \frac{1}{\pi}\int_{-\pi}^{\pi}|f(x)|^2\,dx=\frac{a_0^2}{2}+\sum_{n=1}^\infty\bigl(a_n^2+b_n^2\bigr)

Derivation hint: expand ∫∣f∣2=∫f⋅f\int |f|^2 = \int f\cdot f, substitute the series for one factor, integrate term-by-term using orthogonality. In complex form: 12π∫∣f∣2=∑∣cn∣2\frac{1}{2\pi}\int|f|^2=\sum|c_n|^2. This identity is the infinite-dimensional Pythagorean theorem.

Why It Holds / Derivation

ProofCoefficient Formulas via Orthogonality

Step 1 — Orthogonality relations. Direct integration using product-to-sum formulas gives, for integers n,m≥1n,m\geq 1:

∫−ππcos⁡nxcos⁡mx dx=πδnm,∫−ππsin⁡nxsin⁡mx dx=πδnm,∫−ππcos⁡nxsin⁡mx dx=0.\int_{-\pi}^{\pi}\cos nx\cos mx\,dx=\pi\delta_{nm},\quad \int_{-\pi}^{\pi}\sin nx\sin mx\,dx=\pi\delta_{nm},\quad \int_{-\pi}^{\pi}\cos nx\sin mx\,dx=0.

Also ∫−ππcos⁡nx dx=∫−ππsin⁡nx dx=0\int_{-\pi}^{\pi}\cos nx\,dx=\int_{-\pi}^{\pi}\sin nx\,dx=0 for n≥1n\geq1, while ∫−ππ1 dx=2π\int_{-\pi}^{\pi}1\,dx=2\pi.

Step 2 — Assume the expansion holds and may be integrated term-by-term:

f(x)=a02+∑k=1∞(akcos⁡kx+bksin⁡kx).f(x)=\frac{a_0}{2}+\sum_{k=1}^\infty(a_k\cos kx+b_k\sin kx).

Step 3 — Project onto cos⁡mx\cos mx. Multiply both sides by cos⁡mx\cos mx and integrate over [−π,π][-\pi,\pi]. Every term vanishes by Step 1 except the one with k=mk=m:

∫−ππf(x)cos⁡mx dx=am⋅π  ⇒  am=1π∫−ππf(x)cos⁡mx dx.\int_{-\pi}^{\pi} f(x)\cos mx\,dx = a_m\cdot\pi \;\Rightarrow\; a_m=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos mx\,dx.

Step 4 — The mean. Projecting onto 11 (i.e. cos⁡0x\cos 0x): ∫f dx=a02⋅2π\int f\,dx=\frac{a_0}{2}\cdot 2\pi, recovering a0=1π∫f dxa_0=\frac1\pi\int f\,dx. This is why we wrote a0/2a_0/2 — so formula [2] holds uniformly for all n≥0n\geq0.

Step 5 — Project onto sin⁡mx\sin mx identically yields bm=1π∫−ππfsin⁡mx dxb_m=\frac1\pi\int_{-\pi}^{\pi}f\sin mx\,dx.

Step 6 — Justification of term-by-term integration. For f∈L2f\in L^2, the partial sums converge in the L2L^2 norm, and the inner product is continuous in that norm, so interchanging sum and integral is valid. ■\blacksquare

∎
ProofDirichlet Kernel Sketch of Pointwise Convergence

Step 1. The NN-th partial sum is SN(x)=∑∣n∣≤Ncneinx=12π∫−ππf(t)DN(x−t) dtS_N(x)=\sum_{|n|\leq N}c_n e^{inx}=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)D_N(x-t)\,dt, where the Dirichlet kernel is

DN(u)=∑n=−NNeinu=sin⁡ ⁣((N+12)u)sin⁡(u/2).D_N(u)=\sum_{n=-N}^{N}e^{inu}=\frac{\sin\!\bigl((N+\tfrac12)u\bigr)}{\sin(u/2)}.

Step 2. DND_N has total integral 2π2\pi and concentrates near u=0u=0 as N→∞N\to\infty, but with oscillating sidelobes (the source of Gibbs overshoot).

Step 3. Writing SN(x)−f(x+)+f(x−)2S_N(x)-\frac{f(x^+)+f(x^-)}{2} as an integral of DND_N against the smooth difference quotient of ff, the Riemann–Lebesgue lemma (rapidly oscillating integrals of integrable functions vanish) forces this remainder to 00 for piecewise-smooth ff. ■\blacksquare

∎
JJ
Jean-Baptiste Joseph Fourier
1768–1830

A French mathematician and physicist who accompanied Napoleon to Egypt and later served as prefect of Isère. In his 1807 memoir and the 1822 treatise Théorie analytique de la chaleur, Fourier solved the heat equation by boldly asserting that any function could be expanded in trigonometric series. The claim scandalized Lagrange, Laplace, and Legendre, whose committee criticized its lack of rigor — yet the method worked spectacularly. Fourier also discovered the greenhouse effect and the dimensional analysis of physical equations. His insistence on the universality of trigonometric expansion forced mathematicians to clarify the very notions of function, integral, and convergence, seeding a century of analysis.

Building Intuition

🧠 Intuition

Think of ff as a musical chord. A pure tone is a single sine; a real instrument's sound is a sum of harmonics whose relative strengths — the coefficients an,bna_n,b_n — define the timbre. Fourier analysis is the ear's job in reverse: given the chord, recover the individual notes. Geometrically, each basis function is an axis in an infinite-dimensional space, and ff is a vector. The coefficient cnc_n is the shadow ff casts on the einxe^{inx} axis. Because the axes are perpendicular (orthogonal), each shadow can be measured without interference — that's the whole trick. Symmetry shortcuts: if ff is even, all bn=0b_n=0 (only cosines survive). If ff is odd, all an=0a_n=0 (only sines). Smoother functions have coefficients decaying faster: a jump gives ∼1/n\sim 1/n decay, a corner ∼1/n2\sim 1/n^2, and an infinitely smooth periodic function decays faster than any power — the spectrum reads off the regularity of ff.

Figure
Square wave (gold) and its partial Fourier sums approaching it

```svg

x f square wave N=1 N=5 (note overshoot) Gibbs ~9%

```

Worked Examples

ExampleSquare Wave

Given: the odd, 2π2\pi-periodic square wave f(x)={+10<x<π−1−π<x<0f(x)=\begin{cases}+1 & 0<x<\pi\\ -1 & -\pi<x<0\end{cases}.

Step 1 — Symmetry. ff is odd, so all an=0a_n=0.

Step 2 — Sine coefficients.

bn=1π∫−ππfsin⁡nx dx=2π∫0πsin⁡nx dx=2π⋅1−cos⁡nπn.b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f\sin nx\,dx=\frac{2}{\pi}\int_0^\pi \sin nx\,dx=\frac{2}{\pi}\cdot\frac{1-\cos n\pi}{n}.

Step 3 — Evaluate. Since cos⁡nπ=(−1)n\cos n\pi=(-1)^n: bn=2(1−(−1)n)πnb_n=\frac{2(1-(-1)^n)}{\pi n}, which is 00 for even nn and 4πn\frac{4}{\pi n} for odd nn.

Step 4 — Series.

 f(x)=4π∑k=0∞sin⁡((2k+1)x)2k+1=4π(sin⁡x+13sin⁡3x+15sin⁡5x+⋯ ) \boxed{\,f(x)=\frac{4}{\pi}\sum_{k=0}^\infty\frac{\sin\bigl((2k+1)x\bigr)}{2k+1}=\frac{4}{\pi}\left(\sin x+\tfrac13\sin 3x+\tfrac15\sin 5x+\cdots\right)\,}

Bonus: evaluating at x=π/2x=\pi/2 where f=1f=1 gives the Leibniz series 1−13+15−⋯=π41-\tfrac13+\tfrac15-\cdots=\frac{\pi}{4}.

ExampleParseval Yields ζ(2)\zeta(2)

Given: f(x)=xf(x)=x on (−π,π)(-\pi,\pi), extended 2π2\pi-periodically (a sawtooth). Find ∑1/n2\sum 1/n^2.

Step 1 — Coefficients. ff is odd, so an=0a_n=0. Integrate by parts:

bn=2π∫0πxsin⁡nx dx=2π[−xcos⁡nxn+sin⁡nxn2]0π=2π⋅−π(−1)nn=2(−1)n+1n.b_n=\frac{2}{\pi}\int_0^\pi x\sin nx\,dx=\frac{2}{\pi}\left[-\frac{x\cos nx}{n}+\frac{\sin nx}{n^2}\right]_0^\pi=\frac{2}{\pi}\cdot\frac{-\pi(-1)^n}{n}=\frac{2(-1)^{n+1}}{n}.

Step 2 — Apply Parseval [7]. 1π∫−ππx2 dx=∑n=1∞bn2.\frac{1}{\pi}\int_{-\pi}^{\pi}x^2\,dx=\sum_{n=1}^\infty b_n^2. The left side is 1π⋅2π33=2π23\frac{1}{\pi}\cdot\frac{2\pi^3}{3}=\frac{2\pi^2}{3}.

Step 3 — Right side. ∑bn2=∑n=1∞4n2=4∑1n2\sum b_n^2=\sum_{n=1}^\infty\frac{4}{n^2}=4\sum\frac{1}{n^2}.

Step 4 — Solve. 2π23=4∑1n2⇒\frac{2\pi^2}{3}=4\sum\frac1{n^2}\Rightarrow

 ∑n=1∞1n2=π26≈1.6449 \boxed{\,\sum_{n=1}^\infty\frac{1}{n^2}=\frac{\pi^2}{6}\approx 1.6449\,}

This is the famous Basel problem, solved by Fourier methods in a few lines.

Common Misconceptions

⚠️ Common mistake

The ∼\sim is not always ==. A Fourier series need not converge to ff at every point. At jump discontinuities it converges to the midpoint, not to either one-sided value. There even exist continuous functions whose Fourier series diverge at some points (Du Bois-Reymond, 1873). Pointwise convergence everywhere requires extra hypotheses; L2L^2 convergence (in the energy norm) is what always holds for f∈L2f\in L^2.

Increasing NN does not eliminate overshoot. Near a jump the partial sums overshoot by a fixed ~8.95% of the jump, no matter how large NN is — the spike merely narrows. This is the Gibbs Phenomenon, not a numerical error.

CounterexampleCoefficient decay does not guarantee uniform convergence

The series ∑n=1∞sin⁡nxn\sum_{n=1}^\infty \frac{\sin nx}{n} has coefficients bn=1/n→0b_n=1/n\to 0 and converges pointwise (to the sawtooth (π−x)/2(\pi-x)/2 on (0,2π)(0,2\pi)), yet it does not converge uniformly: the limit is discontinuous at x=0x=0, while every partial sum is continuous, so uniform convergence would force a continuous limit. The Gibbs spikes near 00 never shrink in height. Mere 1/n1/n decay is the signature of a jump discontinuity, and uniform convergence is impossible there.

Connections

connection

The Fourier series is the period-restricted ancestor of the Fourier Transform: as the period T→∞T\to\infty, the discrete spectrum {cn}\{c_n\} blurs into a continuous spectrum f^(ω)\hat f(\omega), and the sum [5] becomes an integral. The orthogonality at its heart is a special case of the spectral theory of self-adjoint operators — the einxe^{inx} are eigenfunctions of −d2/dx2-d^2/dx^2 on the circle, linking it to Sturm–Liouville Theory and general Orthogonal Polynomials. Parseval's identity makes the trig system an orthonormal basis of <span class="wiki-link-missing">Hilbert Space</span> L2L^2, placing Fourier analysis squarely inside Functional Analysis. The discrete computational cousin is the Discrete Fourier Transform, evaluated rapidly by the Fast Fourier Transform. Termwise differentiation connects it to solving the Heat Equation and Wave Equation by separation of variables.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1748 — Euler expands functions in trigonometric series while studying vibrating strings, computing some coefficients.
- 1753 — Daniel Bernoulli argues a vibrating string's motion is a superposition of harmonic modes; d'Alembert and Euler object that this cannot represent arbitrary shapes.
- 1777 — Euler derives the coefficient integral formulas (the orthogonality trick) in a special context.
- 1807 — Fourier submits his memoir on heat to the Paris Academy, asserting universal trigonometric expansion; the committee (Lagrange, Laplace, Legendre) withholds the prize over rigor.
- 1822 — Fourier publishes Théorie analytique de la chaleur, the definitive treatise.
- 1829 — Dirichlet gives the first rigorous convergence theorem for piecewise-monotonic functions, founding modern analysis of the subject.
- 1854 — Riemann develops his integral specifically to handle Fourier coefficients of badly behaved functions, in his Habilitation.
- 1873 — Du Bois-Reymond constructs a continuous function whose Fourier series diverges at a point.
- 1899 — Gibbs (after Wilbraham, 1848) explains the persistent overshoot at discontinuities; 1907 — Riesz–Fischer establish L2L^2 completeness. 1966 — Carleson proves Fourier series of L2L^2 functions converge almost everywhere.

Subtleties & Limits

open-problem

Convergence theory contains deep and partly open territory. Carleson's theorem (1966) guarantees almost-everywhere convergence for L2L^2 functions, and Hunt extended it to LpL^p for p>1p>1; but Kolmogorov (1923) built an L1L^1 function whose Fourier series diverges everywhere, so L1L^1 is hopeless. The sharp characterization of which continuous functions have everywhere-convergent series, and the precise interplay between coefficient decay rates and pointwise regularity, remains subtle. In higher dimensions, the convergence of multidimensional Fourier series depends delicately on the summation method (spherical vs. rectangular partial sums) — the ball multiplier problem (Fefferman, 1971) shows the disc multiplier is unbounded on LpL^p for p≠2p\neq 2, revealing that naive radial summation fails. Questions about optimal convergence under minimal smoothness, and connections to additive combinatorics via exponential sums, remain active research.

See Also

Fourier Transform · Gibbs Phenomenon · Parseval's Theorem · Heat Equation · Wave Equation · Discrete Fourier Transform · Fast Fourier Transform · Sturm–Liouville Theory · Hilbert Space · Orthogonal Polynomials