Higher Engineering Mathematics

(Greg DeLong) #1
470 DIFFERENTIAL EQUATIONS

6.yn+ 1 =yn+


h
6

{k 1 + 2 k 2 + 2 k 3 +k 4 }and when
n=0:

y 1 =y 0 +

h
6

{k 1 + 2 k 2 + 2 k 3 +k 4 }

= 2 +

0. 1
6

{ 2 +2(2.05)+2(2.0525)

+ 2. 10525 }

= 2 +

0. 1
6

{ 12. 31025 }=2.205171

A table of values may be constructed as shown in
Table 49.15. The working has been shown for the
first two rows.


Letn=1 to determiney 2 :


  1. k 1 =f(x 1 ,y 1 )=f(0.1, 2.205171); since


dy
dx

=y−x,f(0.1, 2.205171)

= 2. 205171 − 0. 1 =2.105171

3.k 2 =f


(
x 1 +

h
2

,y 1 +

h
2

k 1

)

=f

(
0. 1 +

0. 1
2

,2. 205171 +

0. 1
2

(2.105171)

)

=f(0.15, 2.31042955)
= 2. 31042955 − 0. 15 =2.160430

4.k 3 =f


(
x 1 +

h
2

,y 1 +

h
2

k 2

)

=f

(
0. 1 +

0. 1
2

,2. 205171 +

0. 1
2

(2.160430)

)

=f( 0 .15, 2. 3131925 )= 2. 3131925 − 0. 15
=2.163193

Table 49.15

n xn k 1 k 2 k 3 k 4 yn
0 0 2
1 0.1 2.0 2.05 2.0525 2.10525 2.205171
2 0.2 2.105171 2.160430 2.163193 2.221490 2.421403
3 0.3 2.221403 2.282473 2.285527 2.349956 2.649859
4 0.4 2.349859 2.417339 2.420726 2.491932 2.891824
5 0.5 2.491824 2.566415 2.570145 2.648838 3.148720

5.k 4 =f(x 1 +h,y 1 +hk 3 )

=f(0. 1 + 0 .1, 2. 205171 + 0 .1(2.163193))

=f(0.2, 2.421490)

= 2. 421490 − 0. 2 =2.221490

6 .yn+ 1 =yn+

h
6

{k 1 + 2 k 2 + 2 k 3 +k 4 }

and whenn=1:

y 2 =y 1 +

h
6

{k 1 + 2 k 2 + 2 k 3 +k 4 }

= 2. 205171 +

0. 1
6

{ 2. 105171 +2(2.160430)

+2(2.163193)+ 2. 221490 }

= 2. 205171 +

0. 1
6

{ 12. 973907 }=2.421403

This completes the third row of Table 49.15. In a
similar mannery 3 ,y 4 andy 5 can be calculated and
the results are as shown in Table 49.15. Such a table
is best produced by using aspreadsheet, such as
Microsoft Excel.
This problem is the same as problem 3, page 463
which used Euler’s method, and problem 4, page 465
which used the improved Euler’s method, and a com-
parison of results can be made.

The differential equation

dy
dx

=y−xmay be solved
analytically using the integrating factor method of
chapter 48, with the solution:

y=x+ 1 +ex

Substituting values ofxof 0, 0.1, 0.2,..., 0.5 will
give the exact values. A comparison of the results
obtained by Euler’s method, the Euler-Cauchy
method and the Runga-Kutta method, together with
the exact values is shown in Table 49.16 below.
Free download pdf