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.
Practice Problems
Hint
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).\)
Hint
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.
Hint
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.