Error control
Runge-Kutta methods can be written in the general form
,
,
where the
are approximations for the values
which satisfy the initial value problem
,
in
, and
.
We would like to ensure that for a given small value
, a number of steps can be chosen such that the global error is bounded by
, i.e.,
for all
.
Since the global error is not easy to calculate, we will focus on the local truncation error (which assumes the previous calculated approximation can be treated as exact) . It can be shown that under suitable conditions, a connection exists between the local truncation error and the global error, in the sense that a bound on the local truncation error produces a corresponding bound on the global error.
Therefore, we will try to estimate the local trunction error made in a calculation.
First, consider a method with a local truncation error
of order
,
,
Second, consider a method with local truncation error
of order
,
with
the equivalent of
for the second method.
The first method produces estimates
and the second method yields estimates
. Then assume that
.
Then
,
or
Similarly,
Then,
or,
.
But
while
, so that
.
Hence, the local truncation error can be estimated in terms of the calculated values
and
. This requires repeating the calculation of the estimate using a method of a higher order. This extra calculation, however, will provide an estimate of the accuracy of the first estimate (obtained by the lower order method). This is often worth the extra effort.
>
Can we now choose the step-size such that the truncation error is kept below a given bound
?
Consider the formula above and the fact that
, or,
, for some constant
.
Then,
.
Now consider a constant, positive factor
, then the truncation error for a step-size
is given by
,
so that, to keep the truncation error bounded by a value
, we must have
,
and the required step-size is found using a value of
which satisfies the inequality
>
This formula allows you to estimate at every step in the calculation the step size needed to keep the local truncation error for that step as small as you want.
>