·;·
'
)
'
I
.J
418
NUMERlcAL
METHODS FOR ORDINARY DIFFERENTIAL EQUATIONS
error should decrease by a factor of 4 when m
is
doubled, and the results in
·Table 6.20 agree. In the table, the column Error denotes the maximum error at
the node points
(xj,
t), 0
5.j
5.
n, for the given value
oft.
For
the solution of (6.9.28) by the backward Euler method, there need no
longer
be
any connection between the space step 8 and the time step
h.
By
observing the error formula (6.9.26) for the method of lines and the truncation
error formula
(6.9.7) (use p =
1)
for the backward Euler method,
we
see that the
error in solving the problem
(6.9.19)-(6.9.21) will be proportional to h + 8
2
•
For
the unknown function U of (6.9.34), there
is
a slow variation with t. Thus for the
truncation error associated with the time integration, we should be able to use a
relatively large time step
h
as
compared to the space step
8,
in order to have the
two sources of error be relatively equal in size. In Table
6.21,
we
use h =
.1
and
m
==:'
4,
8, 16. Note that this time step
is
much larger than that used in Table 6.20
for Euler's method, and thus the backward Euler method
is
much more efficient
for this particular example.
For
more
discu~sion
of the method of lines, see Aiken (1985, pp. 124-148).
For
some method-of-lines codes to solve systems
of
nonlinear parabolic partial
differential equations, in one and
two
space variables, see Sincovec and Madsen
(1975)
and
Melgaard and Sincovec (1981).
6.10 Single-Step
and
Runge-Kutta Methods
Single-step methods for solving
y'
=
f(x,
y)
require only a knowledge of the
numerical solution
Yn
in order to compute the next value Yn+l· This has obvious
advantages over the p-step multistep methods that use several past values
{Jn,
...
,
Yn-p+d,
since then the additional initial values
{y
1
,.
•.
,
Yp-d
have to
be computed by some other numerical method.
The best known one-step methods are the
Runge-Kutta
methods. They are
fairly simple to program, and their truncation error can be controlled in a more
straightforward manner than for the multistep methods. For the fixed-order
multistep methods that were used more commonly in the past, the
Runge-
Kutta
methods were the usual tool
for· calculating the needed initial values for the
multistep method. The major disadvantage of the
Runge-Kutta
methods
is
that
they use many more evaluations of the derivative
f(x,
y)
to attain the same
accuracy, as compared with the multistep methods. Later
we
will mention some
results on comparisons of variable-order Adams codes and fixed-order
Runge-Kutta
codes.
The most simple one-step method
is
based on using the Taylor series. Assume
Y(
x)
is r + 1 times continuously differentiable, where
Y(
x)
is
the solution of the
initial value problem
y'
=
/(x,
y)
(6.10.1)
Expand Y(x
1
)
about x
0
using Taylor's theorem:
h'
hr+l
Y(x
1
)
=
Y(x
0
)
+
hY'(x
0
)
+ · · ·
+-
y<r>(x
0
)
+ ( )
y<r+~>a)
(6.10.2)
r! . r + 1 !