---
title: Multistep methods
heading: Reusing past steps: Adams methods, BDF and what makes them stable
eyebrow: A13 · Lesson 42 · Multistep methods
xp: 40
---

::: hook
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.
:::

::: play
- The curves show the size of each method's amplification factor on $\dot y = \lambda y$ for real $z = h\lambda$ 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.
:::

```sim plot
view: graph
x: z = -20..0
y: size = 0..2
plot: abs(1 + 1.5*z)/2 + sqrt((1 + 1.5*z)^2 - 2*z)/2 | label: AB2's larger root | samples: 400
plot: (1/sqrt(3 - 2*z))*step(-0.5 - z) + abs((2 + sqrt(abs(1 + 2*z)))/(3 - 2*z))*step(z + 0.5) | label: BDF2 | color: ch3 | samples: 400
plot: 1 | dashed
```

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

- [x] AB2 needs one new evaluation of f per step, RK2 needs two
- [ ] They need the same number
- [ ] AB2 needs two, RK2 one
- [ ] AB2 needs a matrix solve each step

::: reveal
AB2 needs one new evaluation per step; it reuses the previous step's f. RK2 needs two fresh ones. When f is expensive (a large circuit's device models, a detailed physics model), multistep methods do the same work for half the cost or less, and Adams methods of order 4 or 5 still use only one or two evaluations per step.
:::
:::

::: nameit
## Linear multistep methods

A k-step method combines the last k values of y and f: $\sum_{i=0}^{k}\alpha_iy_{n+i} = h\sum_{i=0}^{k}\beta_if_{n+i}$. If $\beta_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): $y_{n+1} = y_n + \frac h2(3f_n - f_{n-1})$.
- **Adams–Moulton 2** (implicit, the trapezoidal rule): $y_{n+1} = y_n + \frac h2(f_{n+1} + f_n)$.
- **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:** $\frac{3y_{n+1} - 4y_n + y_{n-1}}{2} = hf_{n+1}$. It's implicit, second order, stable for every negative $h\lambda$, and damps very fast modes strongly. In a circuit simulator, a capacitor stepped by BDF2 becomes a conductance $\frac{3C}{2h}$ in parallel with a current source set by the two previous voltages.

## Stability and starting

On $\dot y = \lambda y$ a k-step method has k roots r per step, from its characteristic polynomial. One approximates $e^{h\lambda}$; 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.
:::

::: example
## Take one AB2 step for $\dot y = -y$ with h = 0.1, from $y_0 = 1$ and the exact $y_1 = e^{-0.1}$.

::: solution
1. **The two slopes.** $f_0 = -1$ and $f_1 = -0.904837$.
2. **The AB2 step.**
   $$\begin{aligned} y_2 &= y_1 + \frac{0.1}{2}(3f_1 - f_0) \\ &= 0.904837 \\ &\quad + 0.05(-2.714512 + 1) \\ &= 0.819112 \end{aligned}$$
3. **The error.** The exact value is $e^{-0.2} = 0.818731$, so the error is $3.8 \times 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:** $y_2 = 0.819112$, an error of $3.8 \times 10^{-4}$.
:::
:::

::: example
## A stiff mode has $h\lambda = -10$. Compare AB2 and BDF2.

::: solution
1. **AB2's characteristic equation.**
   $$r^2 - (1 + \frac32z)r + \frac z2 = 0$$
   Here it is
   $$r^2 + 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)r^2 - 4r + 1 = 0$$
   Here it is
   $$23r^2 - 4r + 1 = 0$$
4. **Its roots.** They are complex, of size
   $$\frac{1}{\sqrt{23}} = 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.
:::
:::

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

::: solution
1. **Discretize the capacitor.**
   $$\begin{aligned} i &= C\frac{dv}{dt} \\ &\approx C\frac{3v_{n+1} - 4v_n + v_{n-1}}{2h} \end{aligned}$$
2. **The conductance.**
   $$\begin{aligned} \frac{3C}{2h} &= \frac{3 \times 10^{-6}}{2 \times 10^{-6}} \\ &= 1.5\ \text{S} \end{aligned}$$
3. **The current source.** In parallel sits a source set by the last two voltages:
   $$-\frac{C(4v_n - v_{n-1})}{2h}$$
4. **Compare with backward Euler.** Its model has $\frac Ch = 1$ S and uses only $v_n$.
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 $-\frac{C(4v_n - v_{n-1})}{2h}$.
:::
:::

::: check
given: k = 2 | 4; h = 0.1 | 0.2
answer: exp(-k*h) + h*(3*(-k*exp(-k*h)) - (-k))/2
tolerance: 0.5%

## AB2 on $\dot y = -\given{k}y$ with h = {h}, from $y_0 = 1$ and the exact $y_1 = e^{-kh}$. What is $y_2$?

::: right
Right. $y_2 = y_1 + \frac h2(3f_1 - f_0)$ with $f = -ky$.
:::

::: misses
- [exp(-k*h) + h*(-k*exp(-k*h))] That's Euler's step; AB2 combines two slopes.
- [any] $y_1 + \frac h2(3f_1 - f_0)$.
:::
:::

