Fourier Series of Period 2π & Arbitrary Period 2L: Dirichlet Conditions & Euler's Formulae
Idea in plain words
Fourier Series expresses periodic f(x) as an infinite trigonometric polynomial: f(x) = a₀/2 + ∑_{n=1}^∞ [a_n cos(nπx/L) + b_n sin(nπx/L)].
Exam tip
High-yield exam topic (Very High).
Explanation
Fourier series decomposes periodic non-sinusoidal waveforms into linear combinations of harmonic sinusoids. Orthogonality of sine and cosine functions allows individual harmonic coefficients a_n and b_n to be extracted independently via definite integration over one period, analogous to projecting vectors onto an orthogonal coordinate basis in Hilbert space.
Key points
- Dirichlet's Conditions for Convergence:
-
- f(x) is single-valued and bounded in interval (-L, L).
-
- f(x) has a finite number of maxima and minima in any period.
-
- f(x) has a finite number of finite discontinuities in any period.
- Value at Discontinuity x₀: Fourier series converges to [f(x₀+) + f(x₀-)] / 2.
- Euler's Formulae for Period 2L (-L to L):
- a₀ = (1/L) ∫_{-L}^L f(x) dx,
- a_n = (1/L) ∫_{-L}^L f(x) cos(nπx/L) dx,
- b_n = (1/L) ∫_{-L}^L f(x) sin(nπx/L) dx.
- Orthogonality Relations of Trigonometric Functions: ∫{-L}^L cos(mπx/L) cos(nπx/L) dx = L δ{mn}; ∫{-L}^L sin(mπx/L) sin(nπx/L) dx = L δ{mn}; ∫_{-L}^L cos(mπx/L) sin(nπx/L) dx = 0.
Example
Example
For f(x) = |x| on [-π, π]: Since f is even, b_n = 0. a₀ = π. a_n = (2/π) ∫0^π x cos(nx) dx = (2/(π n²))[(-1)^n - 1]. For odd n, a_n = -4/(π n²); for even n, a_n = 0. f(x) = π/2 - (4/π) ∑{odd} cos(nx)/n².
Code examples
// Complete Fourier Expansion: f(x) = x + x^2 on (-π, π)
// Step 1: Calculate a0:
// a0 = (1/π) ∫_{-π}^π (x + x^2) dx = (1/π) [ (x^2/2) + (x^3/3) ]_{-π}^π
// = (1/π) [ (π^3/3) - (-π^3/3) ] = (2π^2) / 3
// Therefore: a0 / 2 = π^2 / 3
//
// Step 2: Calculate an:
// an = (1/π) ∫_{-π}^π (x + x^2) cos(nx) dx
// = (1/π) [ ∫_{-π}^π x cos(nx) dx (ODD=0) + 2 ∫_0^π x^2 cos(nx) dx ]
// Integrate by parts:
// ∫_0^π x^2 cos(nx) dx = [ x^2 (sin nx / n) ]_0^π - ∫_0^π 2x (sin nx / n) dx
// = 0 - (2/n) [ x (-cos nx / n) - ∫ (-cos nx / n) dx ]_0^π
// = (2/n^2) [ π cos(nπ) ] = (2π / n^2) (-1)^n
// Therefore: an = (2/π) * [ (2π / n^2) (-1)^n ] = 4 (-1)^n / n^2
//
// Step 3: Calculate bn:
// bn = (1/π) ∫_{-π}^π (x + x^2) sin(nx) dx
// = (1/π) [ 2 ∫_0^π x sin(nx) dx + ∫_{-π}^π x^2 sin(nx) dx (ODD=0) ]
// = (2/π) [ x (-cos nx / n) - (1) (-sin nx / n^2) ]_0^π
// = (2/π) [ -π (-1)^n / n ] = -2 (-1)^n / n = 2 (-1)^{n+1} / n
//
// Step 4: Resulting Fourier Series:
// f(x) = π^2/3 + ∑_{n=1}^∞ [ (4(-1)^n / n^2) cos(nx) + (2(-1)^{n+1} / n) sin(nx) ]
//
// Step 5: Deduction at x = π:
// At continuous boundary point x = π (average of f(π) and f(-π)):
// f(π) = (-π + π^2 + π + π^2)/2 = π^2
// π^2 = π^2/3 + 4 ∑_{n=1}^∞ [ (-1)^n (-1)^n / n^2 ] = π^2/3 + 4 ∑ (1/n^2)
// (2π^2 / 3) = 4 ∑ (1/n^2) => ∑_{n=1}^∞ (1 / n^2) = π^2 / 6 (Euler's Basel Problem!)
Exam questions
- [8 Marks] Find the Fourier series of f(x) = x sin x in the interval -π < x < π. Hence deduce that 1/(1·3) - 1/(3·5) + 1/(5·7) - ... = (π - 2) / 4.
- [8 Marks] Obtain the Fourier series for f(x) = e^{-x} in the interval 0 < x < 2π.
- [7 Marks] State Dirichlet's conditions for the expansion of a function in Fourier series.