TExcelTAD
Home › Numerical Methods › Multistep Methods

Multistep Methods

Runge-Kutta methods throw away all information from previous steps. Multistep methods reuse it: they combine the solution or slope values at several past time points, so each new step needs only one new evaluation of ff, whatever the order. The Adams and BDF families built this way are the engines of many production ODE solvers.

Adams-Bashforth (explicit)

Integrate u′=fu' = f from tit_i to ti+1t_{i+1} and replace ff by the polynomial interpolating the last kk slope values fi,fi−1,…f_i, f_{i-1}, \ldots (Polynomial Interpolation):

Method Formula Order
AB1 ui+1=ui+hfiu_{i+1} = u_i + hf_i (Euler) 1
AB2 ui+1=ui+h2(3fi−fi−1)u_{i+1} = u_i + \frac{h}{2}(3f_i - f_{i-1}) 2
AB3 ui+1=ui+h12(23fi−16fi−1+5fi−2)u_{i+1} = u_i + \frac{h}{12}(23f_i - 16f_{i-1} + 5f_{i-2}) 3
AB4 ui+1=ui+h24(55fi−59fi−1+37fi−2−9fi−3)u_{i+1} = u_i + \frac{h}{24}(55f_i - 59f_{i-1} + 37f_{i-2} - 9f_{i-3}) 4

Adams-Moulton (implicit)

Including the unknown new slope fi+1=f(ti+1,ui+1)f_{i+1} = f(t_{i+1}, u_{i+1}) in the interpolation gives more accurate, more stable implicit formulas, for example the trapezoid rule ui+1=ui+h2(fi+fi+1)u_{i+1} = u_i + \frac{h}{2}(f_i + f_{i+1}) (AM2). Implicit equations are solved by iteration, often with an Adams-Bashforth predictor and one Adams-Moulton corrector step (a predictor-corrector pair).

Starting values

A kk-step method needs kk starting values, but the IVP supplies only u0u_0. The others come from a one-step method of the same order (for example RK4 for AB4).

python · try it yourself
import numpy as np

def ab4(f, a, b, u0, n):
    h = (b - a) / n
    t = a + h * np.arange(n + 1)
    u = np.zeros(n + 1); u[0] = u0
    F = np.zeros(n + 1)
    for i in range(3):                                  # RK4 starter
        k1 = f(t[i], u[i]); k2 = f(t[i] + h/2, u[i] + h/2*k1)
        k3 = f(t[i] + h/2, u[i] + h/2*k2); k4 = f(t[i] + h, u[i] + h*k3)
        u[i + 1] = u[i] + h/6 * (k1 + 2*k2 + 2*k3 + k4)
    for i in range(4):
        F[i] = f(t[i], u[i])
    for i in range(3, n):
        u[i + 1] = u[i] + h / 24 * (55*F[i] - 59*F[i-1] + 37*F[i-2] - 9*F[i-3])
        F[i + 1] = f(t[i + 1], u[i + 1])               # one new evaluation per step
    return u[-1]

f = lambda t, u: -2 * t * u
exact = np.exp(-4.0)
prev = None
for n in (40, 80, 160, 320):
    err = abs(ab4(f, 0, 2, 1.0, n) - exact)
    print(f"n = {n:3d}: error {err:.3e}" + ("" if prev is None else f", ratio {prev / err:.1f}"))
    prev = err
n =  40: error 3.038e-06
n =  80: error 1.680e-07, ratio 18.1
n = 160: error 9.821e-09, ratio 17.1
n = 320: error 5.926e-10, ratio 16.6

Fourth order (ratios approach 16) at one evaluation per step, a quarter of RK4's cost.

Stability: zero-stability and absolute stability

A multistep method is a linear recurrence with several solutions, only one of which approximates the ODE. The others are parasitic and must not grow:

  • Zero-stability (the roots of the characteristic polynomial ρ(ζ)\rho(\zeta) lie in the unit disk, simple on its boundary) is necessary for convergence at all. Dahlquist's theorem: consistent + zero-stable = convergent.
  • Absolute stability regions of Adams-Bashforth methods are small and shrink as the order grows (AB4 is stable on the negative axis only for h∣λ∣<0.3h\lvert\lambda\rvert < 0.3), so they are poor for stiff problems.
