For the linear test equation y′ = λy, any fixed-step one-step method advances by yₙ₊₁ = R(z)yₙ with z = hλ. The method is absolutely stable at that point when repeated steps do not amplify the mode: |R(z)| ≤ 1. This simulator shades the stability regions in the complex z-plane for explicit Euler (R = 1 + z), RK2 (R = 1 + z + z²/2), and classical RK4 (R = 1 + z + z²/2 + z³/6 + z⁴/24). Sliders move λ and h, so the orange marker z = hλ moves through the map; a second pink marker multiplies the real part by a stiffness ratio to show how a fast decaying eigenmode can leave the stability region even when the slow mode looks harmless. The page is a geometric bridge between Runge–Kutta formulas, amplification factors, and the time-step restrictions that appear in stiff ODEs and PDE semi-discretizations.
Who it's for: Students in numerical ODEs, scientific computing, and computational physics learning stability functions, step-size restrictions, and why explicit RK methods struggle with stiffness.
Key terms
Runge–Kutta method
Absolute stability
Stability function
Euler method
RK2
RK4
Stiff ODE
Test equation
How it works
Plot absolute-stability regions for explicit Euler, RK2, and RK4 in the z = hλ plane for the test equation y′ = λy; compare amplification factors and see why stiff eigenvalues constrain explicit time steps.
Key equations
Test equation y′ = λy, z = hλ. Stability functions: R_E = 1+z, R_RK2 = 1+z+z²/2, R_RK4 = 1+z+z²/2+z³/6+z⁴/24. Stable when |R(z)| ≤ 1.
Frequently asked questions
Why use the test equation y′ = λy?
Near a steady state, many systems linearize to modes that behave like e^{λt}. A numerical method applies its own amplification R(hλ) to each mode, so the scalar test equation exposes whether a decaying continuous mode is also damped by the discrete method.
Why is RK4 not stable for every negative real λ?
Explicit RK stability regions are bounded. Along the negative real axis RK4 reaches only to about z ≈ −2.785. If λ is very negative, hλ leaves the region unless h is tiny. This is the classic explicit-step bottleneck for stiff decay.
Does being inside the region guarantee accuracy?
No. Stability only says the discrete mode does not grow spuriously. A point can be stable but inaccurate if h is too large for the desired error tolerance. Accuracy still depends on truncation error and problem smoothness.