Numerical Stability, Error and Stiffness

Distinguish accuracy from stable propagation and identify a stiffness restriction.

Builds on Midpoint, Heun and Runge–Kutta Methods

The bigger question: How do we trust a numerical trajectory?

On this page

The idea

Accuracy asks how close a numerical solution is to the exact one. Stability asks how errors and modes propagate. A method can have a small local truncation error yet amplify unwanted modes over many steps. The test equation y′=λyy'=\lambda y exposes this behavior.

Visual guide

VISUAL GUIDEA decaying equation can produce growing numerical steps
For y′ = −10y and Euler step h = 0.3, each step multiplies by −2. The numerical states alternate and grow while the exact solution approaches zero. This is instability, not physical oscillation.0-90.3-2.50.640.910.51.217ty
  • Exact e⁻¹⁰ᵗ
  • Euler with h = 0.3
For y′ = −10y and Euler step h = 0.3, each step multiplies by −2. The numerical states alternate and grow while the exact solution approaches zero. This is instability, not physical oscillation.

Method and assumptions

Explicit Euler has amplification R(z)=1+zR(z)=1+z, with z=hλz=h\lambda. Absolute stability requires ∣1+hλ∣<1|1+h\lambda|<1 for a decaying mode. On λ=−k<0\lambda=-k<0, this becomes 0<hk<20<hk<2. Backward Euler instead gives R(z)=1/(1−z)R(z)=1/(1-z) and is stable for all negative real zz, though a large step can still be inaccurate.

Worked example: spurious growth

For y′=−10yy'=-10y, explicit Euler with h=0.3h=0.3 multiplies each step by 1−3=−21-3=-2. The exact solution decays, but the numerical values alternate and double. With h=0.1h=0.1, the factor is zero: stable, yet it erases the solution after one step and can be a poor approximation.

PAUSE & THINKA quick check, not a grade

Try it yourself.

Choose an answer and explain your reasoning to yourself. Use a hint if you get stuck.

For y′=−10y, which positive Euler step size gives decaying iterates?

Hint 1 · Find a starting point

Euler multiplies each iterate by 1−10h.

Hint 2 · Take the next step

Decay requires |1−10h|<1.

Show the reasoning

Answer: h=0.1

h=0.1 gives factor 0; h=0.3 gives −2 and grows, while h=0.2 gives −1 and does not decay.

Before moving on: what would make one of the other answers wrong? Saying why is part of understanding.

Worked example: separated time scales

A system with eigenvalues −1-1 and −1000-1000 has a slowly varying mode and a fast transient. Explicit Euler needs h<0.002h<0.002 for stability even after the fast transient becomes tiny. That restriction motivates an implicit method for stiff problems.

Interpreting the result

At hk=2hk=2, Euler’s factor is −1-1, so magnitude is preserved instead of decaying. This boundary is not asymptotic decay. Step refinement should inspect solution values and qualitative behavior, not only whether the program runs.

Practice

  1. Is Euler stable for λ=−4,h=0.2\lambda=-4,h=0.2?
  2. What is the factor for λ=−4,h=0.6\lambda=-4,h=0.6?
  3. Does unconditional stability imply arbitrary-step accuracy?
Show worked solutions
  1. Yes: 1+hλ=0.21+h\lambda=0.2, with magnitude below one.
  2. −1.4-1.4, so errors grow in magnitude.
  3. No. Stability controls propagation; truncation error still depends on step size.

Further study

MIT OpenCourseWare: Differential Equations provides a full university course with additional lectures and exercises.

MAKE IT YOURS

Pause before the next idea.

Can you explain how the visualization connects to this lesson’s goal? If a step still feels uncertain, put this lesson on your review list and try the check again another day.

Optional marks, not a grade. Saved in this browser only. Open notebook →