Information Technology Reference
In-Depth Information
where a is a given constant. We want to compute an approximate solution of r in the
time interval ranging from t
D
0 to t
D
T: Recall that r
n
denotes an approximation
of r.t
n
/,where
t
n
D
nt
and
t
D
T=N
denotes the time step. Since
r.t
nC1
/
r.t
n
/
t
r
0
.t
n
/
;
we define the scheme
r
nC1
r
n
t
D
ar
n
(2.27)
for n
>
0, where we recall that r
0
is given. We get
r
nC1
D
.1
C
at/r
n
;
(2.28)
so
r
1
D
.1
C
at/r
0
;
D
.1
C
at/r
1
D
.1
C
at/
2
r
0
;
r
2
and so on. In general, we have
r
n
D
.1
C
at/
n
r
0
:
(2.29)
Example 2.3.
Let us assume that a
D
1, r
0
D
1, T
D
1,andN
D
10.Then
1
10
/
10
2:594:
r.1/
r
10
D
.1
C
The exact solution of this problem is
r.t/
D
e
t
;
and thus
r.1/
D
e
2:718:
By choosing N
D
100; we get
1
100
/
100
2:705:
r
100
D
.1
C