Parameter
r = αΔt/Δx²
α = 1, Δx = 0.1, Δt = 0.004 gives 0.4.
For , the explicit forward-time central-space scheme is stable only if .
This page is easier if you are comfortable with:
Each new value is : a weighted average, provided . Beyond the weights are negative and rounding errors grow at each step. With , , : , stable. The largest step is , and gives : unstable. The equation is in the heat equation.
Because is tied to , halving the grid spacing needs four times as many time steps. For , : . A Fourier-mode analysis (separation of variables) shows the amplification factor is , which has size at most 1 only if .
The restriction is much stricter than the CFL condition and is why implicit methods such as Crank–Nicolson are used for diffusion. The step logic is that of Euler stability, and the spatial part is the central difference.
The explicit scheme for diffusion is stable only for small time steps tied to the square of the grid spacing.
The largest safe time step is 0.005.
These examples are worked by hand, step by step, so you can compare your own working.
Find for , , .
Find for with the same data.
Find the largest for , .
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
r = αΔt/Δx²
α = 1, Δx = 0.1, Δt = 0.004 gives 0.4.
r ≤ 1/2
FTCS scheme.
Δt ≤ Δx²/(2α) = 0.005
For Δx = 0.1.
u = (0, 1, 0), r = 0.4: centre becomes 1 − 2r = 0.2
Heat spreads.
The explicit (FTCS) scheme uⱼⁿ⁺¹ = uⱼⁿ + r(uⱼ₊₁ⁿ − 2uⱼⁿ + uⱼ₋₁ⁿ) with r = αΔt/Δx² is stable iff r ≤ 1/2. Halving Δx requires quartering Δt.
α = 1, Δx = 0.1, Δt = 0.004. Find r.
Find the largest stable Δt.
From (0, 1, 0) with r = 0.4 find the centre value after one step.
Find the centre after one step with r = 0.6.
wave condition ✗
Δt ≤ Δx²/(2α) ✓
Diffusion is quadratic in Δx.
r = 0.8 stable ✗
r ≤ 1/2 ✓
Strict limit is 1/2.
r = Δt/Δx² ✗
r = αΔt/Δx² ✓
Include diffusivity.
Δt ÷ 2 ✗
Δt ÷ 4 ✓
Δx² scaling.
Try each one on paper, then open the answer. Use the solver above to see the full working.
0.25
0.02
0.5
0.4
0.0025
0
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
When r = αΔt/Δx² ≤ 1/2.
Δt must be quartered.
Oscillations grow.
Implicit schemes such as Crank–Nicolson.
Crank–Nicolson scheme.
CFL condition.
More in Numerical methods and optimisation and the formula sheets.