MTH 492 · Numerical Methods
Our notes
2 min readThe scheme
For u_t = u_xx (taking α = 1), replace u_t by a forward difference and u_xx by a central one:
(uᵢⁿ⁺¹ − uᵢⁿ)/k = (uᵢ₋₁ⁿ − 2uᵢⁿ + uᵢ₊₁ⁿ)/h²
uᵢⁿ⁺¹ = r uᵢ₋₁ⁿ + (1 − 2r) uᵢⁿ + r uᵢ₊₁ⁿ, with r = k/h².
Each new value comes explicitly from three old ones: no system to solve. Error O(k + h²).
Stability
The scheme is stable only if r ≤ ½. With r = ½ it becomes uᵢⁿ⁺¹ = (uᵢ₋₁ⁿ + uᵢ₊₁ⁿ)/2: the average of the two neighbours.
Von Neumann analysis: put uᵢⁿ = Gⁿ e^{iβih}. Then G = 1 − 4r sin²(βh/2). Stability needs |G| ≤ 1 for every β, giving r ≤ ½.
Worked example
u_t = u_xx, 0 < x < 1, u(0, t) = u(1, t) = 0, u(x, 0) = sin πx. Exact u = e^{−π²t} sin πx. Take h = 0.25, r = ½, so k = 0.03125.
Start: u = (0, 0.70711, 1, 0.70711, 0).
- Step 1 (t = 0.03125): middle = (0.70711 + 0.70711)/2 = 0.70711; sides = (0 + 1)/2 = 0.5. So u = (0, 0.5, 0.70711, 0.5, 0). Exact middle: 0.7346.
- Step 2 (t = 0.0625): middle = (0.5 + 0.5)/2 = 0.5; sides = 0.70711/2 = 0.35355. Exact middle: 0.5396.
The shape stays a sine and decays, as it should; the error comes from the coarse h.
What instability looks like
Take r = 1 and a jagged start (0, 1, −1, 1, 0). The update is uᵢ₋₁ − uᵢ + uᵢ₊₁:
- Step 1: (0, −2, 3, −2, 0)
- Step 2: (0, 5, −7, 5, 0)
The values grow and swap sign each step: rounding errors (which are always jagged) would do the same. The true solution only decays.
Check step 1, middle node: the neighbours are 1 and 1 and the node is −1, so 1 − (−1) + 1 = 3. ✓
The cost of explicit stability
k ≤ h²/2: halving h forces a quarter of the time step, so four times the steps on twice the nodes: eight times the work. This drives us to implicit schemes.
Lax equivalence theorem
For a consistent linear scheme, stability ⇔ convergence. Consistency alone is not enough.
Exams usually ask
- Carry out two time steps of the explicit scheme.
- Derive the stability condition by von Neumann analysis.
Common mistake
Choosing k without checking r. Work out r = k/h² first; if it is above ½, the answers are meaningless.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
FTCS scheme
(opens en.wikipedia.org in a new tab)
Wikipedia, FTCS scheme, CC BY-SA 4.0 · licence
-
Von Neumann stability analysis
(opens en.wikipedia.org in a new tab)
Wikipedia, Von Neumann stability analysis, 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
-
Best pick Solving the heat equation | DE3
14 min · ≈ 63 MB · about ₦35
(opens youtube.com in a new tab)
-
Explicit Methods for Solving the Diffusion Equation | Lecture 69 | Numerical Methods for Engineers
14 min · ≈ 63 MB · about ₦35
(opens youtube.com in a new tab)
-
Chapter 10.02: Lesson: Parabolic Partial Differential Equations: Explicit Method: Example
13 min · ≈ 59 MB · about ₦33
(opens youtube.com in a new tab)
-
Heat Equation Explicit FTCS part 1
15 min · ≈ 68 MB · about ₦38
(opens youtube.com in a new tab)
-
Stability of Forward Euler and Backward Euler Integration Schemes for Differential Equations
33 min · ≈ 149 MB · about ₦84
(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.