Trigonometry
Trigonometric Series and Fourier
Why is a JPEG photo 20 times smaller than the original file? How does Sony noise-cancelling know which sound to suppress? How does MRI build images of internal organs without X-rays? Behind all of this is the Fourier decomposition.
- JPEG/MP3 compression: discarding insignificant Fourier coefficients without noticeable quality loss
- ECG filtering: extracting heart rhythm from a noisy signal
- MRI: the image is reconstructed from the inverse Fourier transform of k-space
Предварительные знания
Trigonometric Series: Basis and Orthogonality
Spotify audio analysis (2024) uses Fourier series on 100M+ songs: spectral features at 22.05 kHz sample rate, 4096-point FFT for music recommendation. MP3 compression uses 1,152 samples per frame and DCT (a cousin of Fourier series) to compress 44,100 Hz stereo audio by 10x. The functions sin(nx) and cos(nx) form an orthogonal basis for the space of functions on [-π, π]. Any 'reasonable' periodic function can be represented as an infinite sum of sines and cosines, a trigonometric Fourier series.
**Fourier series:** f(x) = a₀/2 + Σ_{n=1}^∞ [aₙ·cos(nx) + bₙ·sin(nx)] **Orthogonality** (key property): ∫_{-π}^{π} cos(nx)·cos(mx) dx = π·δ_{nm} (0 if n≠m, π if n=m) ∫_{-π}^{π} sin(nx)·sin(mx) dx = π·δ_{nm} ∫_{-π}^{π} sin(nx)·cos(mx) dx = 0 (always!) **Complex form:** f(x) = Σ_{n=-∞}^∞ cₙ·e^{inx}, cₙ = (aₙ - ibₙ)/2
Why is ∫_{-π}^{π} sin(nx)·cos(mx) dx = 0 for any n, m?
Fourier Coefficients: Projecting a Function onto the Basis
Fourier coefficients are computed as inner products of the function with the basis functions, a direct analogue of finding a vector's coordinates: projection onto each basis axis. Orthogonality makes computing each coefficient independent of the others.
**Fourier coefficient formulas:** a₀ = (1/π) ∫_{-π}^{π} f(x) dx aₙ = (1/π) ∫_{-π}^{π} f(x)·cos(nx) dx bₙ = (1/π) ∫_{-π}^{π} f(x)·sin(nx) dx **Idea:** multiply f(x) by the desired basis function and integrate, all other terms 'cancel out' due to orthogonality. **Parseval's theorem** (energy conservation): (1/π)∫|f|² dx = |a₀|²/2 + Σ(aₙ² + bₙ²)
For f(x) = x² on [-π, π], are all Fourier coefficients bₙ equal to zero? Why?
Convergence: Dirichlet's Theorem and the Gibbs Phenomenon
Not every Fourier series converges to the original function at every point. Dirichlet's theorem describes conditions for convergence. At jump discontinuities the series converges to the average, and an 'overshoot' always appears near the jump, known as the Gibbs phenomenon.
**Dirichlet's theorem:** If f is piecewise monotone and piecewise continuous on [-π, π], its Fourier series converges: - To f(x) at points of continuity - To (f(x⁺) + f(x⁻))/2 at points of discontinuity (average of left and right limits) **Gibbs phenomenon:** Near every jump discontinuity, the partial sum overshoots the function by about ~9% (regardless of the number of harmonics!). Specifically: overshoot → (2/π)∫₀^π sin(t)/t dt - 1 ≈ 0.0895 = 8.95% **Uniform convergence:** only for continuous functions with piecewise-continuous derivatives.
The Gibbs phenomenon: as N → ∞, the overshoot of the Fourier series near a jump discontinuity...
Applications: Filtering, Compression, and Signal Analysis
Fourier analysis is the foundation of modern digital signal processing. JPEG compresses images via the DCT (a relative of the Fourier transform). MP3 removes inaudible frequencies. A low-pass filter in the frequency domain is simply setting to zero the coefficients above a threshold.
**Convolution = multiplication in the frequency domain:** (f * g)(x) ↔ F̂(ω) · Ĝ(ω) **Filtering in the frequency domain:** 1. FFT(signal) → frequency representation 2. Multiply by filter mask H(ω) 3. IFFT → filtered signal **Low-pass filter:** H(ω) = 1 for |ω| ≤ ω_c, else 0 **High-pass filter:** H(ω) = 1 for |ω| > ω_c, else 0 **JPEG** uses the DCT (Discrete Cosine Transform), the real-valued version of the DFT.
Why is a low-pass filter in the frequency domain equivalent to convolution with a smoothing kernel in the time domain?
Key Ideas
- Orthogonality: ∫sin(nx)cos(mx)dx = 0, ∫cos(nx)cos(mx)dx = π·δₙₘ, basis for computing coefficients
- Dirichlet's theorem: convergence to the average at jump discontinuities
- Gibbs phenomenon: ~8.95% overshoot near jumps does not vanish as N → ∞
- Filtering = spectrum × mask (convolution theorem)
Related Topics
Fourier series unite trigonometry, analysis, and engineering:
- Complex Trigonometry — Euler's formula is the foundation of the complex Fourier series form
- Trigonometry in Machine Learning — Positional encodings in transformers are Fourier features
Вопросы для размышления
- Prove Parseval's theorem: how are the energy of a signal in the time and frequency domains related? Use the orthogonality of the basis.
- The Gibbs phenomenon cannot be eliminated by adding more harmonics. How is it handled in practice? What are window functions (Hann, Hamming)?
- What is the Fourier series of f(x) = |sin x|? Compute the first few coefficients.