Foundations to Frontier
Tests
A. Mathematical Foundations › A3 Calculus and Analysis › Real and functional analysis

Fourier Series as Orthogonal Expansions

Sines and cosines form an orthogonal basis of L², so any periodic signal is a sum of pure tones whose coefficients are inner products. In this basis differentiation becomes multiplication and convolution becomes a product. Smoothness shows up as fast coefficient decay, jumps cause the Gibbs overshoot, and sampling too slowly aliases frequencies. This underlies signal processing, spectral PDE solvers, Fourier neural operators and vibration analysis.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Every sound is a chord

A piano note isn’t one pure tone. It’s a mix of a main frequency plus quieter “overtones” at 2×, 3×, 4× that frequency. Your ear and a guitar tuner both break sounds into these pure tones. The amazing fact, discovered by Joseph Fourier while studying heat, is that any repeating pattern can be built by adding up pure sine and cosine waves, even a square wave with sharp corners.

How much of each tone a signal contains is its spectrum. Smooth signals need only a few tones. Sharp jumps need infinitely many.

Building waves from sines and cosines
|coefficient k|, k = 1…40, log scale (1e−16 … 1)
L² error (from Parseval) = 5.63e-1 · max of partial sum = 1.1842 (the true max is 1)
A jump: coefficients ~ 1/k. The overshoot near the jump tends to ≈ 1.179 (9% of the jump of 2) and never disappears: the Gibbs phenomenon.
Why engineers care

Vibration engineers find a rocket’s dangerous resonance frequencies from its spectrum. Accelerometers on a robot are filtered by removing high-frequency tones. Image compression (JPEG) keeps only the important frequencies. All of it is Fourier.

📝 Quick check (Level 0)
0/3 answered
  1. 1. One octave above 440 Hz is…
  2. 2. A square wave is built from…
  3. 3. Smooth signals need ___ tones than jumpy ones.

Level 1: Beginner

★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.

The Fourier series

On [−π,π][-\pi,\pi], the functions 1,cos⁡x,sin⁡x,cos⁡2x,sin⁡2x,…1, \cos x, \sin x, \cos2x, \sin2x, \dots are mutually orthogonal in L2L^2. So a 2π2\pi-periodic ff expands as

f(x)∼a02+∑k≥1(akcos⁡kx+bksin⁡kx),ak=1π∫−ππfcos⁡kx,bk=1π∫−ππfsin⁡kxf(x)\sim\frac{a_0}2 + \sum_{k\ge1}\big(a_k\cos kx + b_k\sin kx\big), \quad a_k = \frac1\pi\int_{-\pi}^\pi f\cos kx, \quad b_k = \frac1\pi\int_{-\pi}^\pi f\sin kx

The coefficients are inner products, exactly as in A3.5-5. In complex form, f∼∑kckeikxf\sim\sum_kc_ke^{ikx} with ck=12π∫fe−ikxc_k = \frac1{2\pi}\int fe^{-ikx}.

Wave Coefficients Decay
square sign⁡(sin⁡x)\operatorname{sign}(\sin x) bk=4πkb_k = \frac4{\pi k}, odd kk only 1/k1/k
sawtooth xx bk=2(−1)k+1kb_k = \frac{2(-1)^{k+1}}k 1/k1/k
triangle ∣x∣\lvert x\rvert a0=πa_0 = \pi, ak=−4πk2a_k = -\frac4{\pi k^2} for odd kk 1/k21/k^2
ecos⁡xe^{\cos x} ak=2Ik(1)a_k = 2I_k(1) faster than any power

Odd functions have only sines and even functions only cosines.

📝 Quick check (Level 1)
0/3 answered
  1. 1. b₁ of the ±1 square wave?
  2. 2. An even function's Fourier series contains only…
  3. 3. The period of sin 3x is…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.

