Prev
Unit 9 · Ordinary Differential Equations: Initial Value Problems
Stiff Equations and Implicit Methods
65m100 XP
Next
🛰️Ordinary Differential Equations: Initial Value Problems

Stiff Equations and Implicit Methods

Stiffness and stability regions, backward Euler and the trapezoidal rule, A- and L-stability, BDF, Newton inside each step

Madison, 1952 — Berkeley, 1973
Charles Curtiss and Joseph Hirschfelder, chemists at the University of Wisconsin, publish Integration of Stiff Equations in the Proceedings of the National Academy of Sciences. Their problem is chemical kinetics: in a flame or a reactor some radicals form and disappear in microseconds, while the overall composition evolves over seconds. Once the fast species settle into balance, nothing in the solution changes quickly. Yet every explicit method they try keeps taking microsecond steps, for ever, as if the fast reactions were still happening. They name the phenomenon — stiffness — and propose an implicit method that escapes it. In the early 1970s Bill Gear at Illinois turns implicit backward-differentiation formulas into robust, variable-order software (1971). In 1973 Laurence Nagel and Donald Pederson at Berkeley release SPICE, a circuit simulator whose equations are stiff for the same reason: picosecond transistor time constants inside microsecond circuits. SPICE uses implicit integration — the trapezoidal rule and Gear's formulas — and every integrated circuit designed since has been simulated by its descendants.
Recall lesson 9-3's test equation y′=λyy' = \lambda y with Re⁡λ<0\operatorname{Re}\lambda < 0: one step multiplies yy by an amplification factor R(z)R(z), z=hλz = h\lambda. Explicit Euler gives R=1+zR = 1 + z: the numerical solution decays only if ∣1+hλ∣≤1|1 + h\lambda| \le 1. For λ=−1000\lambda = -1000 that means h<0.002h < 0.002 — whatever accuracy we want. The set of zz with ∣R(z)∣≤1|R(z)| \le 1 is the method's region of absolute stability; every explicit method has a bounded one.
💡What stiffness is
A system is stiff when it contains decaying modes much faster than the behaviour we want to follow. For a linear system y′=Ay\mathbf y' = A\mathbf y the modes are the eigenvalues of AA (Unit 6): if λfast=−106\lambda_{fast} = -10^6 and the solution of interest varies on a time scale of 1, an explicit method needs h≈10−6h \approx 10^{-6} for stability although h≈10−2h \approx 10^{-2} would be accurate. Stiffness is not about the solution being hard — it is about the method's stability limit being far stricter than its accuracy needs. On y′=−1000(y−cos⁡t)−sin⁡ty' = -1000(y - \cos t) - \sin t, whose solution is just cos⁡t\cos t after a 1 ms transient, explicit Euler with h=0.0019h = 0.0019 is fine and with h=0.0021h = 0.0021 the error is 103310^{33}.
Derivation
Why one test equation speaks for every linear system
Take y′=Ay\mathbf y' = A\mathbf y with A=VΛV−1A = V\Lambda V^{-1} (eigenvectors in VV, eigenvalues on the diagonal of Λ\Lambda, Unit 6). Change variables to w=V−1y\mathbf w = V^{-1}\mathbf y, the components along the eigenvectors:
w′=V−1Ay=V−1AV w=Λw,that iswi′=λiwi  for each i.\mathbf w' = V^{-1}A\mathbf y = V^{-1}AV\,\mathbf w = \Lambda\mathbf w, \qquad\text{that is}\qquad w_i' = \lambda_iw_i \ \text{ for each } i.
The system falls apart into independent copies of the test equation, one per eigenvalue. Euler, RK4, the Adams methods and the implicit methods below are all linear in y\mathbf y when ff is linear, so applying them to y\mathbf y is the same as applying them to each wiw_i separately. The step is stable only if every zi=hλiz_i = h\lambda_i lies in the stability region — including the fastest mode, even after it has decayed to nothing. With λ=−106\lambda = -10^6 in the system, an explicit method needs h≲2×10−6h \lesssim 2 \times 10^{-6} for ever. For a nonlinear system the same reasoning applies locally, with the eigenvalues of the Jacobian ∂f/∂y\partial\mathbf f/\partial\mathbf y.
backward Euler: yn+1=yn+hf(tn+1,yn+1),R(z)=11−z;trapezoidal: yn+1=yn+h2(fn+fn+1),R(z)=1+z/21−z/2\text{backward Euler: } y_{n+1} = y_n + hf(t_{n+1}, y_{n+1}), \quad R(z) = \frac{1}{1-z};\qquad \text{trapezoidal: } y_{n+1} = y_n + \tfrac h2\big(f_n + f_{n+1}\big),\quad R(z) = \frac{1 + z/2}{1 - z/2}

