You are on page 1of 15

Numerical solution of 1.

1 The explicit Euler method


ordinary differential equations The ancestor of all the advanced numerical meth-
ods in use today was formed by Leonhard Euler
Ernst Hairer and Christian Lubich in 1768. On writing down the first terms in the
Université de Genève and Universität Tübingen Taylor expansion of the solution at t0 and using
the prescribed initial value and the differential
equation at t = t0 , it is noted that y(t0 + h) =
1 Introduction: Euler methods y(t0 ) + hy 0 (t0 ) + · · · = y0 + hf (t0 , y0 ) + · · · .
Choosing a small step size h > 0 and neglecting
Ordinary differential equations are ubiquitous in the higher-order terms represented by the dots,
science and engineering: in geometry and me- an approximation y1 to y(t1 ) at the later time
chanics from the first examples onwards (New- t1 = t0 + h is obtained by setting
ton, Leibniz, Euler, Lagrange), in chemical re-
y1 = y0 + hf (t0 , y0 ).
action kinetics, molecular dynamics, electronic
circuits, population dynamics, and many more The next idea is to take y1 as the starting value
application areas. They also arise, after semi- for a further step, which then yields an ap-
discretization in space, in the numerical treat- proximation to the solution at t2 = t1 + h as
ment of time-dependent partial differential equa- y2 = y1 + hf (t1 , y1 ). Continuing in this way,
tions, which are even more impressively om- in the (n + 1)st step we take yn ≈ y(tn ) as the
nipresent in our technologically developed and fi- starting value for computing an approximation at
nancially controlled world. tn+1 = tn + h as
The standard initial value problem is to deter-
yn+1 = yn + hf (tn , yn ),
mine a vector-valued function y : [t0 , T ] → Rd
with a given initial value y(t0 ) = y0 ∈ Rd such and after a sufficient number of steps we reach
that the derivative y 0 (t) depends on the current the final time T . The computational cost of the
solution value y(t) at every t ∈ [t0 , T ] in a pre- method lies in the evaluations of the function f .
scribed way: The step size need not be the same in each step
and could be replaced by hn in the formula, so
y 0 (t) = f (t, y(t)) for t0 ≤ t ≤ T, y(t0 ) = y0 . that tn+1 = tn + hn .
It is immediate that the quality of the approx-
Here, the given function f is defined on an open imation yn depends on two aspects: the error
subset of R × Rd containing (t0 , y0 ) and takes val- made by truncating the Taylor expansion and the
ues in Rd . If f is continuously differentiable then error introduced by continuing from approximate
there exists a unique solution at least locally on solution values. These two aspects are captured
some open interval containing t0 . In many appli- in the notions of consistency and stability, respec-
cations, t represents time, and it will be conve- tively, and are fundamental to all numerical meth-
nient to refer to t as time in what follows. ods for ordinary differential equations.
In spite of ingenious efforts of mathematicians
throughout the 18th and 19th century, in most 1.2 The implicit Euler method and
cases the solution of a differential equation cannot stiff differential equations
be given in closed form by functions that can be
evaluated directly on a computer. This even ap- A minor-looking change in the method, already
plies to linear differential equations y 0 = Ay with considered by Euler in 1768, makes a big differ-
a square matrix A, for which y(t) = e(t−t0 )A y0 , ence: taking as the argument of f the new value
as computing the matrix exponential is a noto- instead of the previous one yields
riously tricky problem. One therefore must rely yn+1 = yn + hf (tn+1 , yn+1 ),
on numerical methods that are able to approxi-
mate the solution of a differential equation to any from which yn+1 is now determined implicitly. In
desired accuracy. general, the new solution approximation needs to

1
2

be computed iteratively, typically by a modified h = 0.041


(k+1) (k) (k)
Newton method such as yn+1 = yn+1 + ∆yn+1 , 2
where the increment is computed by solving a lin-
ear system of equations explicit Euler
(k) (k) h = 0.038
(I − hJn )∆yn+1 = −rn+1 1

with an approximation Jn to the Jacobian matrix


(k) (k) implicit Euler, h = 0.5
∂y f (tn , yn ) and the residual rn+1 = yn+1 − yn −
(k) 0
hf (tn+1 , yn+1 ). The computational cost per step .5 1.0 1.5
has increased dramatically: whereas the explicit
Euler method requires a single function evalua-
tion we now need to compute the Jacobian and Figure 1: Exact solution (solid), implicit Euler solu-
then solve a linear system and evaluate f on each tion (dashed), and two explicit Euler solutions (oscil-
Newton iteration. lating) for the problem y 0 = −50(y − cos t), y(0) = 0.
Why it may nevertheless be preferable to per-
form the computation using the implicit rather
than the explicit Euler method is evident for the
scalar linear example, made famous by Germund the matrix has some eigenvalues with large neg-
Dahlquist in 1963, ative real part, and to classes of nonlinear differ-
ential equations with a Jacobian matrix ∂y f hav-
y 0 = λy, ing this property. The explicit and implicit Euler
methods also give rise to very different behaviors
where the coefficient λ is large and negative (or
for nonlinear differential equations in which the
complex with large negative real part). Here the
function f (t, y) has a large (local) Lipschitz con-
exact solution y(t) = e(t−t0 )λ y0 decays to zero as
stant L with respect to y, while for some inner
time increases, and so does the numerical solution
product the inequality
given by the implicit Euler method for every step
size h > 0:

ynimpl = (1 − hλ)−n y0 . hf (t, y) − f (t, z), y − zi ≤ `ky − zk2

In contrast, the explicit Euler method yields


holds for all t and y, z with a moderate constant
ynexpl = (1 + hλ)n y0 , ` ¿ L (called a one-sided Lipschitz constant).

which decays to zero for growing n only when h is Differential equations for which the numerical
so small that |1 + hλ| < 1. This imposes a severe solution using the implicit Euler method is more
step size restriction when λ is a negative number efficient than that using the explicit Euler method
of large absolute value (just think of λ = −1010 ). are called stiff differential equations. They in-
For larger step sizes the numerical solution suf- clude important applications in the description
fers an instability that is manifested in wild os- of processes with multiple time scales (e.g., fast
cillations of increasing amplitude. The problem and slow chemical reactions) and in spatial semi-
is that the explicit Euler method and the differ- discretizations of time-dependent partial differen-
ential equation have completely different stability tial equations. For example, for the heat equa-
behaviors unless the step size is chosen extremely tion, stable numerical solutions are obtained with
small (see Figure 1). the explicit Euler method only when temporal
Such behavior is not restricted to the simple step sizes are bounded by the square of the spa-
scalar example considered above, but extends to tial grid size, whereas the implicit Euler method
linear systems of differential equations in which is unconditionally stable.
3

