Information Technology Reference
In-Depth Information
r.1/ D r.0/ C Z 1
0
t 2 dt D 1=3:
By using (2.23) with N D 10; we get 13
r.1/ r 10
D 0 C t t 2 C .2t/ 2 CC .9t/ 2
D t 3 .1 C 2 2 CC 9 2 /
9 10 19
10 3
D 0:285;
1
6
D
which is a reasonable approximation to the exact solution. Let us also try N D 100:
Then
r.1/ r 100
D 0 C t t 2 C .2t/ 2 CC .99t / 2
D t 3 .1 C 2 2 CC 99 2 /
99 100 199
100 3
D 0:3285;
1
6
D
which is an even better approximation.
Numerical Integration
Since the simple model (2.22) can be integrated directly, we can also use the
trapezoidal method derived in Chap. 1. By integration of (2.22), we get
r.t/ D r 0 C Z t
0
f.s/ds:
(2.24)
In order to apply the trapezoidal method, we introduce
t D t=N
where N
>
1 is an integer. As above, we define
13 Recall that
X
m
1
6 m.m
x 2
D
C
1/.2m
C
1/:
D
x
1
 
Search WWH ::




Custom Search