Professional Documents
Culture Documents
159
160 Chapter 3
C y0 f x, y( x) dx x x0
(3.2)
y( x)
y ( x0 ) y ( M ) ( x0 ) (3.5)
y ( x0 ) y ( x0 )( x x0 ) ( x x0 )2 .. ( x x0 )M
2! M!
f f f f
f y ' f (3.6c)
x x y y x y x , y
0 0
f f f f
f f f
x x y y x y x , y
0 0
With
f f 2 f 2 f f f
f 2 f (3.7a)
x x y x0 , y0 x x y y x x , y
0 0
and
162 Chapter 3
f f 2 f 2 f f
2
f f (3.7b)
y x y x , y xy y 2 y
0 0 x0 , y0
we have
2 f 2 f
2
2 f f f f
2
from which
Approximation Methods for First Order Differential Equations 163
dy d ( xy )
y y(1 x 2 ) (3.11)
dx dx
and
y (1) y(1 x 2 ) x 1, y 1.64872 3.29744 (3.14b)
1
y(1.5) 1.64872 1.64872 1.5 1 3.29744 1.5 1 2.88526
2
2!
(3.15)
which differs from the exact value of 3.08022 by
approximately 6.33%. □
h xℓ 1 xℓ (3.16)
y ( x0 )
y ( x1 ) y( x0 ) y ( x0 )( x1 x0 ) ( x1 x0 )2 (3.17a)
2!
y (1)
y (1.25) y (1) y (1)( x 1) ( x 1)2
2!
(3.18)
1
1.64872 1.64872 1.25 1 3.29744 1.25 1 2.16395
2
2!
and
y f ( x, y ) (2.1b)
Approximation Methods for First Order Differential Equations 167
y N y0 w1 R1 w2 R2 ... wL RL (3.21)
With
168 Chapter 3
h xN x0 (3.22)
y ( xN ) ≃ y( x0 ) w1 R1 y( x0 ) hf ( x0 , y0 ) (3.23)
R1 hf ( x0 , y0 ) (3.24)
R1 hf x0 , y0 (3.26a)
and
R2 hf x0 h, y0 R1 (3.26b)
R1 hf ( x0 , y0 ) (3.26a)
and
R2 hf x0 12 h, y0 12 R1 (3.27)
y N y0 R2 (3.28)
R1 hf ( x0 , y0 ) (3.26a)
and
R2 hf x0 34 h, y0 34 R1 (3.29)
with
R1 hf ( x0 , y0 ) (3.26a)
R2 hf ( x0 12 h, y0 12 R1 ) (3.32a)
and
R3 hf x0 h, y0 R1 2 R2 (3.32b)
R1 hf ( x0 , y0 ) (3.26a)
Approximation Methods for First Order Differential Equations 171
R2 hf x0 12 h, y0 12 R1 (3.33a)
R3 hf x0 12 h, y0 12 R2 (3.33b)
and
R4 hf x0 h, y0 R3 (3.33c)
y xy (3.10a)
R2 h x0 12 h y0 12 R1 .5 1 12 .5 e1/ 2 12 0.82436 1.28806
(3.35b)
R3 h x0 12 h y0 12 R2 .5 1 12 .5 e1/ 2 12 1.28806 1.43297
(3.35c)
and
R4 h x0 h y0 R3 .5 1 .5 e1/ 2 1.43297 2.31127
(3.35d)
As before, we consider
y xy (3.10a)
R2 h( x0 12 h )( y0 21 R1 )
(3.37b)
.25 1 12 .25 e1/ 2 .25 .41218 0.52167
174 Chapter 3
R3 h( x0 12 h )( y0 12 R2 )
(3.37c)
.25 1 12 .25 e1/ 2 21 .52167 0.53706
and
R4 h( x0 h )( y0 R3 ) .25 1 .25 e1/ 2 .53706 0.68306
(3.37d)
from which
h
y (1.25) y0 R 2 R2 2R3 R4
6 1
.25
e1/ 2
6
.41218 2 .52167 2 .53706 .68306 2.18417
(3.38)
R2 h x1 12 h y1 12 R1
(3.39b)
.25 1.25 12 .25 2.18417 12 .68255 0.86812
R3 h x1 12 h y1 12 R2
(3.39c)
.25 1.25 12 .25 2.18417 12 .86812 0.90002
Approximation Methods for First Order Differential Equations 175
and
R4 h x1 h y1 R3
(3.39d)
.25 1.25 .25 2.18417 .90002 1.15657
Then
y (1.5) y1 16 R1 2 R2 2 R3 R4
2.18417 16 .68255 2 .86812 2 .90002 1.15657 3.08007
(3.40)
h2
yk 1 ≃ yk yk h y " ... (3.41)
2! k
yk 1 ≃ yk yk h (3.42a)
from which
yk 1 yk
yk (3.42b)
h
yk f ( xk , yk ) (3.43)
which we write as
Approximation Methods for First Order Differential Equations 177
yk 1 ≃ yk hf ( xk , yk ) (3.44b)
y1 ≃ y0 hf ( x0 , y0 ) (3.45a)
y2 ≃ y1 hf ( x1 , y1 ) (3.45b)
y3 ≃ y2 hf ( x2 , y2 ) (3.45c)
i
i
y N ≃ yN 1 hf ( xN 1 , y N 1 ) (3.45d)
y xy (3.10)
Then
y2 y (1.5) y1 hx1 y1 2.06090 0.25 1.25 2.06090 2.70493
(3.46b)
If we could integrate
y f ( x, y ) (2.1b)
f x, y( x ) dx
xk 1
yk 1 yk (3.47)
xk
f ( x, y ) x (3.48)
Figure 3.1
Area under a trapezoid
f x, y( x ) dx ≃ Atrapezoid hf k 12 h f k 1 f k 12 h f k f k 1
xk 1
xk
(3.49)
f x , y ( x ) dx ≃ x dx Atrapezoid
xk 1 xk 1
xk xk
(3.50)
f k xk (3.51a)
and
f k 1 xk 1 (3.51b)
from which
f k 1 f k f f
k 1 k (3.52a)
xk 1 xk h
and
f k xk 1 f k 1 xk f x f x
k k 1 k 1 k (3.52b)
xk 1 xk h
Approximation Methods for First Order Differential Equations 181
yk 1 yk 12 h f k f k 1 yk 12 h f ( xk , yk ) f ( xk 1 , yk 1 ) (3.53)
yk 1 y ( xk h) yk hyk yk hf k (3.54)
yk 1 ≃ yk 12 h f xk , yk f xk 1 , yk hf k (3.55)
We again consider
y xy (3.10)
182 Chapter 3
y1 y0 12 h f x0 , y0 f x1 , y0 hf0
y0 12 h x0 y0 x1 y0 hx0 y0 (3.56a)
e1/ 2 12 (.25) e1 / 2 1.25 e1/ 2 .25e1 / 2 2.17683
Then,
y2 y1 12 h x1 y1 x2 y1 hx1 y1
.25
2.17683 1.25 2.17683 1.5 2.17683 .25 1.25 2.17683
2
3.05266
(3.56b)
(3.184b)
Problems
Differential Initial Exact
equation condition Solution
I y 3x2 y y (1) e y( x) e x
3
II y xy y (1) e1/ 2 y( x) e x
2
/2
Approximation Methods for First Order Differential Equations 183
III y 3 x y y (1) e 2
3/2
y( x) e2 x
Table 3.7
Differential equations and their solutions
for problems 3 – 20, 25 – 29 and 32
y ' e xy with y ( 0) 1
Each of the problems below (3 through 26 and 28), will refer to one or more
of the differential equations in table 3.7 by Roman numeral. Since the exact
solution to each differential equation is given in the table, the reader should
determine the accuracy of the result in each problem in terms of a %Error as
defined in eq. 3.123.
5. For differential equation III, use a multi-step Taylor sum of order O(h2),
with h = 0.25, to estimate the value of y(1.75).
8. For differential equation II, find the approximate value of y(1.50) using
(a) a single step classical fourth order Runge-Kutta method
(b) a two step classical fourth order Runge-Kutta method
10. For differential equation III, find an approximate value of y(1.30) using
(a) a single step Euler finite difference approximation.
(b) a three step Euler finite difference approximation.
11. For differential equation IV, find an approximate value of y(1.50) using
(a) a single step improved Euler finite difference method.
(b) a two step improved Euler finite difference method.
12. For differential equation III, find an approximate value of y(1.30) using
(a) a single step improved Euler finite difference method.
(b) a two step improved Euler finite difference method.
13. For differential equation III, find an approximate value of y(1.30) using
(a) a two step Euler finite difference method.
(b) a two step improved Euler finite difference method.