python · try it yourself
import numpy as np

def ab2_test(hl, n=200):
    u_prev, u = 1.0, 1.0 + hl                          # start with one Euler step
    for _ in range(n):
        u_prev, u = u, u + hl / 2 * (3 * u - u_prev)
    return abs(u)

for hl in (-0.5, -0.9, -1.1):
    print(f"h*lambda = {hl}: |u_200| = {ab2_test(hl):.2e}")
h*lambda = -0.5: |u_200| = 1.08e-39
h*lambda = -0.9: |u_200| = 1.41e-13
h*lambda = -1.1: |u_200| = 3.88e+10

AB2 is stable for real hλ∈(−1,0)h\lambda \in (-1, 0), half of Euler's interval.

BDF methods

Backward differentiation formulas interpolate the solution values (not the slopes) and set the derivative of the interpolant at ti+1t_{i+1} equal to fi+1f_{i+1}. BDF1 is backward Euler; BDF2 is ui+1−43ui+13ui−1=23hfi+1u_{i+1} - \frac{4}{3}u_i + \frac{1}{3}u_{i-1} = \frac{2}{3}hf_{i+1}. BDF1 to BDF6 have large stability regions containing the whole negative real axis, which makes them the standard choice for stiff problems (Stiff Equations).

In software

  • solve_ivp(method="BDF") (variable order 1 to 5), "LSODA" (switches automatically between Adams for non-stiff and BDF for stiff phases).
  • CVODE (SUNDIALS) implements variable-order, variable-step Adams and BDF methods and is used inside many simulation packages.

Exercises

Exercise 1: Derive AB2

Integrate the line through (ti−1,fi−1)(t_{i-1}, f_{i-1}) and (ti,fi)(t_i, f_i) from tit_i to ti+1t_{i+1}.

Answer

h2(3fi−fi−1)\frac{h}{2}(3f_i - f_{i-1}).

Solution

The line is p(t)=fi+fi−fi−1h(t−ti)p(t) = f_i + \frac{f_i - f_{i-1}}{h}(t - t_i); integrating over [ti,ti+h][t_i, t_i + h] gives hfi+h2(fi−fi−1)hf_i + \frac{h}{2}(f_i - f_{i-1}).

Exercise 2: Cost per step

How many evaluations of ff do AB4 and RK4 need per step?

Answer

AB4: 1; RK4: 4.

Solution

AB4 reuses the stored slopes. The price is the starting procedure and a smaller stability region.

Exercise 3: A zero-unstable method (code)

The explicit two-step method ui+1=−4ui+5ui−1+h(4fi+2fi−1)u_{i+1} = -4u_i + 5u_{i-1} + h(4f_i + 2f_{i-1}) is third-order consistent but not zero-stable (characteristic root −5-5). Apply it to u′=−uu' = -u with exact starting values and h=0.01h = 0.01 for 30 steps.

Answer

The solution explodes to astronomically large values, although the exact answer is about 0.740.74.

Solution
python · try it yourself
import numpy as np
h = 0.01
u_prev, u = 1.0, np.exp(-h)
for i in range(1, 30):
    u_prev, u = u, -4 * u + 5 * u_prev + h * (4 * (-u) + 2 * (-u_prev))
print(f"u(0.3) computed {u:.3e}, exact {np.exp(-0.3):.4f}")
u(0.3) computed -5.086e+10, exact 0.7408

Rounding errors excite the parasitic solution (−5)i(-5)^i, which grows by a factor of about 5 per step.

Test yourself

Adams-Bashforth methods need how many new function evaluations per step?

  1. one
  2. as many as the order
  3. two
  4. none

A kk-step method needs starting values from…

  1. nowhere
  2. a one-step method such as Runge-Kutta
  3. the user only
  4. the final value

Which family is the standard choice for stiff problems?

  1. Adams-Bashforth
  2. BDF
  3. explicit Euler
  4. RK4