Information Technology Reference
In-Depth Information
which is what we expect from Table
3.1
above, where we computed numerically
that
r
N
r
0
r
0
10t .
We have now demonstrated that the numerical solution also forms a circle as the
time step size goes to zero.
3.4.6
More on Numerics
In Project 2.4.2 on page 69, we studied numerical methods for an ODE of the form
u
0
.t /
D
f.
u
.t //;
u
.0/
D
u
0
:
(3.49)
By applying Taylor series expansions, we derived the standard explicit (forward
Euler) scheme
u
nC1
D
u
n
C
t f .
u
n
/;
(3.50)
the standard implicit (backward Euler) scheme
u
nC1
t f .
u
nC1
/
D
u
n
;
(3.51)
and the Crank-Nicolson scheme
t
2
t
2
u
nC1
f.
u
nC1
/
D
u
n
C
f.
u
n
/:
(3.52)
We observed, numerically, that the errors for these schemes seem to be
.t/,
O
.t
2
/, respectively. Similar schemes can be derived for the systems
considered in the present chapter. We start by considering the simplified system
.t/,and
O
O
F
0
.t /
D
1
S.t/; F.0/
D
F
0
;
S
0
.t /
D
F.t/
1; S.0/
D
S
0
:
(3.53)
We want to use the Crank-Nicolson scheme and see whether we can obtain a higher
accuracy than we did with the explicit scheme (
3.25
) above. The basic form of the
Crank-Nicolson scheme for the problem
u
0
.t /
D
f.
u
.t //
is
u
nC1
u
n
t
1
2
.f .
u
nC1
/
C
f.
u
n
// ;
D
(3.54)
from which (
3.52
) is easily obtained. By applying the form (
3.54
) to both equations
in (
3.53
), we get