Convergence: in L², pointwise and uniform

  • In L2L^2: for every f∈L2f\in L^2, the partial sums converge in mean square. That’s because the trigonometric system is a complete orthonormal basis (after normalization). Parseval says 1π∫f2=a022+∑(ak2+bk2)\frac1\pi\int f^2 = \frac{a_0^2}2 + \sum(a_k^2 + b_k^2).
  • Pointwise: at a jump, the series converges to the midpoint of the two one-sided limits (Dirichlet).
  • Not uniformly near jumps: the partial sums overshoot by about 9% of the jump, at a point that moves closer to the jump as NN grows. The peak tends to 2πSi⁡(π)≈1.179\frac2\pi\operatorname{Si}(\pi)\approx1.179 for a jump from −1 to 1. This is the Gibbs phenomenon (Practice Code 4). It’s A3.5-2’s lesson: L2L^2 convergence doesn’t imply uniform convergence.

Smoothness ↔ decay

Integrating by parts mm times shows that if ff has mm continuous periodic derivatives, then ∣ck∣=O(k−m)|c_k| = O(k^{-m}). Specifically:

  • a jump gives 1/k1/k;
  • a kink gives 1/k21/k^2;
  • an analytic function gives e−α∣k∣e^{-\alpha|k|}.

Conversely, fast decay means smoothness. That’s why spectral methods converge exponentially for smooth problems, while finite differences only reach O(hp)O(h^p).

The basis diagonalizes calculus

  • Differentiation: ddxeikx=ik eikx\frac{d}{dx}e^{ikx} = ik\,e^{ikx}, so d/dxd/dx multiplies coefficient kk by ikik. Its eigenvalues are unbounded, which is the unboundedness of A3.5-6.
  • Convolution: f∗g^k=2πf^kg^k\widehat{f*g}_k = 2\pi\hat f_k\hat g_k. Filtering is pointwise multiplication of spectra.
  • Heat equation: each mode decays like e−αk2te^{-\alpha k^2t}, independently of the others.
🐍 Exercise 1: Fourier coefficients, Parseval and Gibbs
Compute Fourier coefficients numerically for square, sawtooth and triangle waves. Check bₖ = 4/(πk) for the square wave, watch the L² error fall, confirm Parseval, measure the persistent Gibbs overshoot, and see 1/k² decay for the kink.
📝 Quick check (Level 2)
0/3 answered
  1. 1. At a jump, the Fourier series converges to…
  2. 2. Coefficients of a function with a kink decay like…
  3. 3. In the Fourier basis, convolution becomes…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Orthogonality, proved

For integers m≠nm\ne n, sin⁡mxsin⁡nx=12[cos⁡(m−n)x−cos⁡(m+n)x]\sin mx\sin nx = \tfrac12[\cos(m-n)x - \cos(m+n)x]. Each cosine of a nonzero integer frequency integrates to 0 over a full period, so ∫−ππsin⁡mxsin⁡nx dx=0\int_{-\pi}^\pi\sin mx\sin nx\,dx = 0. For m=n≥1m = n\ge1 the same identity gives π\pi. The cosine and mixed cases work the same way. ∎

Deriving the square-wave coefficients

The function is odd, so ak=0a_k = 0. Then bk=2π∫0πsin⁡kx dx=2πk(1−cos⁡kπ)=2πk(1−(−1)k)b_k = \frac2\pi\int_0^\pi\sin kx\,dx = \frac2{\pi k}(1 - \cos k\pi) = \frac2{\pi k}(1 - (-1)^k). That’s 4πk\frac4{\pi k} for odd kk and 0 for even kk.

Parseval proves Euler

For f(x)=xf(x) = x: 1π∫−ππx2 dx=2π23\frac1\pi\int_{-\pi}^\pi x^2\,dx = \frac{2\pi^2}3 and ∑bk2=∑4k2\sum b_k^2 = \sum\frac4{k^2}. Parseval sets them equal, so ∑k≥11k2=π26\sum_{k\ge1}\frac1{k^2} = \frac{\pi^2}6, the Basel problem (Practice Code 3).

Completeness: why there are no missing tones

Completeness of the trigonometric system means that if all Fourier coefficients of a continuous periodic ff vanish, then f≡0f\equiv0. One proof: Fejér’s theorem shows the averages of the partial sums converge uniformly for continuous ff. That makes trigonometric polynomials dense in CC, and hence in L2L^2 (a Stone–Weierstrass relative, A3.5-2). Parseval then follows from the general Hilbert-space theory (A3.5-5).

