Review / Part IV — PDEs & Fourier Series / Ch 20

Fourier Series for Periodic Functions

Ch 20 — Part IV — PDEs & Fourier Series

Any (reasonable) periodic function of period \(2L\) can be expanded in a Fourier series of sines and cosines — the spectral viewpoint on PDEs.

General Fourier series

For \(f\) periodic of period \(2L\): $$f(x) = \frac{a_0}{2} + \sum_{n=1}^\infty\left[a_n \cos\!\frac{n\pi x}{L} + b_n \sin\!\frac{n\pi x}{L}\right].$$ With orthogonality, the coefficients are $$a_n = \frac{1}{L}\int_{-L}^L f(x) \cos\!\frac{n\pi x}{L}\,dx,\quad b_n = \frac{1}{L}\int_{-L}^L f(x) \sin\!\frac{n\pi x}{L}\,dx.$$

Sine / cosine series

Odd extensions of \(f\) on \([0,L]\) yield sine series (all \(a_n = 0\)), natural for Dirichlet BCs. Even extensions yield cosine series, natural for Neumann BCs.

Convergence

If \(f\) is piecewise smooth, the Fourier series converges pointwise to \(f(x)\) at continuity points and to the average \(\tfrac{1}{2}(f(x^+) + f(x^-))\) at jumps. Gibbs phenomenon gives ~9% overshoot near jumps.

N = 1 N = 5 N = 25
Partial Fourier sums approaching a square wave.

Practice Problems

Problem 1medium
Find the sine series of \(f(x) = 1\) on \([0, \pi]\).
Hint
\(b_n = \frac{2}{\pi}\int_0^\pi \sin(nx)\,dx\).
Solution

\(b_n = \frac{2}{\pi}\cdot \frac{1 - \cos(n\pi)}{n} = \frac{2(1 - (-1)^n)}{n\pi}\). Nonzero only for odd \(n\): \(b_n = 4/(n\pi)\).

Answer: \(f = \sum_{n\;\text{odd}} \frac{4}{n\pi}\sin(nx).\)

Problem 2hard
Compute the Fourier cosine coefficients of \(f(x) = x\) on \([0, L]\).
Hint
\(a_0 = L,\; a_n = (2/L) \int_0^L x \cos(n\pi x/L)\,dx\).
Solution

Integrate by parts: \(a_n = \frac{2L((-1)^n - 1)}{(n\pi)^2}\). Zero for even \(n\); \(a_n = -4L/(n\pi)^2\) for odd \(n\).

Answer: See solution.

Problem 3medium
State Parseval's identity for a \(2L\)-periodic \(f\).
Hint
Sum of squared coefficients equals integral of \(|f|^2\).
Solution

$$\frac{1}{L}\int_{-L}^L |f|^2 dx = \frac{a_0^2}{2} + \sum_{n=1}^\infty (a_n^2 + b_n^2).$$

Answer: See solution.