On this page
The finite difference method replaces a rod with a row of points, replaces time with small steps, and turns derivatives into subtraction. It has one catch: pick the time step too large and the answer falls apart. Below we work it by hand on a five-point rod, then show where the stability rule comes from and what failure looks like.
What is the finite difference method for the heat equation?
The heat equation u_t = u_xx says a point colder than the average of its neighbours warms up, and a point hotter than them cools down.
Put grid points a distance Δx apart along the rod and move forward in time steps of Δt. Write u(i, n) for the temperature at point i after n steps. Replacing the time derivative with a forward difference and the second space derivative with a central difference gives the explicit scheme, also called FTCS (forward time, centred space), described on the FTCS scheme page:
u(i, n+1) = u(i, n) + r [u(i+1, n) − 2u(i, n) + u(i−1, n)], where r = Δt/Δx².
The FTCS scheme is first order in time and second order in space (FTCS scheme). It is called explicit because each new value comes straight from old values, with no equations to solve.
If the second-difference idea feels shaky, the Fermi Concept Library has a lesson for every concept in mathematics and physics, so you can revisit derivatives and curvature first.
How do you compute the grid by hand?
Take a rod of length 1 with both ends held in ice at 0 °C. Use Δx = 0.25, so the points sit at x = 0, 0.25, 0.5, 0.75 and 1. The starting temperatures are 0, 50, 100, 50, 0 °C: hot in the middle.
Choose r = 0.5, so Δt = 0.5 × 0.0625 = 0.03125. At r = 0.5 the −2u term cancels the old value exactly, and the FTCS update becomes simple: each new interior value is the average of its two neighbours. The end values stay at 0.
Step 1: 0, 50, 50, 50, 0 (the centre is the average of 50 and 50).
Step 2: 0, 25, 50, 25, 0.
Step 3: 0, 25, 25, 25, 0.
Step 4: 0, 12.5, 25, 12.5, 0.
Heat leaks out through the cold ends and no value leaves the range 0 to 100 °C, just as in a real rod.
Why must r = Δt/Δx² be at most 1/2?
Rearrange the update as u(i, n+1) = (1 − 2r) u(i, n) + r u(i−1, n) + r u(i+1, n). The weights add up to 1. When r ≤ 1/2 none is negative, so each new value is an average of old ones and stays between the coldest and hottest. When r > 1/2, the weight on the point itself turns negative and the average overshoots.
Von Neumann stability analysis makes this exact. It follows each wave-shaped error mode and finds that every step multiplies it by G = 1 − 4r sin²(θ/2), where θ sets how fast the mode wiggles; errors stay bounded only if |G| ≤ 1, which gives r ≤ 1/2 (von Neumann stability analysis).
The explicit scheme for the heat equation is stable if and only if Δt ≤ Δx²/2, that is r ≤ 1/2 (FTCS scheme).
The price: halve Δx and Δt must shrink to a quarter, so you do eight times the work.
What does blow-up look like at r = 0.6?
Same rod, same start, but r = 0.6 (Δt = 0.0375). The rule is now new value = −0.2 × own value + 0.6 × (sum of neighbours). Working it by hand, the interior values are:
Step 1: 50, 40, 50.
Step 2: 14, 52, 14.
Step 3: 28.4, 6.4, 28.4.
Step 4: −1.84, 32.8, −1.84.
At step 4 two points read below 0 °C, which is impossible for a rod with no heat source between two ends at 0 °C. From here a sawtooth takes over. On this grid the fastest-wiggling mode has G = 1 − 2.4 sin²(3π/8), about −1.05, from the von Neumann analysis: it flips sign and grows every step. By step 50 the centre reads about 156 °C with its neighbours near −111 °C; by step 100 the centre is about 1,670 °C. A finer grid makes it worse, because its fastest modes have G close to 1 − 4(0.6) = −1.4.
How do you check an explicit heat-equation solution?
Compute r = Δt/Δx² and confirm it is at most 0.5.
Check that the boundary values stay fixed at what you set.
Watch for any value outside the range of the starting and boundary temperatures.
Look for a sawtooth: neighbouring points moving in opposite directions.
Halve Δx, quarter Δt, and confirm the answer barely changes.
To practise more, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



