NUMERICAL METHODS FOR FIRST ORDER DIFFERENTIAL EQUATIONS 467I
% error with Euler-Cauchy method
=(
2. 649858808 − 2. 649232625
2. 649858808)
×100%=0.0236%This calculation and the others listed in Table 49.10
show the Euler-Cauchy method to be more accurate
than the Euler method.
Table 49.10x Error in Error in
Euler method Euler-Cauchy method00 0
0.1 0.234% 0.00775%
0.2 0.472% 0.0156%
0.3 0.712% 0.0236%
0.4 0.959% 0.0319%
0.5 1.214% 0.0405%Problem 5. Obtain a numerical solution of the
differential equation
dy
dx=3(1+x)−yin the range 1.0(0.2)2.0, using the Euler-Cauchy
method, given the initial conditions thatx= 1
wheny=4.This is the same as Problem 1 on page 461, and a
comparison of values may be made.
dy
dx=y′=3(1+x)−y i.e.y′= 3 + 3 x−yx 0 = 1 .0,y 0 =4 andh= 0. 2(y′) 0 = 3 + 3 x 0 −y 0 = 3 +3(1.0)− 4 = 2x 1 = 1 .2 and from equation (3),
yP 1 =y 0 +h(y′) 0 = 4 + 0 .2(2)= 4. 4
yC 1 =y 0 + 21 h[(y′) 0 +f(x 1 ,yP 1 )]=y 0 + 21 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.
Table 49.11x 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
For line 3,x 1 = 1. 4yP 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. 6yP 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.351368(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. 54787824