The Initial Value Problem y' = f(x, y); y(c) = d 91
SOLUTION
Table 2.4 contains the fourth order Runge-Kutta approximation to the
IVP (7) on the interval [O, 1] obtained using a constant stepsize of h = .1.
All calculations were performed using six significant digits.
Table 2.4 Fourth order Runge-Kutta approximation to the IVP
(7) y' = y + x; y(O) = 1 on [O, 1] with stepsize h = .1
h(k1 + 2k2+
Xn Yn k1 k2 k3 k4 2k3 + k4)/6
.0 1.0 1.0 1.1 1.105 1.2105 .110341
.1 1.11034 1.21034 1.32086 1.32638 1.44298 .132463
.2 1.24280 1.44280 1.56494 1.57105 1.69991 .156911
.3 1.39971 1.69971 1.83470 1.84145 1.98386 .183931
.4 1.58364 1.98364 2.13283 2.14028 2.29767 .213 792
.5 1.79744 2.29744 2.46231 2.47055 2.64449 .246794
.6 2.04423 2.64423 2.82644 2.83555 3.02778 .283266
.7 2.32750 3.02750 3.22887 3.23894 3.45139 .323574
.8 2.65107 3.45107 3.67362 3.68475 3.91954 .368122
.9 3.01919 3.91919 4.16515 4.17745 4.43694 .41 7355
1.0 3.43655
A tabular comparison of the methods we have used in this section to ap-
proximate the solution of the IVP (7) y' = y + x; y(O) = 1 on the interval
[O, 1] with a constant stepsize of h = .1 is displayed in Table 2.5. From this
table it is obvious the fourth order Runge-Kutta method is the most accu-
rate method for approximating the solution to this particular initial value
problem. However, since the fourth order Runge-Kutta method requires four
f function evaluations per step while the improved Euler's method requires
two f function evaluations per step and Euler's method only requires one f
function evaluation per step, the fourth order Runge-Kutta method required
approximately twice the computing time of the improved Euler's method and
four times the computing time of Euler's method. Consequently, one might
anticipate that the approximation to the solution of the IVP (7) generated
using Euler's method with a constant stepsize h = .025, using the improved
Euler's method with h = .05, and using the fourth order Runge-Kutta method
with h = .1 would require approximately the same amount of computing time
and have approximately the same accuracy, since each method would then re-
quire 40 evaluations of the function f. Performing the necessary calculations,
we obtain the results shown in Table 2.6.