Information Technology Reference
In-Depth Information
u
.t
nC1
/
D
u
.t
n
/
C
tf .
u
.t
n
//
C
O.t
2
/:
Use this observation to derive the
Heun scheme
t
2
u
nC1
D
u
n
C
Œf .
u
n
/
C
f.
u
n
C
tf .
u
n
// :
(j) Implement the Heun scheme and repeat the experiments in (g) and (h) above.
Is the error O.t
2
/‹
(k) Let us now consider the slightly more general initial value problem
u
0
D
f.t;
u
.t //;
(2.71)
u
.0/
D
u
0
:
We note that, for instance,
u
0
.t /
D
sin.t /
u
2
.t /
can be written in this form with f.t;
u
/
D
sin.t /
u
2
; and we note also that this
problem cannot be formulated in the form (
2.69
). Use the Taylor series to derive
the explicit Euler scheme,
u
nC1
D
u
n
C
tf .t
n
;
u
n
/
the implicit Euler scheme,
u
nC1
t f .t
nC1
;
u
nC1
/
D
u
n
;
the Crank-Nicolson scheme
u
nC1
t
2
t
2
f.t
nC1
;
u
nC1
/
D
u
n
C
f.t
n
;
u
n
/;
and the Heun scheme for the problem,
F
1
D
f.t
n
;
u
n
/;
D
f.t
nC1
;
u
n
C
tF
1
/;
F
2
t
2
u
nC1
D
u
n
C
ŒF
1
C
F
2
:
(l) Much more accurate schemes can be derived by carrying on in the same spirit as
above. Probably the most widespread scheme is the fourth-order Runge-Kutta
scheme, which can be formulated as follows: