Numerical ordinary differential equations is the part of
numerical analysis which studies the numerical solution of
ordinary differential equations (ODEs). This
field is also known under the name numerical integration, but
some people reserve this term for the computation of integrals.
Many differential equations cannot be solved analytically, in which
case we have to satisfy ourselves with an approximation to the
solution. The algorithms studied here can be used to compute such
an approximation. An alternative method is to use techniques from
calculus to obtain a series expansion of the solution.
Ordinary differential equations occur in many scientific disciplines,
for instance in mechanics, chemistry, ecology, and
economics. In addition, some methods in
numerical partial differential equations convert the
partial differential equation into an ordinary differential
equation, which must then be solved.
The problem
We want to approximate the solution of the differential equation
-
where
f is a function that maps
[
t0,∞) ×
Rd
to
Rd, and the initial condition
y0 ∈
Rd is a given
vector.
The above formulation is called an initial value problem
(IVP). The Picard-Lindelöf theorem states that there is a
unique solution, if f is Lipschitz continuous. In contrast,
boundary value problems (BVPs) specify (components of) the
solution y at more than one points. Different methods need to be
used to solve BVPs, for example the shooting method,
multiple shooting or global methods like finite differences or
collocation methods.
Note that we restrict ourselves to first-order differential
equations (meaning that only the first derivative of y appears in
the equation, and no higher derivatives). However, a higher-order
equation can easily be converted to a first-order equation by
introducing extra variables. For example, the second-order equation
y = −y''
can be rewritten as two first-order equations:
y' = z and
z' = −y.
Methods
Two elementary methods are discussed to give the reader a feeling for
the subject. After that, pointers are provided to other methods (which
are generally more accurate and efficient). The methods mentioned here
are analysed in the next section.
The Euler method
Starting with the differential equation (1), we replace the derivative
y' by the finite difference approximation
-
which yields the following formula
-
This formula is usually applied in the following way. We choose a step
size
h, and we construct the sequence
t0,
t1 =
t0 +
h,
t2 =
t0 + 2
h,
... We denote by
yn a numerical estimate of the
exact solution
y(
tn). Motivated by (3), we
compute these estimates by the following
recursive
scheme
-
This is the
Euler method, named after
Leonhard Euler who
described this method in
1768.
The backward Euler method
If, instead of (2), we use the approximation
-
we get the
backward Euler method:
-
The backward Euler method is an
implicit method, meaning that we
have to solve an equation to find
yn+1. One often
uses
functional iteration or (some modification of) the
Newton-Raphson method to achieve this. Of course,
it costs time to solve this equation; this cost must be taken into
consideration when one selects the method to use.
Generalisations
The Euler method is often not accurate enough. In more precise terms,
it only has order one (the concept of
order is explained
below). This caused mathematicians to look for higher-order methods.
One possibility is to use not only the previously computed value
yn to determine yn+1, but to
make the solution depend on more past values. This yields a so-called
multistep method. Almost all practical multistep methods fall within
the family of linear multistep methods, which have the form
+ \alpha_0 y_n
f(t_{n+k-1},y_{n+k-1}) + \cdots + \beta_0 f(t_n,y_n) \right).
Another possibility is to use more points in the interval
*. This leads to the
family of Runge-Kutta methods, named after Carle Runge and
Martin Kutta. One of their fourth-order methods is especially
popular.
Both ideas can also be combined. The resulting methods are called
general linear methods.
Advanced features
A good implementation of one of these methods for solving an ODE
entails more than the time-stepping formula.
It is often inefficient to use the same step size all the time, so
variable step-size methods have been developed. Usually, the step
size is chosen such that the (local) error per step is below some
tolerance level. This means that the methods must also compute an
error indicator, an estimate of the local error.
An extension of this idea is to choose dynamically between different
methods of different orders (this is called a
variable order method). Extrapolation methods are often used
to construct various methods of different orders.
Other desirable features include:
- dense output: cheap numerical approximations for the whole integration interval, and not only at the points t0, t1, t2, ...
- event location: finding the times where, say, a particular function vanishes.
Alternative methods
Many methods do not fall within the framework discussed here. Some
classes of alternative methods are:
- multiderivative methods, which use not only the function f but also its derivatives. This class includes Hermite-Obreschkoff methods and Fehlberg methods, as well as methods like the Parker–Sochacki method, which compute the coefficients of the Taylor series of the solution y recursively.
- methods for second order ODEs. We said that all higher-order ODEs can be transformed to first-order ODEs of the form (1). While this is certainly true, it may not be the best way to proceed. In particular, Nyström methods work directly with second-order equations.
Analysis
Numerical analysis is not only the design of numerical methods, but
also their analysis. Three central concepts in this analysis are
convergence (whether the method approximates the solution), order (how
well it approximates the solution), and
stability (whether errors are damped out).
Convergence
A numerical method is said to be
convergent if the numerical solution approaches the exact solution as the step size
h goes to 0. More precisely, we require that for every ODE (1) with a
Lipschitz function
f and every
t* > 0,
\| y_{n,h} - y(t_n) \| = 0.
All the methods mentioned above are convergent. In fact, convergence is a condition sine qua non for any numerical scheme.
Consistency and order
Suppose the numerical method is
-
The local error of the method is defined as
-
The method is said to be consistent if
-
The method has
order if
-
The (forward) Euler method and the backward Euler method
introduced above both have order 1. Most methods being used in
practise attain higher order.
A related concept is the global error, the error sustained in all the steps
one needs to reach a fixed time t. Explicitly, the global error at
time t is
yN − y(t) where N = (t−t0)/h.
The global error of a pth order one-step method is O(hp);
in particular, such a method is convergent. This statement is not
necessarily true for multi-step methods.
Stability and stiffness
- Main article: Stiff equation
For some differential equations, application of standard methods—such as the Euler method, explicit
Runge-Kutta methods, or
multistep methods (e.g., Adams-Bashforth methods)—exhibit instability in the solutions, though other methods may produce stable solutions. This "difficult behaviour" in the equation (which may not necessarily be complex itself) is described as
stiffness, and is often caused by the presence of different time scales in the underlying problem. Stiff problems are ubiquitous in
chemical kinetics,
control theory,
solid mechanics,
weather prediction,
biology, and
electronics.
History
Below is a concise
timeline of some important developments in this field.
References
- Ernst Hairer, Syvert Paul Nørsett and Gerhard Wanner, Solving ordinary differential equations I: Nonstiff problems, second edition, Springer Verlag, Berlin, 1993. ISBN 3-540-56670-8.
- Ernst Hairer and Gerhard Wanner, Solving ordinary differential equations II: Stiff and differential-algebraic problems, second edition, Springer Verlag, Berlin, 1996. ISBN 3-540-60452-9.
(This two-volume monograph systematically covers all aspects of the field.)
- Arieh Iserles, A First Course in the Numerical Analysis of Differential Equations, Cambridge University Press, 1996. ISBN 0-521-55376-8 (hardback), ISBN 0-521-55655-4 (paperback).
(Textbook, targeting advanced undergraduate and postgraduate students in mathematics, which also discusses numerical partial differential equations.)
- John Denholm Lambert, Numerical Methods for Ordinary Differential Systems, John Wiley & Sons, Chichester, 1991. ISBN 0-471-92990-5.
(Textbook, slightly more demanding than the book by Iserles.)
External links
Numerical analysis | Ordinary differential equations