Numerical methods for first order differential equations 469
yP 1 =y 0 +h(y′) 0 = 4 + 0. 2 ( 2 )= 4. 4yC 1 =y 0 +^12 h[(y′) 0 +f(x 1 ,yP 1 )]=y 0 +^12 h[(y′) 0 +( 3 + 3 x 1 −yP 1 )]= 4 +^12 ( 0. 2 )[2+( 3 + 3 ( 1. 2 )− 4. 4 )]=4.42(y′) 1 = 3 + 3 x 1 −yP 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
yP 1 =y 0 +h(y′) 0 = 4. 42 + 0. 2 ( 2. 18 )= 4. 856yC 1 =y 0 +^12 h[(y′) 0 +( 3 + 3 x 1 −yP 1 )]= 4. 42 +^12 ( 0. 2 )[2. 18+( 3 + 3 ( 1. 4 )− 4. 856 )]=4.8724(y′) 1 = 3 + 3 x 1 −yP 1 = 3 + 3 ( 1. 4 )− 4. 8724= 2. 3276For line 4,x 1 = 1. 6
yP 1 =y 0 +h(y′) 0 = 4. 8724 + 0. 2 ( 2. 3276 )= 5. 33792yC 1 =y 0 +^12 h[(y′) 0 +( 3 + 3 x 1 −yP 1 )]= 4. 8724 +^12 ( 0. 2 )[2. 3276+( 3 + 3 ( 1. 6 )− 5. 33792 )]=5.351368Table 49.11
x 0 y 0 y′ 0- 1.0 4 2
- 1.2 4.42 2.18
- 1.4 4.8724 2.3276
- 1.6 5.351368 2.448632
- 1.8 5.85212176 2.54787824
- 2.0 6.370739847
(y′) 1 = 3 + 3 x 1 −yP 1= 3 + 3 ( 1. 6 )− 5. 351368= 2. 448632For line 5,x 1 = 1. 8yP 1 =y 0 +h(y′) 0 = 5. 351368 + 0. 2 ( 2. 448632 )= 5. 8410944yC 1 =y 0 +^12 h[(y′) 0 +( 3 + 3 x 1 −yP 1 )]= 5. 351368 +^12 ( 0. 2 )[2. 448632+( 3 + 3 ( 1. 8 )− 5. 8410944 )]=5.85212176(y′) 1 = 3 + 3 x 1 −yP 1= 3 + 3 ( 1. 8 )− 5. 85212176= 2. 54787824For line 6,x 1 = 2. 0yP 1 =y 0 +h(y′) 0= 5. 85212176 + 0. 2 ( 2. 54787824 )= 6. 361697408yC 1 =y 0 + 21 h[(y′) 0 +( 3 + 3 x 1 −yP 1 )]= 5. 85212176 +^12 ( 0. 2 )[2. 54787824+( 3 + 3 ( 2. 0 )− 6. 361697408 )]=6.370739843Problem 6. Using the integrating factor
method the solution of the differential equation
dy
dx= 3 ( 1 +x)−yof Problem 5 isy= 3 x+e^1 −x.
Whenx= 1 .6, compare the accuracy, correct to 3
decimal places, of the Euler and the Euler-Cauchy
methods.When x= 1 .6, y= 3 x+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%