270
8 Solving Ordinary Differential Equations
sub-interval size h, i.e., computations became more accurate. Not too surprising
then, the asymptotic error models are similar, and the convergence rate is computed
in essentially the same way (except that the error computation requires some
more consideration with the methods of the present chapter). Let us look at the
details.
8.5.1 Asymptotic Behavior of the Error
For numerical methods that solve ODEs, it is known that when Δt → 0, the
approximation error 8 usually behaves like
E = C (Δt)
r ,
(8.84)
for positive constants C and r. The constant r is known as the convergence rate, and
its value will depend on the method (r could be 1, 2 or 4, for example). A method
with convergence rate r is said to be an r-th order method, and we understand that
the larger the r value, the quicker the error E drops when the time step Δt is reduced.
8.5.2 Computing the Convergence Rate
Consider a set of experiments, i = 0, 1, . . ., each depending on a discretization
parameter Δt i that typically is halved from one experiment to the next. For each
experiment, a corresponding error E i is computed. We may then estimate r (C is
not really interesting) from two experiments:
E i−1 = CΔt
r
i−1
E i = CΔt
r
i .
We eliminate C by, e.g., dividing the latter equation by the former, and proceed to
solve for r:
r =
ln(E i /E i−1 )
ln(Δt i /Δt i−1 )
.
Clearly, r will vary with the pair of experiments used in the above formula, i.e.,
the value of i. Thus, what we actually compute, is a sequence of r i−1 values
(i = 1, 2, . . .), where each r i−1 value is computed from two experiments (E i , Δt i )
and (E i−1 , Δt i−1 ). Since the error model is asymptotic (i.e., valid as Δt → 0),
the r value corresponding to the smallest Δt value will be the best estimate of the
convergence rate.
But How Do We Compute the Error E i ? When we previously addressed the
computing of convergence rates for numerical integration methods (trapezoidal and
8 As will be addressed below, there are several options for how to quantify this error.
8 Solving Ordinary Differential Equations
sub-interval size h, i.e., computations became more accurate. Not too surprising
then, the asymptotic error models are similar, and the convergence rate is computed
in essentially the same way (except that the error computation requires some
more consideration with the methods of the present chapter). Let us look at the
details.
8.5.1 Asymptotic Behavior of the Error
For numerical methods that solve ODEs, it is known that when Δt → 0, the
approximation error 8 usually behaves like
E = C (Δt)
r ,
(8.84)
for positive constants C and r. The constant r is known as the convergence rate, and
its value will depend on the method (r could be 1, 2 or 4, for example). A method
with convergence rate r is said to be an r-th order method, and we understand that
the larger the r value, the quicker the error E drops when the time step Δt is reduced.
8.5.2 Computing the Convergence Rate
Consider a set of experiments, i = 0, 1, . . ., each depending on a discretization
parameter Δt i that typically is halved from one experiment to the next. For each
experiment, a corresponding error E i is computed. We may then estimate r (C is
not really interesting) from two experiments:
E i−1 = CΔt
r
i−1
E i = CΔt
r
i .
We eliminate C by, e.g., dividing the latter equation by the former, and proceed to
solve for r:
r =
ln(E i /E i−1 )
ln(Δt i /Δt i−1 )
.
Clearly, r will vary with the pair of experiments used in the above formula, i.e.,
the value of i. Thus, what we actually compute, is a sequence of r i−1 values
(i = 1, 2, . . .), where each r i−1 value is computed from two experiments (E i , Δt i )
and (E i−1 , Δt i−1 ). Since the error model is asymptotic (i.e., valid as Δt → 0),
the r value corresponding to the smallest Δt value will be the best estimate of the
convergence rate.
But How Do We Compute the Error E i ? When we previously addressed the
computing of convergence rates for numerical integration methods (trapezoidal and
8 As will be addressed below, there are several options for how to quantify this error.
