The same differential equation is solved by four methods with the same step h. When the equation is stiff, explicit methods must use tiny steps or blow up; an implicit method stays calm. Watch carts follow, or fly off, and read the growth factor per step.
A method is stable while its growth factor is below 1. The vertical mark is the current h.
The science
Stiff test problem (Prothero and Robinson): x' = −λ (x − cos t) − sin t, exact x = cos t + (x₀ − 1) e^(−λt). The solution is smooth, yet a large λ forces explicit methods to use steps below a stability limit, not an accuracy limit.
Oscillator: x'' + 2ζω x' + ω² x = 0 with x(0) = x₀, x'(0) = 0, solved in closed form for under-, critical and overdamped cases.
Methods: explicit Euler y + h f, Heun (RK2), classical RK4, and backward Euler solving (I − hJ) y₁ = y₀ + h g(t₁). For y' = −λy the one-step factors are 1 − hλ, 1 − hλ + (hλ)²/2, the RK4 Taylor polynomial, and 1/(1 + hλ). Explicit Euler is stable for hλ < 2, RK4 for hλ < 2.785, backward Euler always. The global error shrinks like hp with p = 1, 2, 4, 1.
For systems the growth factor is the spectral radius of the one-step matrix; the chart computes it numerically.
Simplifications: linear problems only, fixed step, double-precision arithmetic, and a solution is flagged as diverged when |x| exceeds 50. The cart animation shows the latest completed step.