1.3 The symplectic Euler method p


and Hamiltonian systems explicit
An important class of differential equations where
neither the explicit nor the implicit Euler method sympl.
is appropriate is Hamiltonian differential equa-
−π impl. π q
tions

p0 = −∇q H(p, q), q 0 = +∇p H(p, q),

which are fundamental to many branches of


physics. Here, the real-valued Hamilton function
H, defined on a domain of Rd+d , represents the
Figure 2: Pendulum equation: Euler polygons with
total energy and q(t) ∈ Rd and p(t) ∈ Rd repre-
step size h = 0.3; initial value p(0) = 0 and q(0) = 1.7
sent the positions and momenta, respectively, of
for explicit Euler, q(0) = 1.5 for symplectic Euler,
a conservative system at time t. The total energy
and q(0) = 1.3 for implicit Euler. The solid lines are
is conserved:
solution curves for the differential equations.
H(p(t), q(t)) = Const.
2.1 Local error
along any solution (p(t), q(t)) of the Hamiltonian
system. It turns out that a partitioned method For the explicit Euler method, the error after one
obtained by applying the explicit Euler method step of the method starting from the exact solu-
to the position variables and the implicit Eu- tion, called the local error, is given as
ler method to the momentum variables (or vice ¡ ¢
dn+1 = y(tn ) + hf (tn , y(tn )) − y(tn + h).
versa) behaves much better than either Euler
method applied to the system as a whole. The By estimating the remainder term in the Taylor
symplectic Euler method reads expansion of y(tn +h) at tn , we can bound dn+1 by

pn+1 = pn − h∇q H(pn+1 , qn ) kdn+1 k ≤ Ch2 with C = 1


2 t max ky 00 (t)k,
0 ≤t≤T
qn+1 = qn + h∇p H(pn+1 , qn ).
provided that the solution is twice continuously
For a separable Hamiltonian H(p, q) = T (p) + differentiable, which is the case if f is continu-
V (q) the method is explicit. ously differentiable.
Figure 2 illustrates the qualitative behavior of
the three Euler methods applied to the differential 2.2 Error propagation
equations of the mathematical pendulum,
Since the method advances in each step with the
p0 = − sin q, q 0 = p, computed values yn instead of the exact solution
values y(tn ), it is important to know how errors,
which are Hamiltonian with H(p, q) = 21 p2 −cos q. once introduced, are propagated by the method.
The energy of the implicit Euler solution de- Consider explicit Euler steps starting from differ-
creases, while that of the explicit Euler solution ent starting values,
increases. The symplectic Euler method nearly
un+1 = un + hf (tn , un ),
conserves the energy over extremely long times.
vn+1 = vn + hf (tn , vn ).
2 Basic notions When f is (locally) Lipschitz continuous with
Lipschitz constant L, the difference is controlled
In this section we describe some of the mecha- by the stability estimate
nisms that lead to the different behaviors of the
various methods. kun+1 − vn+1 k ≤ (1 + hL)kun − vn k.
4

y0 y(tn ) The numerical method thus converges to the ex-


act solution as h → 0 with nh fixed, but only at
exact solution first order, that is, with an error bound propor-
tional to h. We will later turn to higher-order
numerical methods, with an error bound propor-
y1 tional to hp with p > 1.
yn

y2 2.4 Stiff differential equations


y3
The above error bound becomes meaningless for
numerical method stiff problems, where L is large. The implicit
t0 t1 t2 t3 ··· tn Euler method admits an analogous error analy-
sis in which only the one-sided Lipschitz constant
Figure 3: Lady Windermere’s fan. ` appears in the stability estimate: provided that
h` < 1,
2.3 Lady Windermere’s fan 1
kun+1 − vn+1 k ≤ kun − vn k
The above estimates can be combined to study 1 − h`
the error accumulation, as illustrated by the fan holds for the results of two Euler steps starting
of Figure 3 (named by Gerhard Wanner in the from un and vn . For stiff problems with ` ¿ L
1980s after a play by Oscar Wilde). Each ar- this is much more favorable than the stability es-
row from left to right represents a step of the timate of the explicit Euler method in terms of L.
numerical method, with different starting values. It leads to an error bound ken k ≤ mh in which
The fat vertical bars represent the local errors, m is essentially of the same form as M above,
whose propagation by the numerical method is but with the Lipschitz constant L replaced by the
controlled using repeatedly the stability estimate one-sided Lipschitz constant `.
from step to step: the global error The above arguments explain the convergence
behavior of the explicit and implicit Euler meth-
en = yn − y(tn )
ods and their fundamentally different behavior for
is the sum of the propagated local errors (rep- large classes of stiff differential equations. They
resented as the distances between two adjacent do not explain the favorable behavior of the sym-
arrow heads ending at tn in Figure 3). The con- plectic Euler method for Hamiltonian systems.
tribution of the first local error d1 to the global This requires another concept, backward analy-
error en is bounded by (1+hL)n−1 kd1 k, as is seen sis, which is treated next.
by applying the stability estimate n − 1 times fol-
lowing the numerical solutions starting from y1 2.5 Backward analysis
and y(t1 ). The contribution of the second local
error d2 is bounded by (1 + hL)n−2 kd2 k, and so Much insight into numerical methods is obtained
on. Since the local errors are bounded by Ch2 , by interpreting the numerical result after a step as
the global error is thus bounded by the (almost) exact solution of a modified differen-
tial equation. Properties of the numerical method
n−1
X can then be inferred from properties of a differ-
ken k ≤ (1 + hL)j Ch2 ential equation. For each of the Euler methods
j=0 applied to y 0 = f (y) an asymptotic expansion
(1 + hL)n − 1 enhL − 1
= Ch2 ≤ Ch. fe(e
y ) = f (e y ) + h2 f3 (e
y ) + hf2 (e y) + · · ·
1 + hL − 1 L
With M = (e(T −t0 )L − 1)C/L, the global error can be uniquely constructed recursively such that,
satisfies up to arbitrarily high powers of h,

ken k ≤ M h for tn ≤ T. y1 = ye(t1 ),


5

where ye(t) is the solution of the modified differ- higher derivatives of f are available with au-
ential equation ye0 = fe(ey ) with initial value y0 . tomatic differentiation software) are sometimes
The remarkable feature is that when the sym- used.
plectic Euler method is applied to a Hamiltonian
system, then the modified differential equation is 3.2 Explicit Runge–Kutta methods
again Hamiltonian. The modified Hamilton func-
tion has an asymptotic expansion Two ideas underlie Runge–Kutta methods: first,
the integral in
e = H + hH2 + h2 H3 + · · · .
H Z 1
y(t0 + h) = y(t0 ) + h y 0 (t0 + θh) dθ,
The symplectic Euler method therefore conserves 0
the modified energy H e (up to arbitrarily high 0
with y (t) = f (t, y(t)), is approximated by a
powers of h), which is close to the original en-
quadrature formula with weights bi and nodes ci ,
ergy H. This conservation of the modified energy
prevents the linearly growing drift in the energy s
X
that is present along numerical solutions of the y1 = y0 + h bi Yi0 , Yi0 = f (t0 + ci h, Yi ).
explicit and implicit Euler methods. For these i=1
two methods the modified differential equation is
Second, the internal stage values Yi ≈ y(t0 + ci h)
no longer Hamiltonian.
are determined by another quadrature formula for
the integral from 0 to ci :
3 Nonstiff problems s
X
Yi = y0 + h aij Yj0 , i = 1, . . . , s,
3.1 Higher-order methods j=1
A method is said to have order p if the local er-
with the same function values Yj0 as for y1 . If
ror (recall that this is the error after one step
the coefficients satisfy aij = 0 for j ≥ i, then
of the method starting from the exact solution)
the above sum actually extends only from j = 1
is bounded by Chp+1 , where h is the step size
to i − 1, and hence Y1 , Y10 , Y2 , Y20 , . . . , Ys , Ys0 can
and C depends only on bounds of derivatives of
be computed explicitly one after the other. The
the solution y(t) and of the function f . Like for
methods are named after Carl Runge, who in 1895
the Euler method in Section 2.1, the order is de-
proposed two- and three-stage methods of this
termined by comparing the Taylor expansions of
type, and after Wilhelm Kutta, who in 1901 pro-
the exact and the numerical solution, which for a
posed what is now known as the classical Runge–
method of order p should agree up to and includ-
Kutta method of order 4, which extends the Simp-
ing the hp term.
son quadrature rule from integrals to differential
A drawback of the Euler methods is that they
equations:
are only of order 1. There are different ways to in-
crease the order: using additional, auxiliary func-
tion evaluations in passing from yn to yn+1 (one- 0
step methods); using previously computed solu- 1/2 1/2
tion values yn−1 , yn−2 , . . . and/or their function 1/2 0 1/2
values (multistep methods); or using both (gen- ci aij 1 0 0 1

eral linear methods). For nonstiff initial value bj 1/6 2/6 2/6 1/6
problems the most widely used methods are ex-
plicit Runge–Kutta methods of orders up to 8, in Using Lady Windermere’s fan as in Section 2,
the class of one-step methods, and Adams-type one finds that the global error yn − y(tn ) of a pth-
multistep methods up to order 12. For very strin- order Runge–Kutta method over a bounded time
gent accuracy requirements of 10 or 100 digits, interval is O(hp ).
high-order extrapolation methods or high-order The order conditions of general Runge–Kutta
Taylor series expansions of the solution (when methods were elegantly derived by John Butcher
6

in 1964 using a tree model for the derivatives of 3.4 Adams methods
f and their concatenations by the chain rule, as
The methods introduced by Astronomer Royal
they appear in the Taylor expansions of the ex-
John Couch Adams in 1855 were the first of high
act and the numerical solutions. This enabled
order that use only function evaluations, and in
the construction of even higher-order methods,
their current variable-order, variable step-size im-
among which excellently constructed methods of
plementations they are among the most efficient
orders 5 and 8 by Dormand and Prince (from
methods for general nonstiff initial value prob-
1980) have found widespread use. These meth-
lems.
ods are equipped with lower-order error indica-
When k function values fn−j = f (tn−j , yn−j )
tors from embedded formulas that use the same
(j = 0, . . . , k − 1) have already been computed,
function evaluations. These error indicators are
the integrand in
used for an adaptive selection of the step size that
is intended to keep the local error close to a given Z 1
error tolerance in each time step. y(tn+1 ) = y(tn ) + h f (tn + θh, y(tn + θh)) dθ
0

is approximated by the interpolation polynomial


3.3 Extrapolation methods P (t) through (tn−j , fn−j ), j = 0, . . . , k − 1, yield-
ing the explicit Adams method of order k,
A systematic, if sub-optimal construction of ex- Z 1
plicit Runge–Kutta methods of arbitrarily high yn+1 = yn + h P (tn + θh) dθ,
order is provided by Richardson extrapolation of 0
the results of the explicit Euler method obtained
which, upon inserting the Newton interpolation
with different step sizes. This technique makes
formula, becomes (for constant step size h)
use of an asymptotic expansion of the error,
k−1
X
y(t, h) − y(t) = e1 (t)h + e2 (t)h2 + · · · , yn+1 = yn + hfn + h γ i ∇i f n ,
i=1

where y(t, h) is the explicit Euler approximation with the backward differences ∇fn = fn − fn−1 ,
at t obtained with step size h. At t = t0 + H, ∇i fn = ∇i−1 fn −∇i−1 fn−1 , and with coefficients
the error expansion coefficients up to order p can 5 3 251
(γi ) = ( 21 , 12 , 8 , 720 , . . .). The method thus cor-
be eliminated by evaluating at h = 0 (extrapo- rects the explicit Euler method by adding differ-
lating) the interpolation polynomial through the ences of previous function values.
Euler values y(t0 + H, hj ) for j = 1, . . . , p corre- Especially for higher orders, the accuracy of the
sponding to different step sizes hj = H/j. This approximation suffers from the fact that the in-
gives a method of order p, which formally falls terpolation polynomial is used outside the inter-
into the general class of Runge–Kutta methods. val of interpolation. This is avoided if the, as yet,
Instead of using the explicit Euler method as ba- unknown value (tn+1 , fn+1 ) is added to the inter-
sic method, it is preferable to take Gragg’s method polation points. Let P ∗ (t) denote the correspond-
(from 1964) which uses the explicit midpoint rule ing interpolation polynomial, which is now used
to replace the integrand f (t, y(t)). This yields the
yn+1 = yn−1 + 2hf (tn , yn ), n ≥ 1, implicit Adams method of order k +1, which takes
the form
and an explicit Euler starting step to compute y1 . k
This method has an error expansion in powers of
X
yn+1 = yn + hfn+1 + h γi∗ ∇i fn+1 ,
h2 (instead of h above) at even n, and with the i=1
elimination of each error coefficient one therefore
gains a power of h2 . Extrapolation methods have with (γi∗ ) = (− 21 , − 12
1 1
, − 24 19
, − 720 , . . .). The equa-
built-in error indicators that can be used for order tion for yn+1 is solved approximately by one or at
and step-size control. most two fixed point iterations, taking the result
7

from the explicit Adams method as the starting phrased as saying that all Pk solutions to the lin-
iterate (the predictor) and inserting its function ear difference equation j=0 αj yn+j = 0 stay
value on the right-hand side of the implicit Adams bounded as n → ∞, or equivalently:
Pk
method (the corrector). All roots of the polynomial j=0 αj ζ j are in
In a variable-order, variable step-size imple- the complex unit disk, and those on the unit circle
mentation, the required starting values are built are simple.
up by starting with the methods of increasing If this stability condition is satisfied and the
order 1, 2, 3, . . . one after the other. Strategies method is of order p, then the error satisfies
for increasing or decreasing the order are based yn − y(tn ) = O(hp ) on bounded time intervals,
on monitoring the backward difference terms. provided that the error in the starting values is
Changing the step size is computationally more O(hp ).
expensive, since it requires a recalculation of all
Dahlquist also proved order barriers: the order
method coefficients. It is facilitated by passing in-
of a stable k-step method cannot exceed k + 2 if
formation from one step to the next by the Nord-
k is even, k + 1 if k is odd, and k if the method
sieck vector, which collects the values of the in-
is explicit (βk = 0).
terpolation polynomial and all its derivatives at
tn scaled by powers of the step size.
3.6 General linear methods
3.5 Linear multistep methods
Both explicit and implicit Adams methods (with Predictor-corrector Adams methods fall neither
constant step size) belong to the class of linear into the class of multistep methods, since they
multistep methods use the predictor as an internal stage, nor into
the class of Runge–Kutta methods, since they use
k
X k
X previous function values. Linear multistep meth-
αj yn+j = h βj fn+j ods and Runge–Kutta methods are extreme cases
j=0 j=0 of a more general class of methods

with fi = f (ti , yi ) and αk 6= 0. This class also un+1 = Sun + hΦ(tn , un , h)


includes important methods for stiff problems,
in particular the backward differentiation formu-
where un is a vector (usually of dimension a
las (BDF) to be described in the next section.
multiple of the dimension of the differential
The theoretical study of linear multistep meth-
equation) from which the solution approxima-
ods was initiated by Germund Dahlquist in 1956.
tion yn ≈ y(tn ) can be obtained by a lin-
He showed that for such methods
ear mapping, S is a square matrix, and Φ de-
consistency + stability ⇐⇒ convergence, pends on function values of f . (For example,
for predictor-corrector methods we would have
which together with the contemporaneous Lax un = (yn , ynpred , yn−1 , . . . , yn−k+1 ) in this frame-
equivalence theorem for discretizations of partial work.)
differential equations forms a basic principle of More general methods like these have been
numerical analysis. What this means here is de- studied since the mid-1960s with the objective of
scribed in more detail below. looking for the “greatest good as a mean between
In contrast to one-step methods, having high extremes” (in the words of Aristotle and John
order does not by itself guarantee that a multistep Butcher). They include a number of methods of
method converges as h → 0. In fact, choosing the potential interest for both nonstiff and stiff prob-
method coefficients in such a way that the order lems, such as two-step Runge–Kutta methods
is maximized for a given k leads to a method that or general linear methods with inherent Runge–
produces wild oscillations, which increase in mag- Kutta stability, but as of now do not appear to
nitude with decreasing step size. One requires have found their way into applications via com-
in addition a stability condition, which can be petitive software.
8

4 Stiff problems on the scalar linear differential equation

We have seen in the introduction that for im- y 0 = λy with λ ∈ C, Re λ ≤ 0,


portant classes of differential equations, called
stiff equations, the implicit Euler method yields whose use as a test equation can be justified by
a drastic improvement over the explicit Euler linearization of the differential equation and diag-
method. Are there higher-order methods with onalization of the Jacobian matrix. The behavior
similarly good properties? of a numerical method on this deceivingly sim-
ple scalar linear differential equation gives much
4.1 BDF methods insight into its usefulness for more general stiff
problems, as is shown by both numerical experi-
The k-step implicit Adams methods, though nat- ence and theory.
urally extending the implicit Euler method, per- Clearly, the exact solution y(t) = etλ y0 remains
form disappointingly on stiff problems for k > 1. bounded for t → +∞ when Re λ ≤ 0. Following
Multistep methods from another extension of the Dahlquist, a method is called A-stable if for ev-
implicit Euler method, based on numerical differ- ery λ ∈ C with Re λ ≤ 0, the numerical solution
entiation rather than integration, turn out to be yn stays bounded as n → ∞ for every step size
better for stiff problems. Suppose that k solution h > 0 and every choice of starting values. The
approximations yn−k+1 , . . . , yn have already been implicit Euler method and the second-order BDF
computed, and consider the interpolation polyno- method are A-stable, but the BDF methods of
mial u(t) passing through yn+1−j at tn+1−j for higher order are not. Dahlquist’s second order
j = 0, . . . , k, including the as yet unknown ap- barrier states that the order of an A-stable linear
proximation yn+1 . We then require the colloca- multistep method cannot exceed 2. This funda-
tion condition mental, if negative theoretical result has led to
much work aimed at circumventing the barrier
u0 (t) = f (t, u(t)) at t = tn+1 ,
by using other methods or weaker notions of sta-
or equivalently, in the case of a constant step bility.
size h, The stability region S is the set of all com-
Xk
1 j plex z = hλ, such that every numerical solu-
∇ yn+1 = hfn+1 . tion of the method applied to y 0 = λy with
j
j=1 step size h stays bounded. The stability re-
This backward differentiation formula (BDF) is gions of explicit and implicit k-step Adams meth-
an implicit linear multistep method of order k, ods with k > 1 are bounded, which leads to
which is found to be unstable for k > 6. Methods step size restrictions when λ has large absolute
for smaller k, however, up to k ≤ 5, are currently value. The BDF methods up to order 6 are
the most widely used methods for stiff problems, A(α)-stable, that is, the stability region contains
which are implemented in numerous computer an unbounded sector | arg(−z)| ≤ α with α =
codes. The usefulness of these methods was first 90◦ , 90◦ , 86◦ , 73◦ , 51◦ , 17◦ for k = 1, . . . , 6, respec-
observed by Curtiss and Hirschfelder (1952), who tively. The higher-order BDF methods therefore
also coined the notion of stiff differential equa- perform well for differential equations where the
tions. Bill Gear’s BDF code DIFSUB from 1971 Jacobian has large eigenvalues near the negative
was the first widely used code for stiff problems. real half-axis, but behave poorly when there are
It brought BDF methods (“Gear’s method”) to large eigenvalues near the imaginary axis.
the attention of practitioners in many fields.
4.3 Implicit Runge–Kutta methods
4.2 A-stability and related notions
It turns out that there is no order barrier for A-
Which properties make BDF methods successful stable Runge–Kutta methods.
for stiff problems? In 1963, Dahlquist systemat- Explicit Runge–Kutta methods cannot be A-
ically studied the behavior of multistep methods stable, because application of such a method to
9

the linear test equation yields yn+1 = P (hλ)yn , p = 2s is thus obtained with Gauss nodes. Nev-
where P is a polynomial of degree s, the num- ertheless, Gauss methods have found little use in
ber of stages. The stability region of such a stiff initial value problems (as opposed to bound-
method is necessarily bounded, since |P (z)| → ∞ ary value problems, see Section 6). The reason
as |z| → ∞. for this is that the stability function here satis-
On the other hand, an implicit Runge–Kutta fies |R(z)| → 1 as z → −∞, whereas ez → 0 as
method has z → −∞.
yn+1 = R(hλ)yn The desired damping property at infinity is
obtained for the sub-diagonal Padé approxima-
with a rational function R(z), called the stabil-
tion. This is the stability function for the col-
ity function of the method, which is an approxi-
location method at Radau points, which are the
mation to the exponential at the origin, R(z) =
nodes of the quadrature of order p = 2s − 1 with
ez + O(z p+1 ) as z → 0. The method is A-stable if
cs = 1. Let us collect the basic properties: the s-
|R(z)| ≤ 1 for Re z ≤ 0. The subtle interplay be-
stage Radau method is an implicit Runge–Kutta
tween order and stability is clarified by the theory
method of order p = 2s − 1; it is A-stable and has
of order stars, developed by Wanner, Hairer and
R(∞) = 0.
Nørsett in 1978. In particular, this theory shows
that among the Padé approximations Rk,j (z) to The Radau methods have some more remark-
the exponential (the rational approximations of able features: they are nonlinearly stable with the
numerator degree k and denominator degree j so-called algebraic stability property; their last in-
of highest possible order p = j + k), precisely ternal stage equals the starting value for the next
those with k ≤ j ≤ k + 2 are A-stable. Optimal- step (this property is useful for very stiff and for
order implicit Runge–Kutta methods having the differential-algebraic equations); and their inter-
diagonal Padé approximations Rs,s as stability nal stages all have order s.
function are the collocation methods based on The last property does indeed hold for every
the Gauss quadrature nodes, while those having collocation method with s nodes. It is impor-
the sub-diagonal Padé approximations Rs−1,s are tant because of the phenomenon of order reduc-
the collocation methods based on the right-hand tion: in the application of an implicit Runge–
Radau quadrature nodes. We turn to these im- Kutta method to stiff problems, the method may
portant implicit Runge–Kutta methods next. have only the stage order, or stage order +1, with
stiffness-independent error constants, instead of
the full classical order p that is obtained with
4.4 Gauss and Radau methods
nonstiff problems.
A collocation method based on the nodes 0 ≤ c1 < The implementation of Radau methods by
· · · < cs ≤ 1 determines a polynomial u(t) of Hairer and Wanner (from 1991) is known for
degree at most s such that u(t0 ) = y0 and the its robustness in dealing with stiff problems and
differential equation is satisfied at the s points differential-algebraic equations of the type M y 0 =
t0 + ci h: f (t, y) with a singular matrix M .

u0 (t) = f (t, u(t)) at t = t0 + ci h, i = 1, . . . , s.

The solution approximation at the end-point is 4.5 Linearly implicit methods


then
BDF and implicit Runge–Kutta methods are fully
y1 = u(t0 + h),
implicit, and the resulting systems of nonlinear
which is taken as the starting value for the next equations need to be solved by variants of New-
step. As has been shown by Ken Wright (in 1970), ton’s method. To reduce the computational cost
such a collocation method is equivalent to an im- while retaining favorable linear stability prop-
plicit Runge–Kutta method, the order of which erties, linearly implicit methods have been pro-
is equal to the order of the underlying interpola- posed, such as the linearly implicit Euler method,
tory quadrature with nodes ci . The highest order in which only a single iteration of Newton’s
10

method is done in each step: exponential is therefore computationally less ex-


pensive than solving a corresponding linear sys-
(I − hJn )(yn+1 − yn ) = hfn , tem. This fact led to a revival of methods using
the exponential or related functions like ϕ(z) =
where Jn ≈ ∂y f (tn , yn ). Thus just one linear sys- (ez − 1)/z, such as the exponential Euler method
tem of equations is solved in each time step. The
method is identical to the implicit Euler method yn+1 = yn + hϕ(hJn )fn .
for linear problems and therefore inherits its A-
stability. Higher-order linearly implicit methods The method is exact for linear f (y) = Jy + c. It
can be obtained by Richardson extrapolation of differs from the linearly implicit Euler method in
the linearly implicit Euler method, or they are that the entire function ϕ(z) replaces the ratio-
specially constructed Rosenbrock methods. Like nal function 1/(1 − z). Higher-order exponential
explicit Runge-Kutta methods these methods de- methods of one-step and multistep type have also
termine the solution approximation as been constructed. Exponential integrators have
proven useful for large-scale problems in physics
s
X i−1
X and for nonlinear parabolic equations, as well as
y1 = y0 + h bi Yi0 , Yi = y0 + h aij Yj0 , for highly oscillatory problems like those consid-
i=1 j=1 ered in Section 5.6.
but compute the derivative stages consecutively
by solving s linear systems of equations (written 4.7 Chebyshev methods
here for an autonomous problem, f (t, y) = f (y), For moderately stiff problems one can avoid nu-
and J = ∂y f (y0 )): merical linear algebra altogether by using explicit
i−1
Runge-Kutta methods of low order (2 or 4) and
(I − γhJ)Yi0 = f (Yi ) + hJ
X
γij Yj0 . high stage number, which are constructed to have
j=1
a large stability domain covering a strip near the
negative real semi-axis. The stability function of
Such methods are easy to implement and have such methods is a high-degree polynomial related
gained popularity in the numerical integration to Chebyshev polynomials. The stage number is
of spatial semi-discretizations of partial differen- chosen adaptively to include the product of the
tial equations. For large problems, the domi- step size with the dominating eigenvalues of the
nating numerical cost is in the solution of the Jacobian in the stability domain. With s stages,
systems of linear equations, using either direct one can cover intervals on the negative real axis
sparse solvers or iterative methods such as pre- of a length proportional to s2 . The quadratic
conditioned Krylov subspace methods. growth of the stability interval with the stage
number makes these methods suitable for prob-
lems with large negative real eigenvalues of the
4.6 Exponential integrators Jacobian, such as spatial semidiscretizations of
While it appears an obvious idea to use the expo- parabolic partial differential equations.
nential of the Jacobian in a numerical method,
this has for a long time been considered im- 5 Structure-preserving methods
practical, and particularly so for large problems.
This attitude changed, however, in the mid-1990s The methods discussed so far are designed for
when it was realized that Krylov subspace meth- general differential equations, and a distinction
ods for approximating a matrix exponential times was drawn only between nonstiff and stiff prob-
a vector, eγhJ v, show superlinear convergence, lems. There are, however, important classes of
whereas there is generally only linear convergence differential equations with a special, often geo-
for solving linear systems (I − γhJ)x = v. Un- metric structure, whose preservation in the nu-
less a good preconditioner for the linear system merical discretization leads to substantially bet-
is available, computing the action of the matrix ter methods, especially when integrating over
11

long times. The most prominent of these are Such methods exist: the “symplectic Euler
Hamiltonian systems, which are all-important in method” of Section 1.3 is indeed symplectic.
physics. Their flow has the geometric property of Great interest in symplectic methods was spurred
being symplectic. when, in 1988, Lasagni, Sanz-Serna and Suris
In respecting the phase space geometry under independently characterized symplectic Runge–
discretization and analyzing its effect on the long- Kutta methods as those whose coefficients satisfy
time behavior of a numerical method, there is a the condition
shift of viewpoint from concentrating on the ap-
proximation of a single solution trajectory to con- bi aij + bj aji − bi bj = 0.
sidering the numerical method as a discrete dy-
namical system that approximates the flow of a Gauss methods (see Section 4.4) were already
differential equation. known to satisfy this condition, and were thus
While many differential equations have inter- found to be symplectic. Soon after these discov-
esting structures to preserve under discretization eries it was realized that a numerical method is
— and much work has been done in devising and symplectic if and only if the modified differen-
analyzing appropriate numerical methods for do- tial equation of backward analysis (Section 2.5)
ing so — we will restrict our attention to Hamil- is again Hamiltonian. This made it possible to
tonian systems here. Their numerical treatment prove rigorously the almost-conservation of en-
has been an active research area for the past two ergy over times that are exponentially long in the
decades. inverse step size, as well as further favorable long-
time properties such as the almost-preservation
of KAM (Kolmogorov–Arnold–Moser) tori of per-
5.1 Symplectic methods turbed integrable systems over exponentially long
The time-t flow of a differential equation y 0 = times.
f (y) is the map ϕt that associates with an initial
value y0 at time 0 the solution value at time t: 5.2 The Störmer–Verlet method
ϕt (y0 ) = y(t). Consider a Hamiltonian system
By the time symplecticity was entering the field of
p0 = −∇q H(p, q), q 0 = ∇p H(p, q), numerical analysis, scientists in molecular simula-
tion had been doing symplectic computations for
or equivalently, for y = (p, q), more than twenty years without knowing it: the
µ ¶ standard integrator of molecular dynamics, the
0 I method used successfully ever since Luc Verlet in-
y 0 = J −1 ∇H(y) with J= .
−I 0 troduced it to the field in 1967, is symplectic. For
a Hamiltonian H(p, q) = 12 pT M −1 p + V (q) with
The flow ϕt of a Hamiltonian system is symplec- a symmetric positive definite mass matrix M , the
tic, that is, the derivative Dϕt with respect to the method is explicit and given by the formulas
initial value satisfies
h
Dϕt (y)T J Dϕt (y) = J pn+1/2 = pn − ∇V (qn )
2
qn+1 = qn + hM −1 pn+1/2
for all y and t for which ϕt (y) exists. This is a h
quadratic relation formally similar to orthogonal- pn+1 = pn+1/2 − ∇V (qn+1 ).
2
ity, with J in place of the identity matrix I, but it
is related to the preservation of areas rather than Such a method was also formulated by the as-
lengths in phase space. tronomer Störmer in 1907, and in fact can even
A numerical one-step method yn+1 = Φh (yn ) be traced back to Newton’s Principia from 1687,
is called symplectic if the numerical flow Φh is a where it was used as a theoretical tool in the
symplectic map: proof of the preservation of angular momentum
in the two-body problem (Kepler’s second law),
DΦh (y)T J DΦh (y) = J. which is indeed preserved by this method. Given
12

that there are already sufficiently many Newton and ϕVt of the systems with Hamiltonians T and
methods in numerical analysis, it is fair to refer to V , respectively, are obtained by solving the trivial
the method as the Störmer–Verlet method (Verlet differential equations
method and leapfrog method are also often-used ½ 0 ½ 0
names). As will be discussed in the next three T p =0 V p = −∇V (q)
ϕt : ϕt :
subsections, the symplecticity of this method can q 0 = M −1 p q0 = 0 .
be understood in various ways by relating the We then note that the Störmer–Verlet method
method to different classes of methods that have can be interpreted as a composition of the exact
proven useful in a variety of applications. flows of the split differential equations:

5.3 Composition methods ΦSV T V T


h = ϕh/2 ◦ ϕh ◦ ϕh/2 .

Let us denote the one-step map (pn , qn ) 7→ Since the flows ϕTh/2 and ϕVh are symplectic, so is
(pn+1 , qn+1 ) of the Störmer–Verlet method by their composition.
ΦSV
h , that of the symplectic Euler method of Sec- Splitting the vector field of a differential equa-
tion 1.3 by ΦSEh , and that of the adjoint symplec- tion and composing the flows of the subsystems is
tic Euler method by ΦSE∗ h , where instead of the a structure-preserving approach that yields meth-
argument (pn+1 , qn ) one uses (pn , qn+1 ). Then, ods of arbitrary order and is useful in the time
the second-order Störmer–Verlet method can be integration of a variety of ordinary and partial
interpreted as the composition of the first-order differential equations, such as linear and nonlin-
symplectic Euler methods with halved step size: ear Schrödinger equations.
ΦSV SE∗ SE
h = Φh/2 ◦ Φh/2 .
5.5 Variational integrators
Since the composition of symplectic maps is
symplectic, this shows the symplecticity of the For the Hamiltonian H(p, q) = 12 pT M −1 p + V (q),
Störmer–Verlet method. We further note that the Hamilton equations of motion ṗ = −∇V (q),
the method is time-reversible (or symmetric): q̇ = M −1 p can be combined to give the second-
Φ−h ◦ Φh = id, or equivalently Φh = Φ∗h with order differential equation
the adjoint method Φ∗h := Φ−1 −h . This is known M q̈ = −∇V (q),
to be another favorable property for conservative
systems. which can be interpreted as the Euler-Lagrange
Moreover, from first-order methods we have ob- equations for minimizing the action integral
tained a second-order method. More generally, Z tN
starting from a low-order method Φh , methods 1
L(q(t), q̇(t)) dt with L(q, q̇) = q̇ TM q̇ − V (q)
of arbitrary order can be constructed by suitable t0 2
compositions
over all paths q(t) with fixed end-points. In the
Φcs h ◦ · · · ◦ Φc1 h or Φ∗bs h ◦ Φas h ◦ · · · ◦ Φ∗b1 h ◦ Φa1 h . Störmer-Verlet method, eliminating the momenta
yields the second-order difference equations
Systematic approaches to high-order composi-
tions were first given by Suzuki and Yoshida in M (qn+1 − 2qn + qn−1 ) = −h2 ∇V (qn ),
1990. Whenever the base method is symplectic,
then so is the composed method. The coefficients which are the discrete Euler-Lagrange equations
can be chosen such that the resulting method is for minimizing the discretized action integral
symmetric. N −1
−q ¢ −q ¢
³ ¡ ´
X h q q
L qn , n+1 n + L qn+1 , n+1 n ,
¡
2 h h
5.4 Splitting methods n=0

Splitting the Hamiltonian H(p, q) = T (p) + V (q) which results from a trapezoidal rule approxi-
into its kinetic energy T (p) = 12 pT M −1 p and po- mation to the action integral and piecewise lin-
tential energy V (q), we have that the flows ϕTt ear approximation to q(t). The Störmer–Verlet
13

method can thus be interpreted as resulting from smaller time steps, noting u(h) = u(−h).
the direct discretization of the Hamilton varia- The argument of f [slow] might preferably be re-
tional principle. Such an interpretation can in placed with an averaged value q n , in order to mit-
fact be given for every symplectic method. Con- igate the adverse effect of possible step size res-
versely, symplectic methods can be constructed onances that appear when the product of h with
by minimizing a discrete action integral. In par- an eigenfrequency of the Hessian is close to an
ticular, approximating the action integral by a integral multiple of π.
quadrature formula and the positions q(t) by a If the fast potential is quadratic, V [fast] (q) =
1 T
piecewise polynomial leads to a symplectic par- 2 q Aq, the auxiliary differential equation can be
titioned Runge–Kutta method, which in general solved exactly in terms of trigonometric functions
uses different Runge–Kutta formulas for positions of the matrix h2 A. The resulting method can
and momenta. With Gauss quadrature one rein- then be viewed as an exponential integrator as
terprets in this way the Gauss methods of Sec- considered in Section 4.6.
tion 4.4, and with higher-order Lobatto quadra-
ture formulas one obtains higher-order relatives 6 Boundary value problems
of the Störmer–Verlet method.
In a two-point boundary value problem, the dif-
5.6 Oscillatory problems ferential equation is coupled with boundary con-
ditions of the same dimension:
Highly oscillatory solution behavior in Hamilto-
nian systems typically arises when the potential y 0 (t) = f (t, y(t)), a ≤ t ≤ b,
is a multiscale sum V = V [slow] + V [fast] , where r(y(a), y(b)) = 0.
the Hessian of V [fast] has positive eigenvalues that
are large compared with those of V [slow] . (Here As an important class of examples, such problems
we assume M = I for simplicity.) With standard arise as the Euler–Lagrange equations of varia-
methods such as the Störmer–Verlet method, very tional problems, typically with separated bound-
small time steps would be required, for reasons ary conditions ra (y(a)) = 0, rb (y(b)) = 0.
of both accuracy and stability. Various numeri-
cal methods have been devised with the aim to 6.1 The sensitivity matrix
overcome such a limitation. Here we just de-
scribe one such method, a multiple time-stepping The problem of existence and uniqueness of a so-
method that reduces the computational work sig- lution is more subtle than for initial value prob-
nificantly when the slow force f [slow] = −∇V [slow] lems. For a linear boundary value problem
is far more expensive to evaluate than the fast
y 0 (t) = C(t)y(t) + g(t), a ≤ t ≤ b,
force f [fast] = −∇V [fast] . A basic principle is to
rely on averages instead of pointwise force eval- Ay(a) + By(b) = q,
uations. In the averaged-force method, the force
a unique solution exists if and only if the sen-
fn = −∇V (qn ) in the Störmer–Verlet method is
sitivity matrix E = A + B U (b, a) is invertible,
replaced with an averaged force f n as follows: we
where U (t, s) is the propagation matrix yielding
freeze the slow force at qn and consider the aux-
v(t) = U (t, s)v(s) for every solution of the linear
iliary differential equation
differential equation v 0 (t) = C(t)v(t).
ü = f [slow] (qn ) + f [fast] (u) A solution of a nonlinear boundary value prob-
lem is locally unique if the linearization along this
with initial values u(0) = qn , u̇(0) = 0. We then
solution has an invertible sensitivity matrix.
define the averaged force as
Z 1
fn = (1 − |θ|) f [slow] (qn ) + f [fast] (u(θh)) dθ,
¡ ¢ 6.2 Shooting
−1
Just as Newton’s method replaces a nonlinear sys-
which equals f n = h12 u(h) − 2u(0) + u(−h) .
¡ ¢
tem of equations with a sequence of linear sys-
The value u(h) is computed approximately with tems, the shooting method replaces a boundary
14

value problem with a sequence of initial value value problems on the subintervals together with
problems. The objective is to find an initial value their linearization, and then a linear system with
x such that the solution of the differential equa- a large sparse matrix is solved for the increments
tion with this initial value, denoted y(t; x), satis- in (x0 , . . . , xN ).
fies the boundary conditions:

F (x) := r(x, y(b; x)) = 0. 6.4 Collocation


In the collocation approach to the boundary value
Newton’s method is now applied to this nonlinear
problem, one determines an approximation u(t)
system of equations: starting from an initial guess
that is a continuous, piecewise polynomial of de-
x0 , one iterates
gree at most s, and that satisfies the boundary
xk+1 = xk +∆xk with DF (xk )∆xk = −F (xk ). conditions and the differential equation at a fi-
nite number of collocation points tn,i = tn−1 +
Here, the derivative matrix DF (xk ) turns out to ci (tn − tn−1 ) (for n = 1, . . . , N and i = 1, . . . , s):
be the sensitivity matrix E k of the linearization of
the boundary value problem along y(t; xk ). In the u0 (t) = f (t, u(t)) at t = tn,i
kth iteration, one solves numerically the initial r(u(a), u(b)) = 0.
value problem with initial value xk together with
its linearization The method can be interpreted, and imple-
mented, as a multiple shooting method in which
(Y k )0 (t) = ∂y f (t, y(t; xk )) Y k (t), Y k (a) = I. a single step with a collocation method for initial
value problems, as considered in Section 4.4, is
6.3 Multiple shooting made to approximate the solution in each subin-
terval. The most common choice, as first imple-
The conceptual elegance of the shooting method
mented by Ascher, Christiansen and Russell in
— that it reduces everything to the solution of
1979, is collocation at Gauss nodes, which has
initial value problems over the whole interval —
good stability properties in the forward and back-
can easily turn into its computational obstruc-
ward directions. The order of approximation at
tion. Newton’s method may be very sensitive to
the grid points tn is p = 2s. Moreover, if the
the choice of the initial value x0 . The norms of the
boundary value problem results from a variational
matrices E −1 and U (b, a), which determine the ef-
problem, then Gauss collocation can be inter-
fect of perturbations in the boundary value prob-
preted as a direct discretization of the variational
lem and the initial value problem, respectively,
problem (see Section 5.5).
are unrelated and may differ widely.
The problem can be avoided by subdividing the
interval a = t0 < t1 < · · · < tN = b, shooting on 7 Summary
every subinterval, and requiring continuity of the
solution at the nodes tn . With y(t; tn , xn ) denot- The numerical solution of ordinary differential
ing the solution of the differential equation that equations is an area driven both by applications
starts at tn with initial value xn , this approach and theory, with efficient computer codes along-
leads to a larger nonlinear system with the conti- side beautiful theorems, both relying on insight
nuity conditions and knowledge of the researchers that are active
in this field. It is an area that interacts with
Fn (xn−1 , xn ) = y(tn ; tn−1 , xn−1 ) − xn = 0 neighboring fields in computational mathemat-
ics (numerical linear algebra, the numerical so-
for n = 1, . . . , N together with the boundary con- lution of partial differential equations and opti-
ditions mization), with the theory of differential equa-
F0 (x0 , xN ) := r(x0 , xN ) = 0. tions and dynamical systems, and time and again
with the application areas in science and engi-
Newton’s method is now applied to this system neering where numerical methods for differential
of equations. In each iteration, one solves initial equations are used.
15

Further Reading
1. Ascher, U.M., Mattheij, R.M.M. and Rus-
sell, R.D. 1995 Numerical solution of bound-
ary value problems for ordinary differential equa-
tions. SIAM, Philadelphia.
2. Ascher, U.M. and Petzold, L.R. 1998 Computer
methods for ordinary differential equations and
differential-algebraic equations, SIAM, Philadel-
phia.
3. Butcher, J.C. 2008 Numerical methods for or-
dinary differential equations, second revised ed.,
Wiley, Chichester.
4. Crouzeix, M. and Mignot, A.L. 1989 Analyse
numérique des équations différentielles, 2e éd.
révisée et augmentée. Masson, Paris.
5. Deuflhard, P. and Bornemann, F. 2002 Scientific
computing with ordinary differential equations,
Springer, New York.
6. Gear, C.W. 1971 Numerical initial value prob-
lems in ordinary differential equations, Prentice-
Hall, Englewood Cliffs, NJ.
7. Hairer, E., Nørsett, S.P. and Wanner, G. 1993
Solving ordinary differential equations. I: Nons-
tiff problems. 2nd revised ed., Springer, Berlin.
8. Hairer, E. and Wanner, G. 1996 Solving ordinary
differential equations. II: Stiff and differential-
algebraic problems. 2nd revised ed., Springer,
Berlin.
9. Hairer, E., Lubich, C. and Wanner, G. 2006
Geometric numerical integration. Structure-
preserving algorithms for ordinary differential
equations. 2nd revised ed., Springer, Berlin.
10. Henrici, P. 1962 Discrete variable methods in or-
dinary differential equations, Wiley, New York.
11. Iserles, A. 2009 A first course in the numerical
analysis of differential equations. Second edi-
tion, Cambridge Univ. Press, Cambridge.
12. Leimkuhler, B. and Reich, S. 2004 Simulating
Hamiltonian dynamics, Cambridge Univ. Press,
Cambridge.

Biographies of contributors

Ernst Hairer, born in 1949, Dr. phil. at Univ.


Innsbruck in 1972, since 1985 Professor of Nu-
merical Mathematics at Université de Genève.
Christian Lubich, born in 1959, Dr. rer. nat. at
Univ. Innsbruck in 1983, since 1994 Professor of
Numerical Mathematics at Universität Tübingen.

You might also like