MTH 492 · Numerical Methods
Our notes
2 min readThe explicit scheme
For u_tt = c² u_xx, central differences in both time and space give
uᵢⁿ⁺¹ = 2(1 − p²)uᵢⁿ + p²(uᵢ₋₁ⁿ + uᵢ₊₁ⁿ) − uᵢⁿ⁻¹, with p = ck/h (the Courant number).
Error O(k² + h²).
The CFL condition
The scheme is stable only if p ≤ 1 (Courant-Friedrichs-Lewy). Physically: in one time step the true wave travels ck; the numerical scheme only "sees" a distance h, so it must include the true domain of dependence: ck ≤ h.
Starting off
The scheme needs two old levels. With initial position f(x) and velocity g(x):
uᵢ¹ = uᵢ⁰ + k gᵢ + (p²/2)(uᵢ₋₁⁰ − 2uᵢ⁰ + uᵢ₊₁⁰)
(from a Taylor expansion and the PDE). With g = 0 and p = 1: uᵢ¹ = (uᵢ₋₁⁰ + uᵢ₊₁⁰)/2.
Worked example
A string fixed at both ends, u_tt = u_xx (c = 1), u(x, 0) = sin πx, released from rest. Exact u = cos πt sin πx. Take h = k = 0.25 (p = 1).
- t = 0: u = (0, 0.70711, 1, 0.70711, 0)
- t = 0.25: u₁ = (0 + 1)/2 = 0.5; u₂ = (0.70711 + 0.70711)/2 = 0.70711
- Exact at t = 0.25: cos(π/4) × sin(π/4) = 0.5 and cos(π/4) × 1 = 0.70711. ✓
With p = 1 the scheme is exact for the 1D wave equation: the grid lines are the characteristics x ± t = constant. With p < 1 there is a small error; with p > 1 the solution blows up.
Next step (p = 1)
uᵢⁿ⁺¹ = uᵢ₋₁ⁿ + uᵢ₊₁ⁿ − uᵢⁿ⁻¹. At t = 0.5, the middle node: 0.5 + 0.5 − 1 = 0, matching cos(π/2) = 0. ✓
First-order advection
u_t + a u_x = 0 (a > 0: a pulse moving right at speed a).
- Upwind scheme: uᵢⁿ⁺¹ = uᵢⁿ − ν(uᵢⁿ − uᵢ₋₁ⁿ), ν = ak/h ≤ 1. Stable, but smears sharp fronts (numerical diffusion).
- Lax-Wendroff: second order, sharper, but wiggles near jumps.
- FTCS (forward time, centred space) is unstable for every k: a famous trap.
Where it is used
Seismic waves (petroleum geophysics), acoustics, transmission lines, traffic and flood waves.
Exams usually ask
- Carry out two time steps for a plucked string.
- State and explain the CFL condition.
Common mistake
Using the explicit wave scheme for the first step without the special starting formula. The general formula needs uᵢ⁻¹, which does not exist.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Best pick Wave equation
(opens en.wikipedia.org in a new tab)
Wikipedia, Wave equation, CC BY-SA 4.0 · licence
-
Courant–Friedrichs–Lewy condition
(opens en.wikipedia.org in a new tab)
Wikipedia, Courant–Friedrichs–Lewy condition, CC BY-SA 4.0 · licence
-
NOUN MTH 422: Partial Differential Equations
NOUN course book (PDF, about 1 MB). Formation, first-order equations (Lagrange and Charpit), Cauchy problem, classification of second-order equations.
(opens nou.edu.ng in a new tab)
Watch
-
NUMERICAL SOLUTION OF HYPERBOLIC EQUATION | ONE DIMENSIONAL WAVE EQUATION | FINITE DIFFERENCE METHOD
15 min · ≈ 68 MB · about ₦38
(opens youtube.com in a new tab)
-
Hyperbolic Wave Equation
20 min · ≈ 90 MB · about ₦51
(opens youtube.com in a new tab)
-
The Wave Equation - PDE
17 min · ≈ 77 MB · about ₦43
(opens youtube.com in a new tab)
-
The Numerical Approach to 1D Wave Equation
10 min · ≈ 45 MB · about ₦25
(opens youtube.com in a new tab)
-
Lecture -34 : GFEM for hyperbolic PDEs; first order wave equation, skew-symmetric matrices
1 h 21 min · ≈ 365 MB · about ₦205
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.