JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Explicit vs Implicit: Crank-Nicolson

The explicit scheme is cheap per step but lives in fear of a tiny time-step limit; the implicit scheme solves a system every step but never blinks. Crank-Nicolson splits the difference down the middle and earns second-order accuracy for the trouble.

The fork in the road: now or later?

By now you can take the heat equation u_t = k u_xx, lay down a grid, and replace each derivative by a finite difference. The very first scheme anyone writes is the explicit one, FTCS: a forward difference in time, a centered difference in space. It is irresistible because it tells you the new value at a grid point directly — you just read off the three neighbours from the level you already know and add them up. No solving, no fuss, march forward.

But there is a second, equally natural choice that beginners almost never write first. What if, when you form the spatial difference u_xx, you evaluate it at the new time level instead of the old one? Now the three unknowns at the next step are tangled together inside one equation, and you cannot just read off an answer — you must solve a linear system across the whole row of the grid at once. This is the implicit scheme (backward Euler in time). It costs more per step, and in return it buys something the explicit scheme cannot: it never goes unstable.

explicit (FTCS):  u_new[j] = u[j] + r*( u[j-1] - 2u[j] + u[j+1] )     r = k*dt/dx^2
                  -> one formula, read three old neighbours, done.

implicit (BE):    -r*u_new[j-1] + (1+2r)*u_new[j] - r*u_new[j+1] = u[j]
                  -> a tridiagonal system, solve the whole row at once.
Same heat equation, same grid — the only change is which time level the u_xx term lives on.

Why explicit lives on a leash

The previous guide armed you with von Neumann analysis: feed a single Fourier mode e^(i m x) into the scheme and watch its amplitude get multiplied by a growth factor g each step. The mode survives only if |g| ≤ 1. Run that machine on FTCS and you get g = 1 - 4r·sin^2(m·dx/2), where r = k·dt/dx^2 is the mesh ratio. The worst mode (the jagged saw-tooth) drives sin^2 to 1, giving g = 1 - 4r. For |g| ≤ 1 we need 1 - 4r ≥ -1, that is r ≤ 1/2.

That innocent r ≤ 1/2 is a tyrant. It says dt ≤ dx^2 / (2k): the time-step is shackled to the square of the space-step. Halve dx to get a finer picture and you must quarter dt — so refining the mesh by 10x in space forces 100x more time-steps. This is the parabolic cousin of the CFL condition, and for diffusion it bites far harder than for waves, because of that square. Break it and you do not get a merely inaccurate answer; you get an explosion, the saw-tooth amplifying without bound until the numbers overflow.

Implicit: unconditionally calm, but blurry

Now run the same von Neumann check on the implicit (backward Euler) scheme. The growth factor comes out as g = 1 / (1 + 4r·sin^2(m·dx/2)). Look at it: the denominator is always at least 1, so |g| ≤ 1 for every value of r, no matter how large. The implicit scheme is unconditionally stable — you may take dt as big as you like and it will never blow up. The dt ≤ dx^2/(2k) leash is simply gone.

This sounds like a free lunch, and the honest correction is important: stable is not the same as accurate. Backward Euler is only first-order in time, meaning its time error shrinks like dt, not dt^2. With a huge dt it stays calm, yes — but it over-damps. The fast, wiggly modes that should decay quickly get crushed too aggressively; sharp features smear out faster than the real equation would smear them. You traded the explosion for a kind of artificial fog. For pure backward heat or any genuinely ill-posed target this extra damping is no rescue — implicitness fixes stability of the scheme, never the well-posedness of the problem.

Crank-Nicolson: split the difference

Here is the beautiful idea. Explicit evaluates u_xx entirely at the old time; implicit evaluates it entirely at the new time. So average the two. Take half of the old spatial difference and half of the new one. This is the Crank-Nicolson scheme, and geometrically it is the trapezoidal rule in time — you step using the average of the slopes at the two endpoints rather than committing to either end alone.

  1. Write the heat equation at the midpoint in time, halfway between step n and step n+1. Centering there is the secret to the accuracy.
  2. Approximate u_t by the simple forward difference (u_new - u_old)/dt — which is now a centered difference about that midpoint, so it is second-order accurate, not first.
  3. Approximate u_xx by the average of the centered space difference at the old level and at the new level — half old, half new.
  4. Collect all the new-level unknowns on the left. You again get a tridiagonal linear system, just like the implicit scheme, solvable fast by the Thomas algorithm.

What does the von Neumann factor say now? You get g = (1 - 2r·sin^2)/(1 + 2r·sin^2), a ratio whose magnitude is at most 1 for every r — so Crank-Nicolson is unconditionally stable, just like the implicit scheme. But because it is centered in time, its truncation error is O(dt^2) and O(dx^2): second-order in both. You get the implicit scheme's freedom from the dt ≤ dx^2 leash and the accuracy the implicit scheme threw away. That combination — unconditional stability plus second-order accuracy — is exactly why Crank-Nicolson is the default workhorse for parabolic problems.

The fine print, and why it still works

Unconditional stability has a sly catch worth stating plainly. For the jagged saw-tooth mode, as r grows large the Crank-Nicolson factor g approaches -1, not 0. So a sharp, high-frequency wiggle is not damped — it survives at nearly full amplitude while flipping sign every step, producing decaying-but-oscillating ripples near steep fronts or a discontinuous initial jump. The scheme is stable (nothing blows up) yet can look ugly. The cure is mild: take a couple of strongly-damping backward-Euler steps first to kill the worst modes, then switch to Crank-Nicolson — the well-known Rannacher start-up.

Step back and notice the deeper lesson, which is just the Lax equivalence theorem from the last guide doing its job. Every scheme here is consistent — each reduces to u_t = k u_xx as dt, dx → 0. So for a well-posed linear problem, convergence hinges entirely on stability. The explicit scheme converges only inside r ≤ 1/2; the implicit and Crank-Nicolson schemes converge for any r. Choosing a scheme is therefore not about whether it converges in principle but about the trade you want: cost per step versus how small a dt you are forced to take, and first-order calm versus second-order sharpness.