Differential Equations
Fourier Methods for ODEs
Grenoble, 1807. Joseph Fourier is studying how a red-hot iron bar cools and makes an audacious claim: any function can be written as a sum of sines. Lagrange and Legendre at the Academy say no. Fifteen years later 'Théorie analytique de la chaleur' (1822) reshapes analysis. The same trick now turns the ODE y'' + ay' + by = f(t) into algebra: each input harmonic is independently multiplied by H(iω). MP3, JPEG, MRI, and Stable Diffusion are distant descendants of one hot iron bar.
- **Signal filtering:** multiply the spectrum by H(ω) and unwanted frequencies vanish. Bose QC45 active noise cancellation and Logic Pro EQs work this way.
- **ODE with periodic forcing:** a 50 Hz AC source driving an RLC circuit. The response is one line of code via H(iω).
- **Gaussian blur:** blurring an image equals solving the heat equation equals convolving with a Gaussian kernel equals multiplying the spectrum. Photoshop runs it in O(N log N) via FFT.
Предварительные знания
Fourier Series
A periodic function f(t) with period T decomposes into a **Fourier series**: f(t) = a₀/2 + Σ[aₙcos(2πnt/T) + bₙsin(2πnt/T)]. Coefficients: **aₙ = (2/T)∫₀ᵀ f(t)cos(2πnt/T)dt**, similarly for bₙ. The key insight: sines and cosines are orthogonal over one period.
**Orthogonality:** ∫₀ᵀ cos(2πmt/T)cos(2πnt/T)dt = 0 for m≠n. This lets one extract each coefficient independently-multiply f(t) by the desired basis function and integrate.
**Gibbs phenomenon:** near discontinuities the Fourier series overshoots by ~9% of the jump height. This never disappears as more harmonics are added-it only narrows.
Joseph Fourier and the hot iron bar (1807-1822)
In 1807 Fourier submitted a memoir on heat conduction in solids to the Paris Academy. Laplace, Lagrange, and Legendre rejected it. The idea that any function could be written as a sum of sines was unacceptable, especially to Lagrange. Fourier spent fifteen years polishing the argument and finally published 'Théorie analytique de la chaleur' in 1822. Today the Fourier transform is tool number one in signal processing, MP3, JPEG, MRI, quantum mechanics, and PDE solvers.
No Fourier means no digital audio, no medical imaging, no Stable Diffusion. They all rest on the same harmonic-decomposition idea.
For the odd function f(t) = t on [-π, π], what are the cosine coefficients aₙ?
The Fourier Transform
As T → ∞, the Fourier series becomes the **Fourier integral**: **F{f}(ω) = ∫_{-∞}^{∞} f(t)e^{-iωt}dt**. Inverse: f(t) = (1/2π)∫F(ω)e^{iωt}dω. F(ω) is the frequency spectrum-how strongly each frequency ω is present.
| f(t) | F{f}(ω) | Note |
|---|---|---|
| e^(-a|t|), a>0 | 2a/(a²+ω²) | Lorentzian |
| rect(t/T) | T sinc(ωT/2) | sinc = sin(x)/x |
| e^(-t²/2σ²) | σ√(2π) e^(-ω²σ²/2) | Gaussian stays Gaussian |
| δ(t) | 1 | All frequencies equal |
| cos(ω₀t) | π[δ(ω-ω₀)+δ(ω+ω₀)] | Two delta functions |
**Heisenberg uncertainty principle:** Δt · Δω ≥ 1/2. A narrow pulse has a wide spectrum. A pure tone has a narrow spectral line but lasts forever.
When a Gaussian is compressed in time (σ→0), what happens to its Fourier spectrum?
Convolution Theorem and ODE Solving
**Convolution theorem:** F{f*g}(ω) = F(ω)·G(ω). Convolution in time equals multiplication of spectra. For y'' + ay' + by = f(t) with periodic f, each harmonic Fₙe^(iωₙt) is scaled to **Yₙ = Fₙ · H(iωₙ)**, where **H(s) = 1/(s²+as+b)** is the transfer function.
**scipy.fft.fft** runs in O(N log N). For filtering: multiply the spectrum by H(ω) and apply **ifft**. For filter design: **scipy.signal.butter**, **scipy.signal.cheby1**.
ODE y'' + 4y = cos(2t). What happens to the amplitude?
Gibbs Phenomenon and Convergence
At a jump discontinuity, the Fourier series converges to the average of the left and right limits. Near the jump, a **~8.9% overshoot** persists regardless of how many harmonics are used. The overshoot doesn't disappear-it only narrows.
**Gibbs smoothing:** multiply coefficients by a Fejér or Lanczos kernel to eliminate the overshoot-at the cost of spectral sharpness. Window functions (Hann, Blackman) use the same principle.
| Condition on f | Type of convergence |
|---|---|
| f continuous and periodic | Uniform |
| f piecewise continuous | Pointwise + Gibbs at jumps |
| f ∈ L²[0,T] | Mean-square (L² norm) |
| f absolutely continuous | Uniform, coefficients → 0 |
The Fourier series of f(t) = |t| on [-π, π]-how does it converge?
Key Ideas
- **Fourier series:** f(t) = a₀/2 + Σ[aₙcos + bₙsin]. Coefficients via integrals using orthogonality.
- **Fourier transform:** F{f}(ω) = ∫f(t)e^{-iωt}dt. The spectrum is the 'frequency portrait' of the signal.
- **Convolution theorem:** convolution = multiplication of spectra. Filtering = multiplying by H(ω).
- **Gibbs phenomenon:** ~9% overshoot near discontinuities, independent of the number of harmonics.
Related Topics
Fourier methods bridge ODEs, signal processing, and PDEs:
- The Laplace Transform — Laplace generalizes Fourier to complex s. Setting s = iω recovers the frequency response H(iω) from this lesson.
- The Heat Equation — Solving ∂u/∂t = α∇²u via separation of variables means expanding the initial data in eigen-harmonics sin(nπx/L) (de-07).
- The Wave Equation — Standing waves uₙ = sin(nπx/L)·cos(ωₙt) are the same Fourier harmonics, but in time they oscillate instead of decaying.
- Numerical Methods for ODEs — FFT-based spectral solvers for PDEs on periodic domains give exponential convergence, beating any FD/FEM scheme.
Вопросы для размышления
- The uncertainty principle Δt·Δω ≥ 1/2 limits joint time-frequency resolution. How does this connect to wavelet analysis and the STFT?
- The Gibbs phenomenon never vanishes. How do MP3 and JPEG deal with it in practice?
- The DFT assumes periodicity. What artifacts arise for non-periodic signals, and how do window functions help?