::: check
given: C = 1 | 10; h = 0.1 | 1
answer: 3*C/(2*h)
unit: S
tolerance: 0.5%

## A {C} µF capacitor is stepped with BDF2 at h = {h} µs. What conductance stands for it in the companion model?

::: right
Right. $\frac{3C}{2h}$: half again backward Euler's $\frac Ch$.
:::

::: misses
- [C/h] That's backward Euler.
- [2*C/h] That's the trapezoidal rule.
- [any] The coefficient of $v_{n+1}$ in $C\frac{3v_{n+1} - 4v_n + v_{n-1}}{2h}$.
:::
:::

::: check
given: k = 100 | 1000 | 50000
answer: 1/k
unit: s
tolerance: 0.5%

## Above what step does AB2 become unstable on a mode decaying as $e^{-kt}$ with k = {k} s⁻¹?

::: right
Right. AB2's real stability interval is $-1 < h\lambda < 0$, so $h < 1/k$.
:::

::: misses
- [2/k] That's forward Euler's limit; AB2's is half that.
- [any] Require $hk < 1$.
:::
:::

::: check
given: z = -2 | -10 | -100
answer: 1/sqrt(3 - 2*z)
tolerance: 0.5%

## BDF2 on a mode with $h\lambda$ = {z}: how large are its amplification roots?

::: right
Right. For $h\lambda < -\frac12$ the roots are complex with $\lvert r\rvert^2 = \frac{1}{3 - 2h\lambda}$.
:::

::: misses
- [1/(1 - z)] That's backward Euler's factor.
- [any] The product of the roots of $(3 - 2z)r^2 - 4r + 1$ is $\frac{1}{3 - 2z}$.
:::
:::

::: check
kind: parts
given: N = 100 | 500 | 1000 | 5000 | 10000 | 100000

## A problem is integrated over {N} steps at fourth order.

::: part
answer: 4*N
tolerance: 0.5%

### About how many evaluations of f does RK4 use?

::: misses
- [any] Four per step.
:::
:::

::: part
answer: N + 3*4
tolerance: 0.5%

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

::: misses
- [4*N] AB4 needs one new evaluation per step after the start.
- [any] One per step, plus RK4's cost for the three starting steps.
:::
:::
:::

::: check
kind: choice

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

- [ ] It's unstable for the first step
- [x] It needs values from earlier steps that don't exist yet
- [ ] It needs a smaller step at the beginning
- [ ] It can only be used for stiff problems

::: right
Right. A k-step method needs k past values; the first are supplied by a one-step method or by a few short steps of a lower-order multistep method.
:::

::: misses
- [1] Stability isn't the issue; missing data is.
- [3] Small steps are one way to build the history, but the reason is the history itself.
- [4] Adams methods are for non-stiff problems.
:::
:::

::: check
kind: derivation
vars: a = -2..2, b = -2..2, h = 0.01..0.5, z = -20..-1

## Derive two multistep steps. Write $f_{n-1}$ as a, $f_n$ as b, and for BDF2 write $y_{n-1}$ as a, $y_n$ as b and $h\lambda$ as z.

::: step
answer: h*(3*b - a)/2

### Integrate the straight line through $(t_{n-1}, f_{n-1})$ and $(t_n, f_n)$ from $t_n$ to $t_n + h$. What is the AB2 increment?
:::

::: step
answer: (4*b - a)/(3 - 2*z)

### Solve BDF2, $\frac{3y_{n+1} - 4y_n + y_{n-1}}{2} = h\lambda y_{n+1}$, for $y_{n+1}$.
:::

::: right
Right. The line extrapolated over the next step gives $\frac h2(3f_n - f_{n-1})$, and BDF2's solve divides by $3 - 2h\lambda$, which grows for stiff modes.
:::
:::

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

::: model
A one-step method maps $y_n$ to $y_{n+1}$, so on the test equation it has a single amplification factor that approximates $e^{h\lambda}$. A k-step method is a recurrence that involves k past values, and a recurrence of order k has k independent solutions. One of them follows the true solution; the others are artifacts of the recurrence. They start tiny, seeded by rounding and starting errors, but if any of them has an amplification root larger than 1 it grows geometrically and eventually swamps the answer. Stability for a multistep method means keeping all k roots inside the unit circle, which limits how large the step can be and, for implicit methods, limits the order that can stay stable for all stiff modes.
:::
:::

::: practice

::: check
given: C = 2 | 47; h = 0.5 | 5
answer: 3*C/(2*h)
unit: S
tolerance: 0.5%

## BDF2 companion conductance, {C} µF, h = {h} µs?

::: misses
- [any] $\frac{3C}{2h}$.
:::
:::

::: check
given: z = -1 | -2 | -5 | -10 | -50 | -100
answer: 1/sqrt(3 - 2*z)
tolerance: 0.5%

## BDF2 root size for $h\lambda$ = {z}?

::: misses
- [any] $\frac{1}{\sqrt{3 - 2z}}$.
:::
:::
:::
