5.2 Higher-order Methods for ODEs 227
(I −hA ⊗J) requires
2
3
n
3
operations on the real matrix (I −γ
1
hJ) and
2
3
n
3
operations on the complex variable matrix (I − (γ
2
+ iγ
3
)hJ).
Local error estimate. As noted above, the efficient implementation of nu-
merical integration methods requires an estimate of the local error so that the
step size can be adjusted to satisfy the desired error tolerance. The implicit
Runge-Kutta methods given in Table 5.2.3 do not include embedded formulas
to estimate the local error. However, we can derive error estimation formulas
using the approach described by Hairer and Wanner (1993), and de Swart
and S¨oderlind (1997). We will illustrate this technique using the Radau IIA,
s = 3 method.
First we note that we can compute a numerical solution to the ODE at
time t
(k+1)
via (5.17). Doing so gives the approximate solution y
(k+1)
. Here
we compute a second approximate solution, ˆy
(k+1)
, using
ˆy
(k+1)
= y
(k)
+ h
ˆ
b
0
f(y
(k)
, t
(k)
) + h
s
X
i=1
ˆ
b
i
k
i
+ hˆγf(ˆy
(k+1)
, t
(k+1)
). (5.27)
Note that (5.27) is an implicit equation for the solution estimate ˆy
(k+1)
. In
this formula the stage derivatives k
i
, i = 1, 2, ···, s are defined in (5.17), and
are the same values used to compute y
(k+1)
. The coefficients in (5.27), i.e., ˆγ,
and
ˆ
b
i
, i = 0, 1, ···, s are selected so that the discretization error is of order
s + 1. To meet this criteria the coefficients must satisfy the order conditions
ˆ
C
ˆ
b =
1 −
ˆ
b
0
,
1
2
, ···,
1
s
T
− ˆγ1, (5.28)
where
ˆ
C ∈ R
s×s
, the i, j-th element of the matrix
ˆ
C is given by
ˆ
C
ij
=
c
i−1
j
, j = 1, 2, ···, s,
ˆ
b = [
ˆ
b
1
,
ˆ
b
2
, ···,
ˆ
b
s
]
T
, and 1 = [1, 1, ···, 1]
T
∈ R
s
. The
coefficients c
j
, j = 1, 2, ···, s are associated with a specific implicit Runge-
Kutta method. In the case of the Radau IIA, s = 3 method we have c
1
=
16−
√
6
36
, c
2
=
16+
√
6
36
and c
3
=
1
9
.
In (5.27) the variables ˆγ and
ˆ
b
0
are two free parameters. In which case it
is convenient to select ˆγ as a real eigenvalue of the matrix A. Thus, for the
Radau IIA, s = 3 method we use ˆγ = γ
1
= 0.27489. In our implementation
of the implicit Runge-Kutta method we also use
ˆ
b
0
= 0.02. The remaining
coefficients,
ˆ
b, are determined by solving the linear system (5.28). (Note that
de Swart and S¨oderlind (1997) describe the method used to select
ˆ
b
0
.)
To implement the formula (5.27) it is sufficient to perform one iteration
of a simplified Newton’s method on the system
ˆ
φ(ˆy
(k+1)
) = ˆy
(k+1)
− y
(k)
− h
ˆ
b
0
f(y
(k)
, t
(k)
)