Beruflich Dokumente
Kultur Dokumente
k1 = h f (tk , yk ),
1 1
k2 = h f tk + h, yk + k1 ,
4 4
3 3 9
k3 = h f tk + h, yk + k1 + k2 ,
8 32 32
1 8 3544 1859 11
k6 = h f tk + h, yk − k1 + 2k2 − k3 + k4 − k5 .
2 27 2565 4104 40
Then an approximation to the solution of the I.V.P. is made using a Runge-Kutta
method of order 4:
25 1408 2197 1
(29) yk+1 = yk + k1 + k3 + k4 − k5 ,
216 2565 4101 5
where the four function values f 1 , f 3 , f 4 , and f 5 are used. Notice that f 2 is not used
in formula (29). A better value for the solution is determined using a Runge-Kutta
method of order 5:
16 6656 28,561 9 2
(30) z k+1 = yk + k1 + k3 + k4 − k5 + k6 .
135 12,825 56,430 50 55
The optimal step size sh can be determined by multiplying the scalar s times the
current step size h. The scalar s is
1/4
1/4
tol h tol h
(31) s= ≈ 0.84
2|z k+1 − yk+1 | |z k+1 − yk+1 |
498 C HAP. 9 S OLUTION OF D IFFERENTIAL E QUATIONS
An RKF45 program was used with the value tol = 2 × 10−5 for the error control
tolerance. It changed the step size automatically and generated the 10 approximations to
the solution in Table 9.10. An RK4 program was used with the a priori step size of h = 0.1,
which required the computer to generate 14 approximations at the equally spaced points in
Table 9.11. The approximations at the right endpoint are
for the RKF45 and RK4 methods, respectively. The RKF45 method has the smaller
error.
S EC . 9.5 RUNGE -K UTTA M ETHODS 499
Prentice-Hall Inc.
Upper Saddle River, New Jersey, USA
http://vig.prenhall.com/