Numerical methods for first order differential equations 469
y P 1 = y 0 + h(y
) 0 = 4 + 0.2(2) = 4.4
y C 1 = y 0 +
1
2 h[(y
) 0 + f (x 1 , y P 1 )]
= y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 4 +
1
2 (0.2)[2 + (3 + 3(1.2) − 4.4)]
= 4.42
(y
) 1 = 3 + 3x 1 − y P 1 = 3 + 3(1.2) − 4.42 = 2.18
Thus the first two lines of Table 49.11 have been
completed.
For line 3, x 1 = 1.4
y P 1 = y 0 + h(y
) 0 = 4.42 + 0.2(2.18) = 4.856
y C 1 = y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 4.42 +
1
2 (0.2)[2.18
+ (3 + 3(1.4) − 4.856)]
= 4.8724
(y
) 1 = 3 + 3x 1 − y P 1 = 3 + 3(1.4) − 4.8724
= 2.3276
For line 4, x 1 = 1.6
y P 1 = y 0 + h(y
) 0 = 4.8724 + 0.2(2.3276)
= 5.33792
y C 1 = y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 4.8724 +
1
2 (0.2)[2.3276
+ (3 + 3(1.6) − 5.33792)]
= 5.351368
Table 49.11
x 0
y 0
y
0
1.
1.0
4
2
2.
1.2
4.42
2.18
3.
1.4
4.8724
2.3276
4.
1.6
5.351368
2.448632
5.
1.8
5.85212176
2.54787824
6.
2.0
6.370739847
(y
) 1 = 3 + 3x 1 − y P 1
= 3 + 3(1.6) − 5.351368
= 2.448632
For line 5, x 1 = 1.8
y P 1 = y 0 + h(y
) 0 = 5.351368 + 0.2(2.448632)
= 5.8410944
y C 1 = y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 5.351368 +
1
2 (0.2)[2.448632
+ (3 + 3(1.8) − 5.8410944)]
= 5.85212176
(y
) 1 = 3 + 3x 1 − y P 1
= 3 + 3(1.8) − 5.85212176
= 2.54787824
For line 6, x 1 = 2.0
y P 1 = y 0 + h(y
) 0
= 5.85212176 + 0.2(2.54787824)
= 6.361697408
y C 1 = y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 5.85212176 +
1
2 (0.2)[2.54787824
+ (3 + 3(2.0) − 6.361697408)]
= 6.370739843
Problem 6. Using the integrating factor
method the solution of the differential equation
d y
dx
= 3(1 + x) − y of Problem 5 is y = 3x + e 1 − x .
When x = 1.6, compare the accuracy, correct to 3
decimal places, of the Euler and the Euler-Cauchy
methods.
When x = 1.6, y = 3x + e 1−x = 3(1.6) + e 1−1.6 =
4.8 + e −0.6 = 5.348811636.
From Table 49.1, page 463, by Euler’s method, when
x = 1.6, y = 5.312
% error in the Euler method
=
5.348811636 − 5.312
5.348811636
× 100%
= 0.688%
y P 1 = y 0 + h(y
) 0 = 4 + 0.2(2) = 4.4
y C 1 = y 0 +
1
2 h[(y
) 0 + f (x 1 , y P 1 )]
= y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 4 +
1
2 (0.2)[2 + (3 + 3(1.2) − 4.4)]
= 4.42
(y
) 1 = 3 + 3x 1 − y P 1 = 3 + 3(1.2) − 4.42 = 2.18
Thus the first two lines of Table 49.11 have been
completed.
For line 3, x 1 = 1.4
y P 1 = y 0 + h(y
) 0 = 4.42 + 0.2(2.18) = 4.856
y C 1 = y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 4.42 +
1
2 (0.2)[2.18
+ (3 + 3(1.4) − 4.856)]
= 4.8724
(y
) 1 = 3 + 3x 1 − y P 1 = 3 + 3(1.4) − 4.8724
= 2.3276
For line 4, x 1 = 1.6
y P 1 = y 0 + h(y
) 0 = 4.8724 + 0.2(2.3276)
= 5.33792
y C 1 = y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 4.8724 +
1
2 (0.2)[2.3276
+ (3 + 3(1.6) − 5.33792)]
= 5.351368
Table 49.11
x 0
y 0
y
0
1.
1.0
4
2
2.
1.2
4.42
2.18
3.
1.4
4.8724
2.3276
4.
1.6
5.351368
2.448632
5.
1.8
5.85212176
2.54787824
6.
2.0
6.370739847
(y
) 1 = 3 + 3x 1 − y P 1
= 3 + 3(1.6) − 5.351368
= 2.448632
For line 5, x 1 = 1.8
y P 1 = y 0 + h(y
) 0 = 5.351368 + 0.2(2.448632)
= 5.8410944
y C 1 = y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 5.351368 +
1
2 (0.2)[2.448632
+ (3 + 3(1.8) − 5.8410944)]
= 5.85212176
(y
) 1 = 3 + 3x 1 − y P 1
= 3 + 3(1.8) − 5.85212176
= 2.54787824
For line 6, x 1 = 2.0
y P 1 = y 0 + h(y
) 0
= 5.85212176 + 0.2(2.54787824)
= 6.361697408
y C 1 = y 0 +
1
2 h[(y
) 0 + (3 + 3x 1 − y P 1 )]
= 5.85212176 +
1
2 (0.2)[2.54787824
+ (3 + 3(2.0) − 6.361697408)]
= 6.370739843
Problem 6. Using the integrating factor
method the solution of the differential equation
d y
dx
= 3(1 + x) − y of Problem 5 is y = 3x + e 1 − x .
When x = 1.6, compare the accuracy, correct to 3
decimal places, of the Euler and the Euler-Cauchy
methods.
When x = 1.6, y = 3x + e 1−x = 3(1.6) + e 1−1.6 =
4.8 + e −0.6 = 5.348811636.
From Table 49.1, page 463, by Euler’s method, when
x = 1.6, y = 5.312
% error in the Euler method
=
5.348811636 − 5.312
5.348811636
× 100%
= 0.688%