Exercise 3.1: Why does the triangle wave converge uniformly while the square wave doesn’t?

The triangle’s coefficients satisfy ∑∣ak∣≤∑4πk2<∞\sum|a_k|\le\sum\frac4{\pi k^2} < \infty. The Weierstrass M-test (A3.5-2) gives uniform convergence. The square wave’s ∑4πk\sum\frac4{\pi k} diverges, and its limit is discontinuous, which a uniform limit of continuous functions can’t be.

📝 Quick check (Level 3)
0/3 answered
  1. 1. ∫₋π^π sin 2x sin 5x dx = ?
  2. 2. Parseval applied to f = x proves…
  3. 3. The triangle wave converges uniformly because…

Level 4: Expert

★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.

Spectral methods and the FFT

The fast Fourier transform (Cooley and Tukey, 1965) computes all nn discrete Fourier coefficients in O(nlog⁡n)O(n\log n) instead of O(n2)O(n^2). That made spectral methods practical, and it’s one of the most consequential algorithms of the 20th century. Spectral differentiation multiplies FFT coefficients by ikik, and for smooth periodic problems the error falls exponentially in nn (Trefethen, 2000). Global weather and turbulence codes have long used spectral transforms (Orszag, 1970).

🐍 Exercise 2 (research): spectral differentiation and the convolution theorem
Differentiate exp(sin x) with the FFT (exponential convergence) and with centred finite differences (O(h²)). Then verify the convolution theorem: circular convolution equals IFFT(FFT f · FFT g).

Fourier thinking in robotics, aerospace and AI

  • Sampling and aliasing. Sampling at fsf_s can only represent frequencies up to fs/2f_s/2 (Nyquist–Shannon; Shannon, 1949). Faster tones fold onto false lower ones: a 70 Hz motor vibration sampled at 100 Hz shows up as 30 Hz (Practice Code 5). IMUs and flight controllers apply anti-aliasing low-pass filters before sampling for this reason.
  • Structural dynamics. Modal analysis of launch vehicles and satellites finds resonances from measured frequency-response functions. Pogo oscillations in rockets are a coupled-resonance problem studied in the frequency domain.
  • Fourier neural operators (Li et al., 2021) parametrize an operator’s kernel by its Fourier coefficients, truncated to low modes. A convolution becomes a cheap per-mode multiplication, and the model transfers across resolutions (A3.4-4, A3.5-6).
  • Positional encodings and spectral bias. Transformers’ sinusoidal position encodings (Vaswani et al., 2017) and NeRF’s Fourier features (Tancik et al., 2020) inject high frequencies, because plain MLPs learn low frequencies first (“spectral bias”; Rahaman et al., 2019). This is the same coefficient-decay story.
  • Convolutional networks are translation-equivariant linear operators, which Fourier diagonalizes. That’s the mathematical reason CNNs and FFT convolution match.

References

  1. J. Fourier (1822). Théorie analytique de la chaleur. Paris.
  2. E. M. Stein, R. Shakarchi (2003). Fourier Analysis: An Introduction. Princeton.
  3. J. W. Cooley, J. W. Tukey (1965). “An algorithm for the machine calculation of complex Fourier series.” Mathematics of Computation, 19.
  4. L. N. Trefethen (2000). Spectral Methods in MATLAB. SIAM.
  5. S. A. Orszag (1970). “Transform method for the calculation of vector-coupled sums: application to the spectral form of the vorticity equation.” Journal of the Atmospheric Sciences, 27.
  6. C. E. Shannon (1949). “Communication in the presence of noise.” Proceedings of the IRE, 37(1).
  7. Z. Li et al. (2021). “Fourier neural operator for parametric partial differential equations.” ICLR.
  8. M. Tancik et al. (2020). “Fourier features let networks learn high frequency functions in low dimensional domains.” NeurIPS.
  9. N. Rahaman et al. (2019). “On the spectral bias of neural networks.” ICML.
  10. A. Vaswani et al. (2017). “Attention is all you need.” NeurIPS.