A1342 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A13 · Lesson 42 · Multistep methods

Reusing past steps: Adams methods, BDF and what makes them stable

A Runge–Kutta method throws away everything it computed before each new step. Multistep methods keep the last few values of y or f and fit a polynomial through them, so a high-order step can cost a single new evaluation of f. The Adams family does this for smooth, non-stiff problems, and the backward differentiation formulas (BDF, called Gear's method in SPICE) do it for stiff circuits. The price is a new kind of stability to worry about, extra roots that can grow, and a startup problem, since the first step has no history.

  • The curves show the size of each method's amplification factor on y˙=λy for real z=hλ from −20 to 0. Below 1 means the numerical solution decays.
  • Adams–Bashforth 2 (AB2) is stable only for −1<z<0: beyond that, its extra root grows.
  • BDF2 stays below 1 for every negative z, and shrinks toward 0 as z goes to −∞, like backward Euler. That's why it suits stiff problems.

Predict

AB2 and RK2 are both second order. On a non-stiff problem, roughly how do their costs per step compare?

Name it

Linear multistep methods

A k-step method combines the last k values of y and f: ∑i=0kαiyn+i=h∑i=0kβifn+i. If βk=0 it's explicit; otherwise it's implicit and needs a solve each step.

The Adams family

Integrate a polynomial through recent values of f over the next step:

  • Adams–Bashforth 2 (explicit): yn+1=yn+h2(3fn−fn−1).
  • Adams–Moulton 2 (implicit, the trapezoidal rule): yn+1=yn+h2(fn+1+fn).
  • Predictor–corrector: predict with AB, evaluate f there, correct with AM. That gives AM's accuracy without solving an equation, but loses its stability for stiff problems.

Backward differentiation formulas

Fit a polynomial through recent values of y and require it to satisfy the ODE at the new point. BDF2: 3yn+1−4yn+yn−12=hfn+1. It's implicit, second order, stable for every negative hλ, and damps very fast modes strongly. In a circuit simulator, a capacitor stepped by BDF2 becomes a conductance 3C2h in parallel with a current source set by the two previous voltages.

Stability and starting

On y˙=λy a k-step method has k roots r per step, from its characteristic polynomial. One approximates ehλ; the others are parasitic and must stay inside the unit circle (zero-stability at h = 0, and the stability region for h > 0). Dahlquist's barrier: no A-stable linear multistep method has order above 2. A k-step method needs k starting values, usually from a Runge–Kutta step or a few small steps, and changing h is awkward, since the history is on the old grid.

Worked example

Take one AB2 step for y˙=−y with h = 0.1, from y0=1 and the exact y1=e−0.1.

Show the solution
  1. The two slopes. f0=−1 and f1=−0.904837.
  2. The AB2 step. y2=y1+0.12(3f1−f0)=0.904837+0.05(−2.714512+1)=0.819112
  3. The error. The exact value is e−0.2=0.818731, so the error is 3.8×10−4, from one new evaluation of f.
  4. Compare with Heun. Heun's method (lesson 40) gets a similar error per step but pays two evaluations for it.

Answer y2=0.819112, an error of 3.8×10−4.

Worked example

A stiff mode has hλ=−10. Compare AB2 and BDF2.

Show the solution
  1. AB2's characteristic equation. r2−(1+32z)r+z2=0 Here it is r2+14r−5=0
  2. Its roots. They are 0.348 and −14.35. The second makes the computed solution grow 14-fold per step, while the true mode decays as e−10 per step.
  3. BDF2's characteristic equation. (3−2z)r2−4r+1=0 Here it is 23r2−4r+1=0
  4. Its roots. They are complex, of size 123=0.21 so BDF2 damps the mode quickly, as it should.
  5. The difference. Explicit methods are restricted by the fastest mode; BDF lets the step follow the slow ones.

Answer AB2 has a root at −14.35, so the mode grows 14-fold per step; BDF2's roots have size 0.21, so it damps the mode.

Worked example

Write BDF2's companion model for a 1 µF capacitor with a 1 µs step.

Show the solution
  1. Discretize the capacitor. i=Cdvdt≈C3vn+1−4vn+vn−12h
  2. The conductance. 3C2h=3×10−62×10−6=1.5S
  3. The current source. In parallel sits a source set by the last two voltages: −C(4vn−vn−1)2h
  4. Compare with backward Euler. Its model has Ch=1 S and uses only vn.
  5. In SPICE. SPICE's Gear option uses BDF2 (or higher) this way: one nodal solve per step, with the history folded into current sources.

Answer a 1.5 S conductance in parallel with a current source −C(4vn−vn−1)2h.

Check

AB2 on y˙=−2y with h = 0.1, from y0=1 and the exact y1=e−kh. What is y2?

Check

A 1 µF capacitor is stepped with BDF2 at h = 0.1 µs. What conductance stands for it in the companion model?

Write units the way you normally would: 1.5 S, 1500 mS and 0.0015 kS are the same answer.

Check

Above what step does AB2 become unstable on a mode decaying as e−kt with k = 1000 s⁻¹?

Write units the way you normally would: 1.5 s and 1500 ms are the same answer.

Check

BDF2 on a mode with hλ = −10: how large are its amplification roots?

Check

A problem is integrated over 1000 steps at fourth order.

(a)

About how many evaluations of f does RK4 use?

(b)

About how many does AB4 use, if its three starting values come from RK4?

Check

Why can't a multistep method start on its own?

Check

Derive two multistep steps. Write fn−1 as a, fn as b, and for BDF2 write yn−1 as a, yn as b and hλ as z.

Step 1

Integrate the straight line through (tn−1,fn−1) and (tn,fn) from tn to tn+h. What is the AB2 increment?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why do multistep methods have stability problems that one-step methods don't?

Practice

Keep practicing

7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.