Implicit methods evaluate the slope at the unknown new point. Each step requires solving an equation — linear for linear problems, otherwise by Newton's method (Unit 2) with the Jacobian ∂f/∂y.

Derivation
The amplification factors, and Newton inside the step
Backward Euler on y′=λyy' = \lambda y: yn+1=yn+hλyn+1y_{n+1} = y_n + h\lambda y_{n+1}. Solve for the new value:
yn+1=11−z yn.y_{n+1} = \frac{1}{1 - z}\,y_n.
For Re⁡z≤0\operatorname{Re}z \le 0, ∣1−z∣≥1|1 - z| \ge 1 (the point zz is at least as far from 1 as 0 is), so ∣R∣≤1|R| \le 1: stable for every step. As z→−∞z \to -\infty, R→0R \to 0.
The trapezoidal rule: yn+1=yn+z2(yn+yn+1)y_{n+1} = y_n + \tfrac z2(y_n + y_{n+1}), so (1−z2)yn+1=(1+z2)yn(1 - \tfrac z2)y_{n+1} = (1 + \tfrac z2)y_n and
R(z)=1+z/21−z/2.R(z) = \frac{1 + z/2}{1 - z/2}.
∣R∣≤1|R| \le 1 exactly when zz is at least as close to −2-2 as to +2+2 — the whole left half-plane. As z→−∞z \to -\infty, R→−1R \to -1.
Newton inside the step. For a nonlinear ff, backward Euler's new value is the root of G(y)=y−yn−h f(tn+1,y)=0G(\mathbf y) = \mathbf y - \mathbf y_n - h\,\mathbf f(t_{n+1}, \mathbf y) = \mathbf 0. Newton's method (lesson 2-4) needs its Jacobian, I−h ∂f/∂yI - h\,\partial\mathbf f/\partial\mathbf y, and solves (I−hJ)Δ=−G(I - hJ)\boldsymbol\Delta = -G at each iteration, starting from the previous step's value — which is usually so close that one to three iterations suffice. The matrix I−hJI - hJ changes slowly, so solvers factorise it once (Unit 3) and reuse the factors for many steps.
💡A-stability and L-stability
A method is A-stable if its stability region contains the entire left half-plane: no decaying mode can make it blow up, whatever hh. Backward Euler and the trapezoidal rule are both A-stable. Dahlquist's second barrier (1963): no explicit method, and no linear multistep method of order above 2, is A-stable. For very stiff modes a stronger property matters. As z→−∞z \to -\infty, backward Euler's R(z)→0R(z) \to 0 — the stiff mode is damped out in one step (L-stability). The trapezoidal rule's R(z)→−1R(z) \to -1: a stiff mode is not amplified, but it rings, flipping sign every step and decaying only slowly. With z=−100z = -100, backward Euler reduces a stiff component by a factor 100 per step; the trapezoidal rule only to 0.96 of its size, with alternating sign. Circuit simulators know this ringing well.
BDF methods. The backward differentiation formulas differentiate an interpolating polynomial through yn+1,yn,…y_{n+1}, y_n, \dots and set its derivative at tn+1t_{n+1} equal to f(tn+1,yn+1)f(t_{n+1}, y_{n+1}). BDF1 is backward Euler; BDF2 is 32yn+1−2yn+12yn−1=hfn+1\tfrac32y_{n+1} - 2y_n + \tfrac12y_{n-1} = hf_{n+1}. Orders 1 and 2 are A-stable; orders 3–6 are stable in almost the whole left half-plane — enough for most stiff problems. They are the core of Gear's codes, of solve_ivp(method='BDF') and of LSODA. Radau IIA implicit Runge–Kutta methods (method='Radau') are A- and L-stable at order 5, at the price of solving a larger system each step.
Derivation
BDF2 from a backward difference
Approximate y′(tn+1)y'(t_{n+1}) using the new value and the two before it. Expand the old values about tn+1t_{n+1}:
yn=yn+1−hy′+h22y′′−…,yn−1=yn+1−2hy′+2h2y′′−…y_n = y_{n+1} - hy' + \tfrac{h^2}{2}y'' - \dots, \qquad y_{n-1} = y_{n+1} - 2hy' + 2h^2y'' - \dots
Look for the combination that keeps y′y' and cancels y′′y'': 3yn+1−4yn+yn−13y_{n+1} - 4y_n + y_{n-1}. The yy terms give 3−4+1=03 - 4 + 1 = 0, the y′y' terms 4h−2h=2h4h - 2h = 2h, the y′′y'' terms −2h2+2h2=0-2h^2 + 2h^2 = 0. So
y′(tn+1)=3yn+1−4yn+yn−12h+O(h2).y'(t_{n+1}) = \frac{3y_{n+1} - 4y_n + y_{n-1}}{2h} + O(h^2).
Setting this equal to f(tn+1,yn+1)f(t_{n+1}, y_{n+1}) and multiplying by hh gives 32yn+1−2yn+12yn−1=hfn+1\tfrac32y_{n+1} - 2y_n + \tfrac12y_{n-1} = hf_{n+1} — BDF2. (This one-sided formula is also the derivative of the quadratic through the three points, which is how the higher BDF formulas are built.) Like backward Euler it evaluates ff only at the new point, which is what gives it stability far into the left half-plane.
My methods are really methods of working and thinking; this is why they have crept in everywhere anonymously.
– Emmy Noether, letter to Helmut Hasse (1931)
📐Robertson's kinetics
H. H. Robertson's 1966 test problem: three species, rate constants 0.040.04, 10410^4 and 3×1073 \times 10^7 — nine orders of magnitude apart. solve_ivp with RK45 needs 7,088 steps and 49,718 evaluations just to reach t=10t = 10, and about 1.7 million steps to reach t=1000t = 1000. Radau reaches t=1000t = 1000 in 115 steps, BDF in 211 steps with 569 evaluations, LSODA (which switches automatically between Adams and BDF) in 327 steps — all agreeing that y1(1000)=0.33687y_1(1000) = 0.33687, and conserving total mass to 10−1610^{-16}. Supplying the Jacobian jac= lets the implicit methods' Newton iterations converge quickly.
💡Where you will use this
Rocket Propulsion: finite-rate chemistry in combustion chambers and nozzles is the classic stiff problem. Power Electronics and Circuits: switching converters mix nanosecond switching with millisecond control loops. Structures: very stiff elements beside flexible ones make the semi-discretised equations of motion stiff; implicit Newmark methods are the norm. Heat transfer and PDEs (Unit 10): the method of lines turns diffusion into a stiff ODE system whose stiffness grows as the mesh is refined.
📚Further reading
  • Ernst Hairer and Gerhard Wanner, Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems (2nd ed., Springer, 1996) — stiffness, A- and L-stability, BDF and Radau methods.
  • C. F. Curtiss and J. O. Hirschfelder, 'Integration of stiff equations', Proceedings of the National Academy of Sciences 38(3), 235–243 (1952) — the paper of the cold open.
  • C. William Gear, Numerical Initial Value Problems in Ordinary Differential Equations (Prentice-Hall, 1971) — the book that turned BDF methods into software.
↓But there is a problem
Implicit methods make stiff problems tractable by being stable: errors decay instead of grow. But stability is a weak promise. A method can be perfectly stable and still slowly, systematically get the physics wrong — losing energy from an orbit that should conserve it, or gaining it. In 1907 the Norwegian mathematician Carl Størmer wanted to know why the aurora appears in rings around the magnetic poles. He computed, by hand, the paths of charged particles spiralling in the Earth's magnetic field — hundreds of trajectories over thousands of hours of calculation. The method he chose was so simple that physicists rediscovered it sixty years later, and found that it preserved something every other method lost.