Initial Value Problems For ODEs

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 38

Syllabus: Euler’s method, Runge-Kutta method, Predictor-Corrector method and Finite Difference method.

Although there are a lot of different numerical techniques to solve ordinary differential equations, we can
divide them, in general into two sub categories, namely single-step method and multi-step method.
Single-step method: When a numerical technique requires only the value of y i to compute the next value
y i+1 , i=0 , 1 ,2 , … for solving a differential equation then it is termed as a single-step method. Euler’s
method and Runge-Kutta method are all fall into this category.
Multi-step method: If a method requires not only y i but also at least one of the past values y i−1 , y i−2 , …
etc. then it is called a multi-step method. Finite difference method, Adam-Bashforth’s Predictor-Corrector
formula and Milne’s Predictor-Corrector formula are all multi-step methods.

 Establish Euler’s method.

Let us consider the differential equation

dy
=f ( x , y) with initial condition y 0= y( x0 ). (1)
dx
Let y=∅ ( x) be the solution of (1). (2)
Let ( x 0 , y 0 ) , ( x 1 , y 1 ) , … , ( x n , y n ) , ( x n+1 , y n +1 ) , … be the points on the curve of (2) where
x 0 , x 1 ,… , x n , x n +1 , … are equidistant at equal interval h .
∴ y n+1=∅ ( x n+1 ) =∅ ( xn +h )
Numerical h2 ' Ordinary Differential Equations
¿ ∅ ( x n )+ h ∅Solution
( x n ) + ∅ 'of M(CS)-301/401
'
( x n ) +… (3)
2!
≈ ∅ ( x n ) +h ∅ ' ( x n ) , assuming h as a very small quantity.
¿ y n +h y ' ( x n )
¿ y n +hf ( x n , y n ) (4)
This iterative formula is known as Euler’s formula.
Now putting n=0 , 1, 2 , … we get
y 1 ≈ y 0+ hf ( x 0 , y 0 )
y 2 ≈ y1 +hf ( x 1 , y 1 )
…..
…..
This method is also called Runge-Kutta method of order one.
h2 ' '
Error in Euler’s method: In equation (3), we have neglected ∅ ( x n ) and higher powers of h . Hence
2!
the error (truncation error), committed in Euler’s method is of order of h2 , i.e. O(h 2).

 Explain the geometrical interpretation of Euler’s method.


dy
Let y=ϕ( x) be the solution of the equation =f ( x , y) with initial condition y n= y( xn ). The graph of
dx
this solution is shown in Fig. 5.1 as the curve PQ. The ordinate of P, i.e., y n is known.

79
Now we want to find the ordinate y n+ 1. Since a very small portion of a smooth curve can be considered as
a line segment, so we can write
y n+1− y n dy
h
=tan α =
dx ( ) xn , yn
=f ( x n , y n )

Therefore, we get
y n+ 1= y n +hf ( x n , y n ) which is the recursion formula for Euler’s method. Clearly, here the error is TQ.
Note: Although Euler’s method is very simple for implementation, it has some disadvantages.
(i) If h is not very small, the method yields erroneous result.
(ii) If h is very small then the method becomes very slow to get a result up to a desired degree of
accuracy.

Following examples are given to illustrate this method.

Numerical dy
Example 1. Given
Solution
=
y −x of Ordinary Differential Equations M(CS)-301/401
with initial condition y=1 at x=0 , find y for x=0.1 by Euler’s method,
dx y+ x
correct up to 4 decimal places, taking step length h=0.02. [WBUT 2004, 2007]

dy y −x
Solution: We are given = , y ( 0 )=1 and h=0.02 .
dx y+ x

y−x
Let f ( x , y )= , x =0 so that y 0= y ( x 0 ) =1.
y+x 0

Euler’s formula is given by y n+ 1 ≈ y n +hf ( x n , y n ) , n=0 ,1 , 2 , …

The calculations for y ( 0.1 ) are given in the following table:

n xn yn y n−x n y n+ 1 ≈ y n +hf ( x n , y n )
f ( x n , y n )=
yn + xn
1−0
0 0 1 =1 1+0.02×1=1.02
1+0
1.02−0.02
1 0.02 1.02 =0.961538 1.02+0.02×0.961538=1.039231
1.02+0.02
1.039231−0.04
2 0.04 1.039231 =0.925873 1.039231+0.02×0.925873=1.057748
1.039231+ 0.04

80
1.057748−0.06
3 0.06 1.057748 =0.892641 1.057748+0.02×0.892641=1.075601
1.057748+0.06
1.075601−0.08
4 0.08 1.075601 =0.861544 1.075601+0.02×0.861544=1.092832
1.075601+ 0.08
5 0.1 1.092832 −¿ −¿

Therefore, y (0.1) ≈1.092832 ≈ 1.0928, correct up to 4 decimal places.

Example 2. Solve by using Euler’s method the following differential equation for x=1, taking h=0.2;
dy
=xy , y =1 when x=0 . [WBUT 2009]
dx

dy
Solution: Here, =xy , y ( 0 ) =1 and h=0.2 .
dx

Let f ( x , y )=xy , x 0=0 so that y 0= y ( x 0 ) =1.

Euler’s formula is given by y n+ 1 ≈ y n +hf ( x n , y n ) , n=0 ,1 , 2 , …

The calculations for y ( 1 ) are given in the following table:

n xn yn f ( x n , y n )=x n y n y n+ 1 ≈ y n +hf ( x n , y n )
0 Numerical
0 1 Solution of Ordinary
0×1=0 Differential Equations
1+0.2×0=1 M(CS)-301/401
1 0.2 1 0.2×1=0.2 1+0.2×0.2=1.04
2 0.4 1.04 0.4×1.04=0.416 1.04+0.2×0.416=1.1232
3 0.6 1.1232 0.6×1.1232=0.67392 1.1232+0.2×0.67392=1.257984
4 0.8 1.257984 0.8×1.257984=1.00639 1.257984+0.2×1.00639=1.45926
5 1.0 1.45926 −¿ −¿

Hence, y (1)≈ 1.45926 (approx.).

dy 1
Example 3. Using Euler’s method evaluate y (2), correct up to three decimal places from = (x + y )
dx 2
with y (0)=2 taking h=0.5. [WBUT 2007]

dy 1
Solution: Given that = ( x+ y ) , y ( 0 )=2 , h=0.5.
dx 2

1
Let f ( x , y )= ( x+ y ) , x 0=0 so that y 0= y ( x 0 ) =2.
2

Euler’s formula is given by y n+ 1 ≈ y n +hf ( x n , y n ) , n=0 ,1 , 2 , …

The calculations for y ( 2 ) are given in the following table:

81
n xn yn 1 y n+ 1 ≈ y n +hf ( x n , y n )
f ( x n , y n )= ( x n + y n )
2
0 0 2 (0+2)/2=1 2+0.5×1=2.5
1 0.5 2.5 (0.5+2.5)/2=1.5 2.5+0.5×1.5=3.25
2 1.0 3.25 (1.0+3.25)/2=2.125 3.25+0.5×2.125=4.3125
3 1.5 4.3125 (1.5+4.3125)/2=2.90625 4.3125+0.5×2.90625=5.765625
4 2.0 5.765625 −¿ −¿

So, y (2)≈ 5.765625 ≈ 5.766, correct up to 3 decimal places.

 Runge-Kutta method of order four


This formula is the most commonly used in practice and is given by
1
y n+ 1 ≈ y n + ( k 1+ 2k 2+ 2k 3+ k 4 ) , n=0 , 1, 2 , …
6
Where k 1=hf ( x n , y n ), k 2=hf ( x n+ h/2 , y n + k 1 /2 ), k 3=hf ( x n+ h/2 , y n + k 2 /2 ) and
k 4=hf ( x n +h , y n +k 3 ) .

Error in fourth order Runge-Kutta method: The truncation error in Runge-Kutta 4th order method is
O(h5 ).

A few examples are provided below to illustrate the applications of 4 th order Runge-Kutta method.

Numerical
Example Solution ofmethod
4. Use Runge-Kutta Ordinary Differential
of order Equations
4 to calculate M(CS)-301/401
y(0.2) and y(0.4) for the equation ;
dy
=−xy , y ( 0 ) =1. [WBUT
dx
2003]

dy
Solution: Given that =−xy , y ( 0 ) =1. Let f ( x , y )=−xy , x 0 =0 so that y 0= y ( x 0 ) =1. Let us assume
dx
that h=0.2.

Now 4th order Runge-Kutta method is given by

1
y n+ 1 ≈ y n + ( k 1+ 2k 2+ 2k 3+ k 4 ) , n=0 , 1, 2 , …
6

Where k 1=hf ( x n , y n ), k 2=hf ( x n+ h/2 , y n + k 1 /2 ), k 3=hf ( x n+ h/2 , y n + k 2 /2 ) and


k 4=hf ( x n +h , y n +k 3 ) .

The solution technique is as follows:

Calculation for n=0:

k 1=hf ( x 0 , y 0 ) =0.2× (−0 ×1 )=0

82
k 2=hf ( x 0+ h/2 , y 0 + k 1 /2 )=0.2 ׿ 0.2/2¿ ׿ 0/2¿ ¿=−0.02

k 3=hf ( x 0+ h/2 , y 0 + k 2 /2 )=0.2 ׿ 0.2/2¿ ׿ 0.02/2¿ ¿=−0.0198

k 4=hf ( x 0 +h , y 0 +k 3 ) =0.2 ׿0.2¿ ׿ 0.0198¿ ¿=−0.039208

1
Therefore, y 1 ≈ y 0+ ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 1+ ( 0+ 2× (−0.02 ) +2× (−0.0198 )−0.039208 )
6

¿ 0.98019867 ≈ 0.9802, correct up to 4 decimal places.

Therefore, y (0.2) ≈ 0.9802.

Calculation for n=1:

k 1=hf ( x 1 , y 1 )=0.2 × (−0.2× 0.9802 )=−0.03921

k 2=hf ( x 1+ h/2, y 1 +k 1 /2 ) =0.2× ¿0.2/2¿ ׿ /2¿ ¿=−0.05764

k 3=hf ( x 1+ h/2 , y 1 +k 2 /2 ) =0.2 ׿0.2/2¿ ׿ 0.05764/2¿ ¿=−0.05708


Numerical Solution of Ordinary Differential Equations M(CS)-301/401
k 4=hf ( x 1 +h , y 1+ k 3 )=0.2× ¿0.2¿ ׿ 0.05708¿ ¿=−0.07385

1
Therefore, y 2 ≈ y1 + ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 0.9802+ (−0.03921+ 2× (−0.05764 ) +2 × (−0.05708 )−0.07385 )
6

¿ 0.923114 ≈ 0.9231, correct up to 4 decimal places.

Therefore, y (0.4 )≈ 0.9231 .

dy
Example 5. Solve initial value problem 10 = x2 + y 2 , y ( 0 )=1 for x=0.1 , 0.2 by using Runge-Kutta
dx
fourth order method and find the solution correct up to 4 places of decimal. [WBUT 2004]

dy
Solution: Given that 10 = x2 + y 2 , y ( 0 )=1 ,h=0.1.
dx

Let f ( x , y )=( x 2 + y 2 )/10 , x 0=0 so that y 0= y ( x 0 ) =1.

Now 4th order Runge-Kutta method is given by

83
1
y n+ 1 ≈ y n + ( k 1+ 2k 2+ 2k 3+ k 4 ) , n=0 , 1, 2 , …
6

Where k 1=hf ( x n , y n ), k 2=hf ( x n+ h/2 , y n + k 1 /2 ), k 3=hf ( x n+ h/2 , y n + k 2 /2 ) and


k 4=hf ( x n +h , y n +k 3 ) .

The solution technique is given below:

Calculation for n=0:

k 1=hf ( x 0 , y 0 ) =0.1×[ ( 02 +12 ) /10]=0.01

k 2=hf ( x 0+ h/2 , y 0 + k 1 / 2 )=0.1 ×[ ( 0.052+ 1.0052 ) /10]=0.010125

2 2
k 3=hf ( x 0+ h/2 , y 0 + k 2 /2 )=0.1 ×[( 0.05 +1.0050625 ) /10]=0.0101265

k 4=hf ( x 0 +h , y 0 +k 3 ) =0.1 ×[( 0.012 +1.01012652 ) /10]=0.01030356

1
Therefore, y 1 ≈ y 0+ ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 1+ ( 0.01+2 ×0.010125+2 ×0.0101265+ 0.01030356 )
6Numerical Solution of Ordinary Differential Equations M(CS)-301/401
¿ 1.0101344 ≈ 1.0101, correct up to 4 decimal places.

Therefore, y (0.1) ≈1.0101 .

Calculation for n=1:

k 1=hf ( x 1 , y 1 )=0.1 ×[ ( 0.12+ 1.01012 ) /10]=0.01030372

k 2=hf ( x 1+ h/2, y 1 +k 1 /2 ) =0.1×[ ( 0.152 +1.0152862 ) /10]=0.010533

k 3=hf ( x 1+ h/2 , y 1 +k 2 /2 ) =0.1 ×[( 0.15 2+1.01540092 ) /10]=0.010535

k 4=hf ( x 1 +h , y 1+ k 3 )=0.1×[ ( 0.22 +1.0206692 ) /10]=0.010818

1
Therefore, y 2 ≈ y1 + ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 1.0101+ ( 0.01030372+2× 0.010533+2 ×0.010535+0.010818 )
6

¿ 1.0206009 ≈1.0206 , correct up to 4 decimal places.

84
Therefore, y (0.2) ≈1.0206 .

Example 6. Find y (1.1) using Runge-Kutta method of the fourth order, given that
dy
= y 2+ xy , y ( 1 )=1 and h=0.1.
dx
[WBUT 2005]

dy
Solution: Given that = y 2+ xy , y ( 1 )=1 , h=0.1.
dx

Let f ( x , y )= y 2 + xy , x 0=1 so that y 0= y ( x 0 ) =1.

Now 4th order Runge-Kutta method is given by

1
y n+ 1 ≈ y n + ( k 1+ 2k 2+ 2k 3+ k 4 ) , n=0 , 1, 2 , …
6

Where k 1=hf ( x n , y n ), k 2=hf ( x n+ h/2 , y n + k 1 /2 ), k 3=hf ( x n+ h/2 , y n + k 2 /2 ) and


k 4=hf ( x n +h , y n +k 3 ) .

Therefore, for n=0,

k 1=hf ( x 0 , y 0 ) =0.1× ( 12+ 1×1 )=0.2


Numerical Solution of Ordinary Differential Equations M(CS)-301/401
k 2=hf ( x 0+ h/2 , y 0 + k 1 / 2 )=0.1 × ( 1.12 +1.05 ×1.1 ) =0.2365

k 3=hf ( x 0+ h/2 , y 0 + k 2 /2 )=0.1 × ( 1.11825 2 +1.05× 1.11825 ) =0.24246

k 4=hf ( x 0 +h , y 0 +k 3 ) =0.1 × ( 1.242462 +1.1 ×1.24246 ) =0.29104

1
Therefore, y 1 ≈ y 0+ ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 1+ ( 0.2+2 ×0.2365+2 × 0.24246+0.29104 )
6

¿ 1.241493 ≈ 1.2415, correct up to 4 decimal places.

Therefore, y (1.1)≈ 1.2415 .

 Predictor-Corrector method
In this method we require two formulae, namely a Predictor formula and a Corrector formula.
The predictor formula is used to predict the value y i+1 using some given set of values y i , y i−1 , y i−2 , …

85
Then we use the corrector formula to improve the value y i+1 , obtained by predictor formula. In this
context two well-known formulae are discussed:
Milne’s Predictor Corrector Formula
4
Predictor formula: y n+ 1 ≈ y n−3 + h(2 y 'n−2− y 'n−1 +2 y 'n)
3
1 ' ' '
Corrector formula: y n+ 1 ≈ y n−1 + h( y n +1+ 4 y n + y n−1 )
3
Adam-Bashforth-Moulton Predictor Corrector Formula
1
Adam-Bashforth Predictor formula: y n+ 1 ≈ y n + h(55 y 'n−59 y 'n−1+ 37 y 'n−2−9 y 'n−3)
24

1
Adam -Moulton Corrector formula: y n+ 1 ≈ y n + h(9 y 'n+1 +19 y 'n−5 y 'n−1 + y 'n−2)
24

The above things will be clear with the following examples.

dy
Example 7. Given that =1+ xy , y ( 0 )=2, y ( 0.1 )=2.1103 , y ( 0.2 )=2.2430 , y ( 0.3 )=2.4011, find
dx
y (0.4 ) by Milne’s predictor-corrector method.

dy
Solution: Given =1+ xy , i.e. y ' =1+ xy (1)
dx

Let xNumerical Solution of Ordinary Differential Equations M(CS)-301/401


0=0 , x 1=0.1 , x 2=0.2, x 3=0.3 so that y 0=2 , y 1=2.1103 , y 2=2.2430, y 3=2.4011 and let
h=0.1.

Now Milne’s predictor formula is given by

4
y n+ 1 ≈ y n−3 + h(2 y 'n−2− y 'n−1 +2 y 'n) (2)
3

Putting n=3 in (2), we get

4
y 4 ≈ y 0 + h(2 y '1− y '2 +2 y '3) (3)
3

Now, from (1) we get

y '1=1+ x 1 y 1 =1+ 0.1× 2.1103=1.21103

y '2=1+ x 2 y2 =1+ 0.2× 2.2430=1.4486

y '3=1+ x 3 y 3=1+0.3 ×2.4011=1.72033

Therefore, using these in (3), the predicted value of y 4 is

86
4
y 4 ≈ y 0 + h ( 2 y '1− y '2 +2 y '3 )
3

4 × 0.1
¿ 2+ ( 2× 1.21103−1.4486+2× 1.72033 )
3

¿ 2.5885

Now, Milne’s corrector formula is

1
y n+ 1 ≈ y n−1 + h( y 'n +1+ 4 y 'n + y 'n−1 ) (4)
3

Putting n=3 in (4), we get

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 ) (5)
3

From (1), we have y '4 =1+ x 4 y 4=1+0.4 ×2.5885=2.0354

Therefore, from (5), we get the corrected value of y 4 as

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 )
3
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
0.1
¿ 2.2430+ (1.4486 +4 × 1.72033+2.0354)
3

¿ 2.5885

Hence the required value of y (0.4 ) is 2.5885.

dy
Example 8. Compute y (0.4 ) by Milne’s predictor-corrector method from the equation = y 2+ xy,
dx
given that y ( 0 )=1 , y ( 0.1 )=1.1169 , y ( 0.2 )=1.2773 , y ( 0.3 ) =1.5040.

dy
Solution: Given = y 2+ xy , i.e. y ' = y 2 + xy (1)
dx

Let x 0=0 , x 1=0.1 , x 2=0.2, x 3=0.3 so that y 0=1 , y 1=1.1169 , y 2=1.2773 , y 3=1.5040 and let
h=0.1.

Now Milne’s predictor formula is given by

4
y n+ 1 ≈ y n−3 + h(2 y 'n−2− y 'n−1 +2 y 'n) (2)
3

87
Putting n=3 in (2), we get

4
y 4 ≈ y 0 + h(2 y '1− y '2 +2 y '3) (3)
3

Now, from (1) we get

y '1= y 12 + x 1 y 1=(1.1169)2+ 0.1× 1.1169=1.3591

y '2= y 22 + x 2 y 2=(1.2773)2+ 0.2×1.2773=1.8869

y '3= y 32 + x 3 y 3 =(1.5040)2 +0.3 ×1.5040=2.7132

Therefore, using these in (3), the predicted value of y 4 is

4
y 4 ≈ y 0 + h ( 2 y '1− y '2 +2 y '3 )
3

4 × 0.1
¿ 1+ ( 2× 1.3591−1.8869+2 ×2.7132 )
3

¿ 1.8344

Now, Milne’s corrector formula is


Numerical Solution of Ordinary Differential Equations M(CS)-301/401
1
y n+ 1 ≈ y n−1 + h( y 'n +1+ 4 y 'n + y 'n−1 ) (4)
3

Putting n=3 in (4), we get

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 ) (5)
3

From (1), we have y '4 = y 42 + x 4 y 4 =(1.8344)2 +0.4 × 2.5885=4.0988

Therefore, from (5), we get the corrected value of y 4 as

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 )
3

0.1
¿ 1.2773+ ( 4.0988+4 ×2.7132+1.8869)
3

¿ 1.8386 ≈ 1.839, correct to 3 decimal places.

Hence the required value of y (0.4 ) is 1.839.

88
dy
Example 9. Compute y (0.4 ) by Milne’s predictor-corrector method from the equation =4 y , given
dx
that y ( 0 )=1 , y ( 0.1 )=1.492 , y ( 0.2 )=2.226 , y ( 0.3 )=3.320

dy
Solution: Given =4 y , i.e. y ' =4 y (1)
dx

Let x 0=0 , x 1=0.1 , x 2=0.2, x 3=0.3 so that y 0=1 , y 1=1.492 , y 2=2.226 , y 3=3.320 and let h=0.1.

Now Milne’s predictor formula is given by

4
y n+ 1 ≈ y n−3 + h(2 y 'n−2− y 'n−1 +2 y 'n) (2)
3

Putting n=3 in (2), we get

4
y 4 ≈ y 0 + h(2 y '1− y '2 +2 y '3) (3)
3

Now, from (1) we get

y '1=4 y 1=4 ×1.492=5.968

y '2=4 y 2=4 ×2.226=8.904


Numerical Solution of Ordinary Differential Equations M(CS)-301/401
'
y =4 y 3=4 ×3.320=13.28
3

Therefore, using these in (3), the predicted value of y 4 is

4
y 4 ≈ y 0 + h ( 2 y '1− y '2 +2 y '3 )
3

4 × 0.1
¿ 1+ ( 2× 5.968−8.904 +2 ×13.28 )
3

¿ 4.9456

Now, Milne’s corrector formula is

1
y n+ 1 ≈ y n−1 + h( y 'n +1+ 4 y 'n + y 'n−1 ) (4)
3

Putting n=3 in (4), we get

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 ) (5)
3

From (1), we have y '4 =4 y 4=4 × 4.9456=19.7824

89
Therefore, from (5), we get the corrected value of y 4 as

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 )
3

0.1
¿ 2.226+ (19.7824+ 4 ×13.28+8.904)
3

¿ 4.95288 ≈ 4.953, correct to 3 decimal places.

Hence the required value of y (0.4 ) is 4.953

dy
Example 10. Given that =1+ xy , y ( 0 )=2, y ( 0.1 )=2.1103 , y ( 0.2 )=2.2430 , y ( 0.3 )=2.4011, find
dx
y (0.4 ) by Adam-Bashforth-Moulton predictor-corrector method.

dy
Solution: Given =1+ xy , i.e. y ' =1+ xy (1)
dx

Let x 0=0 , x 1=0.1 , x 2=0.2, x 3=0.3 so that y 0=2 , y 1=2.1103 , y 2=2.2430, y 3=2.4011 and let
h=0.1.

Now Adam-Bashforth’s predictor formula is given by


Numerical
1 Solution
' '
of Ordinary
'
Differential
'
Equations M(CS)-301/401
y n+ 1 ≈ y n + h(55 y n−59 y n−1+ 37 y n−2−9 y n−3) (2)
24

Putting n=3 in (2), we get

1
y4 ≈ y3 + h(55 y '3−59 y '2+ 37 y '1−9 y '0) (3)
24

Now, from (1) we get

y '0=1+ x 0 y 0=1+0 ×2=1

y '1=1+ x 1 y 1 =1+ 0.1× 2.1103=1.21103

y '2=1+ x 2 y2 =1+ 0.2× 2.2430=1.4486

y '3=1+ x 3 y 3=1+0.3 ×2.4011=1.72033

Therefore, using these in (3), the predicted value of y 4 is

1
y4 ≈ y3 + h(55 y '3−59 y '2+ 37 y '1−9 y '0)
24

90
0.1
¿ 2.4011+ (55× 1.72033−59 ×1.4486+ 37× 1.21103−9 ×1)
24

¿ 2.5884

Now, Adam-Moulton corrector formula is

1
y n+ 1 ≈ y n + h(9 y 'n+1 +19 y 'n−5 y 'n−1 + y 'n−2) (4)
24

Putting n=3 in (4), we get

1
y4 ≈ y3 + h(9 y '4 +19 y '3−5 y '2 + y '1) (5)
24

From (1), we have y '4 =1+ x 4 y 4=1+0.4 ×2.5884=2.03536

Therefore, from (5), we get the corrected value of y 4 as

1
y4 ≈ y3 + h(9 y '4 +19 y '3−5 y '2 + y '1)
24

0.1
¿ 2.4011+ (9 ×2.03536+19 ×1.72033−5 ×1.4486+1.21103)
24
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
¿ 2.58848558 ≈ 2.5885, correct to 4 decimal places.

Hence the required value of y (0.4 ) is 2.5885.

dy 1
Example 11. Given that = xy , y ( 0 )=1 , y ( 0.1 )=1.01 , y ( 0.2 )=1.022 , y ( 0.3 )=1.023, find
dx 2
y (0.4 ) by Adam-Bashforth-Moulton predictor-corrector method.

dy 1 1
Solution: Given = xy , i.e. y ' = xy (1)
dx 2 2

Let x 0=0 , x 1=0.1 , x 2=0.2, x 3=0.3 so that y 0=1 , y 1=1.01 , y 2=1.022, y 3=1.023 and let h=0.1.

Now Adam-Bashforth’s predictor formula is given by

1
y n+ 1 ≈ y n + h(55 y 'n−59 y 'n−1+ 37 y 'n−2−9 y 'n−3) (2)
24

Putting n=3 in (2), we get

1
y4 ≈ y3 + h(55 y '3−59 y '2+ 37 y '1−9 y '0) (3)
24

91
Now, from (1) we get

1 1
y '0= x 0 y 0= ×(0 ×1)=0
2 2

1 1
y '1= x 1 y 1= ×(0.1 ×1.01)=0.0505
2 2

1 1
y '2= x 2 y 2 = ×(0.2 ×1.022)=0.1022
2 2

1 1
y '3= x 3 y3 = ×(0.3× 1.023)=0.1535
2 2

Therefore, using these in (3), the predicted value of y 4 is

1
y4 ≈ y3 + h(55 y '3−59 y '2+ 37 y '1−9 y '0)
24

0.1
¿ 1.023+ (55 × 0.1535−59 ×0.1022+37 × 0.0505−9 × 0)
24

¿ 1.0408

Now, Numerical Solution


Adam-Moulton corrector of Ordinary
formula is Differential Equations M(CS)-301/401
1
y n+ 1 ≈ y n + h(9 y 'n+1 +19 y 'n−5 y 'n−1 + y 'n−2) (4)
24

Putting n=3 in (4), we get

1
y4 ≈ y3 + h(9 y '4 +19 y '3−5 y '2 + y '1) (5)
24

' 1 1
From (1), we have y 4 = x 4 y 4= ×(0.4 × 1.0408)=0.2082
2 2

Therefore, from (5), we get the corrected value of y 4 as

1
y4 ≈ y3 + h(9 y '4 +19 y '3−5 y '2 + y '1)
24

0.1
¿ 1.023+ ( 9× 0.2082+19 ×0.1535−5× 0.1022+0.0505)
24

¿ 1.04104083 ≈1.041 , correct to 3 decimal places.

Hence the required value of y (0.4 ) is 1.041.

92
 Finite Difference Method
This method is very much useful to solve 1 st order as well as 2nd order ordinary differential
equations with specified boundary values. In this method the derivatives are replaced by the finite
difference relations as described below:
' h2 ' ' h3 ' ' '
y ( x n+ h )= y ( x n ) +h y ( x n) + y ( xn ) + y ( x n ) +… (1)
2! 3!
and
' h2 ' ' h3 '' '
y ( x n−h ) = y ( x n )−h y ( x n ) + y ( x n ) − y ( x n ) + … (2)
2! 3!
Adding (1) and (2), we get
h2 ' ' 4
y ( x n+ h ) + y ( x n−h ) =2 y ( x n ) +2. y ( x n ) +O(h ) (3)
2!
Assuming h as a small quantity and ignoring the terms involving h 4 and higher powers of h , we get from
(3)
y ( x n+ h ) + y ( x n−h ) ≈ 2 y ( xn ) + h2 y ' ' ( x n )
''
y ( x n+ h )−2 y ( x n ) + y ( x n −h )
⟹ y ( xn )≈
h2
'' y n+1−2 y n + y n−1
i.e. y n ≈
h2
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
(4)
Similarly, subtracting (2) from (1), we get
y ( x n+ h )− y ( x n−h )=2 h y ' ( x n ) +O(h3) (5)
3
Neglecting the terms involving h and higher powers of h , provided h is a small quantity, we get from (5)
y ( x n+ h )− y ( x n−h ) ≈ 2 y ' ( x n)
'
y ( x n +h ) − y ( xn −h )
⟹ y ( xn) ≈
2h

' y n +1− y n−1


i.e. yn ≈
2h
(6)

The method is best understood by the examples given below.

Example 12. Using finite difference method solve the boundary value problem
d2 y
+ y=0 , y ( 0 )=0 , y ( 1 )=1, taking h=0.25.
d x2

d2 y
Solution: Given that 2
+ y=0 , i.e., y ' ' =− y ; y ( 0 )=0 , y ( 1 )=1 and h=0.25.
dx

93
Let x 0=0 so that x 1=0.25 , x 2=0.5 , x 3=0.75 , x 4 =1.0 and y 0=0 , y 4=1.

'' y n+1−2 y n + y n−1


Now we replace y ' ' by the relation y n ≈ and get
h2

y n+1−2 y n + y n−1
=− y n
h2

Putting h=0.25, we get

y n+ 1−1.9375 y n+ y n−1 =0 (1)

Putting n=¿1, 2 and 3 we get

y 2−1.9375 y 1 + y 0=0

y 3−1.9375 y 2 + y 1=0

y 4 −1.9375 y 3+ y 2=0

Using the boundary conditions y 0=0 and y 4 =1, we have

y 2=1.9375 y 1 (2)
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
y 3−1.9375 y 2 + y 1=0 (3)

1−1.9375 y 3 + y 2=0 (4)

From (2) and (3), we get

y 3=2.75391 y 1 (5)

Using (2) and (5) in (4), we have

y 1=0.2943

From (2) and (5), we get y 2=0.5702 and y 3=0.8105

Therefore, y ( 0.25 )=0.2943 , y ( 0.5 )=0.5702 and y ( 0.75 )=0.8105 .

Example 13. Using finite difference method solve the boundary value problem
d2 y
= y , y ( 0 )=0 , y ( 2 )=3.63, taking h=0.5 .
d x2

d2 y
Solution: Given that = y , i.e., y ' ' = y ; y ( 0 )=0 , y ( 2 )=3.63 and h=0.5.
d x2

94
Let x 0=0 so that x 1=0.5 , x 2=1.0 , x 3=1.5 , x 4 =2.0 and y 0=0 , y 4=3.63.

'' y n+1−2 y n + y n−1


Now we replace y ' ' by the relation y n ≈ and get
h2

y n+1−2 y n + y n−1
= yn
h2

Putting h=0.5, we get

y n+ 1−2.25 y n+ y n−1=0 (1)

Putting n=¿1,2 and 3 we get

y 2−2.25 y 1 + y 0=0

y 3−2.25 y 2 + y 1=0

y 4 −2.25 y 3+ y 2=0

Using the boundary conditions y 0=0 and y 4 =1, we have

y 2=2.25 y 1 (2)
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
y 3−2.25 y 2 + y 1=0 (3)

3.63−2.25 y 3 + y 2=0 (4)

From (2) and (3), we get

y 3=4.0625 y 1 (5)

Using (2) and (5) in (4), we have

y 1=0.5268

From (2) and (5), we get y 2=1.1853 and y 3=2.1401

Therefore, y ( 0.5 )=0.5268 , y ( 1.0 )=1.1853 and y ( 1.5 )=2.1401 .

Miscellaneous Examples

dy
Example 14. Using Euler’s method obtain the solution of =x− y with y (0)=1 and h=0.2 at
dx
x=0.4 . [WBUT 2008]

95
dy
Solution: Here, =x− y , y ( 0 )=1 and h=0.2 .
dx

Let f ( x , y )=x− y , x0 =0 so that y 0= y ( x 0 ) =1.

Euler’s formula is given by y n+ 1 ≈ y n +hf ( x n , y n ) , n=0 ,1 , 2 , …

The calculations for y ( 0.4 ) are given in the following table:

n xn yn f ( x n , y n )=x n− y n y n+ 1 ≈ y n +hf ( x n , y n )
0 0 1 0−¿1= −¿1 1+0.2×(−¿1)=0.8
1 0.2 0.8 0.2−¿0.8= −¿0.6 0.8+0.2×(−¿0.6)=0.68
2 0.4 0.68 −¿ −¿

Hence, y (0.4 )≈ 0.68

dy
Example 1.5 Find the solution of the differential equation =x 2− y , y ( 0 ) =1 for x=0.3 taking
dx
h=0.1 by Euler’s method. Justify your result by putting x=0.3 in its solution y=x 2−2 x +2−e−x.

dy
Solution: Here, =x 2− y , y ( 0 ) =1 and h=0.1 .
dx
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
Let f ( x , y )=x 2− y , x 0=0 so that y 0= y ( x 0 ) =1.

Euler’s formula is given by y n+ 1 ≈ y n +hf ( x n , y n ) , n=0 ,1 , 2 , …

The calculations for y ( 0.3 ) are given in the following table:

n xn yn f ( x n , y n )=x 2n− y n y n+ 1 ≈ y n +hf ( x n , y n )


0 0 1 (0)2−1=−1 1+0.1×(−¿1)=0.9
1 0.1 0.9 (0.1)2−0.9=−0.89 0.9+0.1×(−¿0.89)=0.811
2 0.2 0.811 (0.2)2−0.811=−0.771 0.811+0.1×(−¿0.771)=0.7339
3 0.3 0.7339 −¿ −¿

Hence, y (0.3) ≈ 0.7339

Now putting x=0.3 in the given solution y=x 2−2 x +2−e−x , we get

y ( 0.3 )=(0.3)2−2 ×0.3+2−e−0.3=0.7492

|0.7492−0.7339|
Hence the relative error is =0. 0204
0.7492

96
This shows that the approximate solution, obtained by numerical method is correct up to one significant
figure.

dy
Example 16. Solve the following initial value problem using Euler’s method: =x 2+ y with y ( 0 )=1.
dx
Compute the first steps of the solution with h=0.1. Compare the result (% relative error) with those
obtained from the exact solution y=3 e x −x 2−2 x−2. [WBUT 2011]

dy
Solution: We are given, =x 2+ y , y ( 0 )=1 and h=0.1 .
dx

Let f ( x , y )=x 2+ y , x 0=0 so that y 0= y ( x 0 ) =1.

Euler’s formula is given by y n+ 1 ≈ y n +hf ( x n , y n ) , n=0 ,1 , 2 , …

The calculations for 5 steps are given in the following table:

n xn yn f ( x n , y n )=x 2n + y n y n+ 1 ≈ y n +hf ( x n , y n )
2
0 0 1 (0) +1=1 1+0.1×1=1.1
2
1 0.1 1.1 (0.1) + 1.1=1.11 1.1+0.1×1.11=1.211
2
2 0.2 1.211 (0.2) + 1.211=1.251 1.211+0.1×1.251=1.3361
2
3 0.3 1.3361 (0.3) +1.3361=1.4261 1.3361+0.1×1.4261=1.47871
4 Numerical
0.4 1.47871 Solution(0.4)
of Ordinary
2
Differential Equations
+1.47871=1.63871 1.47871+0.1×1.63871=1.642581 M(CS)-301/401

Hence, using Euler’s method we obtain y ( 0.1 ) ≈ 1.1 , y ( 0.2 ) ≈ 1.211 , y ( 0.3 ) ≈ 1.3361 , y ( 0.4 ) ≈ 1.47871
and y ( 0.5 ) ≈1.642581 .

Now putting x=0.1 , 0.2 , 0.3 and 0.4 in the given solution y=3 e x −x 2−2 x−2, we get

y ( 0.1 )=3 × e0.1 −(0.1)2−2 ×0.1−2=1.105513

y ( 0.2 )=3 × e0.2 −(0.2)2−2 ×0.2−2=1.224208

y ( 0.3 )=3 × e0.3 −(0.3)2−2× 0.3−2=1.359576

y ( 0.4 ) =3× e 0.4−(0.4)2−2× 0.4−2=1.515474

y ( 0.5 )=3 × e0.5 −(0.5)2−2× 0.5−2=1.696164

Hence the % error in

|1.105513−1.1|
y 1= y (0.1) is ×100 %=0.499 %
1.105513

97
|1.224208−1.211|
y 2= y (0.2) is × 100 %=1.079 %
1.224208

|1.359576−1.3361|
y 3= y (0.3) is ×100 %=1.727 %
1.359576

|1.515474−1.47871|
y 4 = y (0.4) is × 100 %=2.426 %
1.515474

|1.696164−1.642581|
y 5= y (0.5) is × 100 %=3.163 %
1.696164

dy
Example 17. Solve the differential equation =1− y , y ( 0 )=0 by Euler’s method at x=0.1 , 0.2 .
dx
[WBUT
2007, 2008]

dy
Solution: Here, =1− y , y ( 0 )=0.
dx

Let f ( x , y )=1− y , x 0=0 so that y 0= y ( x 0 ) =1 and let h=0.1.

Euler’s formula is given by y n+ 1 ≈ y n +hf ( x n , y n ) , n=0 ,1 , 2 , …


Numerical Solution of Ordinary Differential Equations M(CS)-301/401
The calculations for y ( 0.4 ) are given in the following table:

n xn yn f ( x n , y n )=1− y n y n+ 1 ≈ y n +hf ( x n , y n )
0 0 0 1−¿0= 1 0+0.1×1=0.1
1 0.1 0.1 1−¿0.1= 0.9 0.1+0.1×0.9=0.19
2 0.2 0.19 −¿ −¿

Hence, y (0.1) ≈ 0.1 and y (0.2) ≈ 0.19.

dy
Example 18. Find the solution of the following differential equation =x+ y with y=1 when x=0
dx
by Euler’s method for x=1 by taking h=0.2 [WBUT 2012]

dy
Solution: Given, =x+ y , y ( 0 )=1 and h=0.2 .
dx

Let f ( x , y )=x+ y , x 0=0 so that y 0= y ( x 0 ) =1.

Euler’s formula is given by y n+ 1 ≈ y n +hf ( x n , y n ) , n=0 ,1 , 2 , …

The calculations for y ( 1 ) are given in the following table:

98
n xn yn f ( x n , y n )=x n + y n y n+ 1 ≈ y n +hf ( x n , y n )
0 0 1 0+1=1 1+0.2×1=1.2
1 0.2 1.2 0.2+1.2=1.4 1.2+0.2×1.4=1.48
2 0.4 1.48 0.4+1.48=1.88 1.48+0.2×1.88=1.856
3 0.6 1.856 0.6+1.856=2.456 1.856+0.2×2.456=2.3472
4 0.8 2.3472 0.8+2.3472=3.1472 2.3472+0.2×3.1472=2.97664
5 1.0 2.97664 −¿ −¿

Hence, y (1)≈ 2.97664 .

Example 19. Find the values of y(0.1), y(0.2) and y(0.3) using Runge-Kutta method of order four, given
dy
that =xy + y 2 , y ( 0 )=1. [WBUT 2006, 2009]
dx

dy
Solution: Given that = y 2+ xy , y ( 1 )=1.
dx

Let f ( x , y )= y 2 + xy , x 0=1 so that y 0= y ( x 0 ) =1 and let h=0.1 .

Now 4th order Runge-Kutta method is given by

1
y n+ 1 ≈ y n + ( k 1+ 2k 2+ 2k 3+ k 4 ) , n=0 , 1, 2 , …
6
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
Where k 1=hf ( x n , y n ), k 2=hf ( x n+ h/2 , y n + k 1 /2 ), k 3=hf ( x n+ h/2 , y n + k 2 /2 ) and
k 4=hf ( x n +h , y n +k 3 ) .

Calculation for n=0:

k 1=hf ( x 0 , y 0 ) =0.1× ( 12+ 0 ×1 )=0.1

k 2=hf ( x 0+ h/2 , y 0 + k 1 /2 )=0.1 × ( 1.052 +0.05 ×1.05 )=0.1155

k 3=hf ( x 0+ h/2 , y 0 + k 2 /2 )=0.1 × ( 1.05775 2+0.05 × 1.05775 )=0.1172

k 4=hf ( x 0 +h , y 0 +k 3 ) =0.1 × ( 1.11722 +0.1 ×1.1172 )=0.13598

1
Therefore, y 1 ≈ y 0+ ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 1+ ( 0.1+2 ×0.1155 +2× 0.1172+0.13598 )
6

¿ 1.116896667 ≈ 1.1169, correct up to 4 decimal places.

99
Therefore, y (0.1) ≈1.1169 .

Calculation for n=1:

k 1=hf ( x 1 , y 1 )=0.1 × ( 1.1169 2 +0.1× 1.1169 ) =0.1359

k 2=hf ( x 1+ h/2, y 1 +k 1 /2 ) =0.1× ( 1.18492 +0.15 ×1.1849 ) =0.1582

k 3=hf ( x 1+ h/2 , y 1 +k 2 /2 ) =0.1 × ( 1.1962 +0.15 ×1.196 )=0.1610

k 4=hf ( x 1 +h , y 1+ k 3 )=0.1× ( 1.27792+ 0.2× 1.2779 )=0.1889

1
Therefore, y 2 ≈ y1 + ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 1.1169+ ( 0.1359+2× 0.1582+2× 0.1610+0.1889 )
6

¿ 1.277433 ≈ 1.2774, correct up to 4 decimal places.

Therefore, y (0.2) ≈1.2774 .

Calculation for n=2:


Numerical Solution of Ordinary Differential Equations M(CS)-301/401
k 1=hf ( x 2 , y 2 )=0.1 × ( 1.27742 +0.2× 1.2774 ) =0.1887

k 2=hf ( x 2+ h/2 , y 2 +k 1 /2 ) =0.1× ( 1.37182 +0.25 ×1.3718 ) =0.2225

k 3=hf ( x 2+ h/2 , y 2 +k 2 /2 ) =0.1 × ( 1.38862 +0.25 ×1.3886 )=0.2275

k 4=hf ( x 2 +h , y 2+ k 3 ) =0.1× ( 1.50492 +0.3 ×1.5049 ) =0.2716

1
Therefore, y 3 ≈ y 2+ ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 1.2774+ ( 0.1887+2 ×0.2225+2 ×0.2275+ 0.2716 )
6

¿ 1.504116667 ≈ 1.5041, correct up to 4 decimal places.

Therefore, y (0.3) ≈ 1.1.5041 .

Example 20. Using 4th order Runge-Kutta method evaluate the value of y when x=1.2, given
dy y 1
+ = , y ( 1 )=1.
dx x x2
[WBUT 2006]

100
dy y 1
Solution: Given that + = , y ( 1 )=1.
dx x x2

−y 1
Let f ( x , y )= + , x =1 so that y 0= y ( x 0 ) =1 and let h=0.2 .
x x2 0

Now 4th order Runge-Kutta method is given by

1
y n+ 1 ≈ y n + ( k 1+ 2k 2+ 2k 3+ k 4 ) , n=0 , 1, 2 , …
6

Where k 1=hf ( x n , y n ), k 2=hf ( x n+ h/2 , y n + k 1 /2 ), k 3=hf ( x n+ h/2 , y n + k 2 /2 ) and


k 4=hf ( x n +h , y n +k 3 ) .

Therefore, for n=0

−1 1
k 1=hf ( x 0 , y 0 ) =0.2×
[ + =0
1 12 ]
−1 1
[ ]
k 2=hf ( x 0+ h/2 , y 0 + k 1 / 2 )=0.2 × +
1.1 (1.1)2
=−0.016529

−0.9917355 1
Numerical Solution
[ Differential] Equations
) of Ordinary
k 3=hf x 0+ h/2 , y 0 + k 2 / 2 =0.2 ×
( 1.1
+
(1.1)2
=−0.015026 M(CS)-301/401

−0.98497 1
( ) [
k 4=hf x 0 +h , y 0 +k 3 =0.2 ×
] 1.2
+
(1.2)2
=−0.025273

1
Therefore, y 1 ≈ y 0+ ( k +2 k 2 +2 k 3 +k 4 )
6 1

1
¿ 1+ ( 0+ 2× (−0.016529 ) +2×(−0.015026)−0.025273 )
6

¿ 0.9852695 ≈ 0.9853, correct up to 4 decimal places.

Therefore, y (1.2)≈ 0.9853 .

Example 21. Use fourth order Runge-Kutta method to find an approximate value of y (0.2) given that
dy
y (0)=0 and =1+ y 2. [WBUT 2012]
dx

dy
Solution: Given that =1+ y 2 , y ( 0 )=0.
dx

101
Let f ( x , y )=1+ y 2 , x 0=0 so that y 0= y ( x 0 ) =1 and let h=0.2 .

Now 4th order Runge-Kutta method is given by

1
y n+ 1 ≈ y n + ( k 1+ 2k 2+ 2k 3+ k 4 ) , n=0 , 1, 2 , …
6

Where k 1=hf ( x n , y n ), k 2=hf ( x n+ h/2 , y n + k 1 /2 ), k 3=hf ( x n+ h/2 , y n + k 2 /2 ) and


k 4=hf ( x n +h , y n +k 3 ) .

Therefore, for n=0

k 1=hf ( x 0 , y 0 ) =0.2× [ 1+ 02 ]=0.2

k 2=hf ( x 0+ h/2 , y 0 + k 1 / 2 )=0.2 × [ 1+(0.1)2 ] =0.202

k 3=hf ( x 0+ h/2 , y 0 + k 2 /2 )=0.2 × [ 1+(0.101)2 ]=0.2020402

k 4=hf ( x 0 +h , y 0 +k 3 ) =0.2 × [ 1+(0.1010201)2 ]=0.2020401012

1
Therefore, y 1 ≈ y 0+ ( k +2 k 2 +2 k 3 +k 4 )
6 1
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
1
¿ 0+ ( 0.2+ 2× 0.202+ 2× 0.2020402+ 0.2020401012 )
6

¿ 0.20168675 ≈ 0.2017, correct up to 4 decimal places.

Therefore, y (0.2) ≈ 0.2017.

dy 1
Example 22. Given = ( 1+ x2 ) y 2 , y ( 0 ) =1 , y ( 0.1 )=1.06 , y ( 0.2 )=1.12 , y ( 0.3 ) =1.21. Calculate
dx 2
y (0.4 ) by Milne’s predictor-corrector method.

dy 1 1
Solution: Given = ( 1+ x2 ) y 2, i.e. y ' = ( 1+ x 2 ) y 2 (1)
dx 2 2

Let x 0=0 , x 1=0.1 , x 2=0.2, x 3=0.3 so that y 0=1 , y 1=1.06 , y 2=1.12 , y3 =1.21 and let h=0.1.

Now Milne’s predictor formula is given by

4
y n+ 1 ≈ y n−3 + h(2 y 'n−2− y 'n−1 +2 y 'n) (2)
3

Putting n=3 in (2), we get

102
4
y 4 ≈ y 0 + h(2 y '1− y '2 +2 y '3) (3)
3

Now, from (1) we get

1 1
y '1= ( 1+ x 12 ) y 12= [ 1+(0.1)2 ] ×(1.06)2=0.5674
2 2

1 1
y '2= ( 1+ x 22 ) y 22= [ 1+(0.2)2 ] ×(1.12)2=0.6522
2 2

1 1
y '3= ( 1+ x 32 ) y 32= [ 1+( 0.3)2 ] ×(1.21)2=0.7980
2 2

Therefore, using these in (3), the predicted value of y 4 is

4
y 4 ≈ y 0 + h ( 2 y '1− y '2 +2 y '3 )
3

4 × 0.1
¿ 1+ ( 2× 0.5674−0.6522+2× 0.7980 )
3

¿ 1.27715 ≈ 1.2772

Now, Numerical Solution


Milne’s corrector formulaof
is Ordinary Differential Equations M(CS)-301/401
1
y n+ 1 ≈ y n−1 + h( y 'n +1+ 4 y 'n + y 'n−1 ) (4)
3

Putting n=3 in (4), we get

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 ) (5)
3

' 1 1
From (1), we have y 4 = ( 1+ x 42 ) y 42 = [1+(0.4)2 ] ×(1.2772)2=0.9458
2 2

Therefore, from (5), we get the corrected value of y 4 as

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 )
3

0.1
¿ 1.12+ (0.9458+ 4 × 0.7980+0.6522)
3

¿ 1.2796667 ≈ 1.2797, correct to 4 decimal places.

Hence the required value of y (0.4 ) is 1.2797.

103
dy
Example 23. Compute y (0.5) by Milne’s predictor-corrector method from =2 e x − y , given that
dx
y (0.1)=2.0100 , y (0.2)=2.0401 , y (0.3)=2.0907 , y (0.4)=2.1621. [WBUT 2012]

dy
Solution: Given =2 e x − y , i.e. y ' =2 e x − y (1)
dx

Let x 0=0.1 , x1 =0.2 , x 2=0.3 , x 3=0.4 so that y 0=2.0100 , y 1=2.0101 , y 2=2.0907 , y 3=2.1621 and
let h=0.1.

Now Milne’s predictor formula is given by

4
y n+ 1 ≈ y n−3 + h(2 y 'n−2− y 'n−1 +2 y 'n) (2)
3

Putting n=3 in (2), we get

4
y 4 ≈ y 0 + h(2 y '1− y '2 +2 y '3) (3)
3

Now, from (1) we get

y '1=2 e x − y 1=2e 0.2−2.0101=0.43271


1

Numerical Solution of Ordinary Differential Equations


y '2=2 e x − y 2 =2e 0.3 −2.0907=0.60902
2 M(CS)-301/401

y '3=2 e x − y3 =2 e0.4 −2.1621=0.82155


3

Therefore, using these in (3), the predicted value of y 4 is

4
y 4 ≈ y 0 + h ( 2 y '1− y '2 +2 y '3 )
3

4 × 0.1
¿ 2.0100+ ( 2 ×0.43271−0.60902+2 × 0.82155 )
3

≈ 2.26327

Now, Milne’s corrector formula is

1
y n+ 1 ≈ y n−1 + h( y 'n +1+ 4 y 'n + y 'n−1 ) (4)
3

Putting n=3 in (4), we get

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 ) (5)
3

104
' x4 0.5
From (1), we have y 4 =2 e − y 4=2 e −2.26327=1.03417

Therefore, from (5), we get the corrected value of y 4 as

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 )
3

0.1
¿ 2.0907+ (1.03417+4 × 0.82155+0.60902)
3

≈ 2.2550, correct to 4 decimal places.

Hence the required value of y (0.5) is 2.2550.

dy
Example 24. Apply Milne’s method to find y(0.8) for the equation =x+ y 2, given that
dx
y ( 0 )=0 , y ( 0.2 )=0.02 , y ( 0.4 )=0.0805 , y ( 0.6 ) =0.1839.
[WBUT 2013]

dy
Solution: Given =x+ y 2, i.e. y ' =x + y 2 (1)
dx

Let x 0=0 , x 1=0.2 , x 2=0.4 , x3 =0.6 so that y 0=0 , y 1=0.02, y 2=0.0805, y 3=0.1839 and let h=0.2.
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
Now Milne’s predictor formula is given by

4
y n+ 1 ≈ y n−3 + h(2 y 'n−2− y 'n−1 +2 y 'n) (2)
3

Putting n=3 in (2), we get

4
y 4 ≈ y 0 + h(2 y '1− y '2 +2 y '3) (3)
3

Now, from (1) we get

y '1=x 1 + y 12=0.2+(0.02)2=0.2004

y '2=x 2 + y 22=0.4+(0.0805)2=0.40648

y '3=x 3 + y 32=0.6+(0.1839)2=0.63382

Therefore, using these in (3), the predicted value of y 4 is

4
y 4 ≈ y 0 + h ( 2 y '1− y '2 +2 y '3 )
3

105
4 ×0.2
¿ 0+ ( 2 ×0.2004−0.40648+2 × 0.63382 )
3

≈ 0.3365

Now, Milne’s corrector formula is

1
y n+ 1 ≈ y n−1 + h( y 'n +1+ 4 y 'n + y 'n−1 ) (4)
3

Putting n=3 in (4), we get

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 ) (5)
3

From (1), we have y '4 =x 4 + y 42 =0.8+( 0.3365)2=0.91323

Therefore, from (5), we get the corrected value of y 4 as

1
y 4 ≈ y 2 + h( y '4 +4 y'3 + y '2 )
3

0.2
¿ 0.0805+ ( 0.91323+4 × 0.63382+0.40648)
3
Numerical Solution of Ordinary Differential Equations M(CS)-301/401
≈ 0.3375, correct to 4 decimal places.

Hence the required value of y (0.8) is 0.3375.

Example 25. Using finite difference method solve the boundary value problem:

d2 y
+ y +1=0 with y (0)=0 , y (1)=0. [WBUT 2013]
d x2

d2 y
Solution: Given that 2
+ y +1=0 , i.e., y ' ' =− y−1; y ( 0 )=0 , y ( 1 )=0 .
dx

Let x 0=0 and h=0.25 so that x 1=0.25 , x 2=0.5 , x 3=0.75 , x 4 =1.0 and y 0=0 , y 4=0 .

'' y n+1−2 y n + y n−1


Now we replace y ' ' by the relation y n ≈ and get
h2

y n+1−2 y n + y n−1
=− y n−1
h2

Putting h=0.25, we get

106
y n+ 1−1.9375 y n+ y n−1 +0.0625=0 (1)

Putting n=¿1,2 and 3 we get

y 2−1.9375 y 1 + y 0 +0.0625=0

y 3−1.9375 y 2 + y 1 +0.0625=0

y 4 −1.9375 y 3+ y 2+0.0625=0

Using the boundary conditions y 0=0 and y 4 =0, we have

y 2=1.9375 y 1−0.0625 (2)

y 3−1.9375 y 2 + y 1 +0.0625=0 (3)

y 2=1.9375 y 3−0.0625 (4)

From (2) and (4), we get

y 3= y 1 (5)

Using (2) and (5) in (3), we have

Numerical Solution
y 1−1.9375(1.9375 of Ordinary
y 1−0.0625)+ Differential Equations
y 1 +0.0625=0 M(CS)-301/401
⇒ y 1=0.10467706≈ 0.1047

From (2) and (5), we get y 2=0.1404 .

Therefore, y ( 0.25 )=0.1047 , y ( 0.5 )=0.1404 , y (0.75)=0.1047 .

Example 26. Using Adam-Bashforth-Moulton method find y (1.4), given:


dy
=( 1+ y ) x 2 , y ( 1 )=1 , y ( 1.1 ) =1.233 , y ( 1.2 )=1.548 , y ( 1.3 ) =1.979.
dx

dy
Solution: Given =( 1+ y ) x 2, i.e. y ' =( 1+ y ) x2 (1)
dx

Let x 0=1 , x1=1.1, x 2=1.2 , x 3=1.3 so that y 0=1 , y 1=1.233 , y 2=1.548 , y 3=1.979 and let h=0.1.

Now Adam-Bashforth’s predictor formula is given by

1
y n+ 1 ≈ y n + h(55 y 'n−59 y 'n−1+ 37 y 'n−2−9 y 'n−3) (2)
24

Putting n=3 in (2), we get

107
1
y4 ≈ y3 + h(55 y '3−59 y '2+ 37 y '1−9 y '0) (3)
24

Now, from (1) we get

y '0=( 1+ y 0 ) x 02=( 1+1 ) ×(1)2=2

y '1=( 1+ y 1 ) x 12=( 1+ 1.233 ) ×(1.1)2=2.70193

y '2=( 1+ y 2 ) x 22=( 1+1.548 ) ×(1.2)2=3.66912

y '3=( 1+ y3 ) x 32=( 1+1.979 ) ×( 1.3)2=5.03451

Therefore, using these in (3), the predicted value of y 4 is

1
y4 ≈ y3 + h(55 y '3−59 y '2+ 37 y '1−9 y '0)
24

0.1
¿ 1.979+ (55 × 5.03451−59× 3.66912+37 ×2.70193−9 ×2)
24

¿ 2.5722974

Now, Numerical
Adam-Moulton corrector of
Solution formula is
Ordinary Differential Equations M(CS)-301/401
1
y n+ 1 ≈ y n + h(9 y 'n+1 +19 y 'n−5 y 'n−1 + y 'n−2) (4)
24

Putting n=3 in (4), we get

1
y4 ≈ y3 + h(9 y '4 +19 y '3−5 y '2 + y '1) (5)
24
' 2 2
From (1), we have y 4 =( 1+ y 4 ) x 4 =( 1+ 2.5722974 ) ×(1.4 ) =7.0017029

Therefore, from (5), we get the corrected value of y 4 as

1
y4 ≈ y3 + h(9 y '4 +19 y '3−5 y '2 + y '1)
24

0.1
¿ 1.979+ ( 9× 7.0017029+19× 5.03451−5 ×3.66912+2.70193)
24

¿ 2.5749473 ≈ 2.5749, correct to 4 decimal places.

Hence the required value of y (0.4 ) is 2.5749.

108
Multiple Choice Questions

1. Runge-Kutta formula has a truncation error, which is of the order of


(a) h2 (b) h 4 (c) h5 (d) none of these [WBUT 2004, 2006, 2010, 2011, 2013]
th
2. Error of 4 order Runge-Kutta method is of the order of
(a) h 4 (b) h5 (c) h6 (d) none of them [WBUT 2006]
dy
3.Numerical
If =x+ ySolution of, Ordinary
and y ( 1 )=0 then y (1.1)Differential Equations
according to Euler’s method [h=0.1] M(CS)-301/401
dx
(a) 0.1 (b) 0.3 (c) 0.5 (d) 0.9 [WBUT 2007, 2008, 2011, 2013]

4. The error involved in 4th order R-K method is given by


(a) O(h 2) (b) O(h 4 ) (c) O(h3 ) (d) O(h5 ) [WBUT 2008]
5. The truncation error in modified Euler’s formula is of the order of
(a) h2 (b) h3 (c) h 4 (d) h5 [WBUT 2004, 2011]
6. Finite difference method is used to solve
(a) a system of simultaneous linear equations
(b) a system of simultaneous non-linear equations [WBUT 2011]
(c) partial differential equations
(d) non-linear equations.
7. Condition of convergence for Euler’s method
'
(a) |1+h f ( xi , y i)|<1
'
(b) |1+h f ( xi , y i)|≤ 1 [WBUT 2011]
'
(c) |1+h f ( xi , y i)|>1
'
(d) |1+h f (xi , y i)|≥ 1
8. Milne’s corrector formula is
h ' ' '
(a) y n+ 1 ≈ y n + ( y n−1+ 4 y n + 4 y n+1 )
3

109
h ' ' '
(b) y n+ 1 ≈ y n−1 + ( y n−1 + 4 y n +4 y n+1) [WBUT 2011]
3
4h '
(c) y n+ 1 ≈ y n + ( y n−1 + 4 y 'n +4 y 'n+1)
3
(d) none of these
dy
9. If =x 2+ y and y ( 0 )=1, then y (0.02) according to Euler’s method [h=0.01] is
dx
(a) 1.02 (b) 1.04 (c) 1.0 (d) 0.99 [WBUT 2012]

10. The finite difference method is used to solve


(a) a system of ordinary differential equations
(b) a boundary value problem [WBUT 2012]
(c) a partial differential equation
(d) a system of transcendental equations.
11. The truncation error in Euler’s method for the solution of ODE of first order is
h2 ' ' 2 ''
(a) O(h 2) (b) y (x m +θh) (c) h y ( x m +θh) (d) none of these [WBUT 2012]
2
d2 y
12. In finite difference method is replaced by
d x2
y n+1−2 y n−1 + y n y n+1−2 y n + y n−1
(a) (b)
2 h2 h2
Numerical
[WBUTSolution
2013] of Ordinary Differential Equations M(CS)-301/401
y n+1−2 y n−1 + y n y n+1−2 y n−1 + y n
(c) (d)
2h 4 h2

dy
13. For =xy and y ( 0 )=2, the value of k 2 according to Runge-Kutta method of 4 th order[h=0.2]
dx
is
(a) 0.1 (b) 0.01 (c) 0.4 (d) 0.04 [WBUT 2013]

14. The ordinary differential equation is solved by


(a) Bisection method (b) Gauss-Seidel method

(c) Euler’s method (d) Simpson’s one-third rule

15. For solving the differential equation, Euler’s formula is


(a) y n+ 1 ≈ y n +hf ( x n , y n−1 ) (b) y n+ 1 ≈ y n +hf ( x n , y n +1 )

(c) y n+ 1 ≈ y n +hf ( x n , y n ) (d) y n+ 1 ≈ hf ( x n , y n )

16. Error in 2nd order Runge-Kutta method is


(a) O(h 2) (b) O(h3 ) (c) O(h 4 ) (d) O(h5 )
17. Milne’s predictor formula is

110
4h
(a) y n+ 1 ≈ y n−3 + (2 y 'n−2− y 'n−1 +2 y 'n)
3
4h
(b) y n−1 ≈ y n−3 + (2 y 'n −2 − y 'n−1+2 y 'n )
3
4h
(c) y n+ 1 ≈ y n−3 + (2 y 'n−2− y 'n−1 +2 y 'n+1)
3
4h
(d) y n−1 ≈ y n−3 + (2 y 'n −2 − y 'n+1 +2 y 'n)
3
18. Adam-Bashforth predictor formula is given by
1
(a) y n+ 1 ≈ y n + h(55 y 'n+1−59 y 'n−1 +37 y 'n−2−9 y 'n−3 )
24
1
(b) y n+ 1 ≈ y n + h(55 y 'n−59 y 'n−1+ 37 y 'n−2−9 y 'n−3)
24
1
(c) y n−1 ≈ y n+ h(55 y 'n−59 y 'n−1 +37 y 'n−2−9 y 'n−3 )
24
1 ' ' ' '
(d) y n+ 1 ≈ y n−1 + h (55 y n−59 y n−1+37 y n −2 −9 y n−3)
24
19. Adam-Moulton corrector formula is
1
(a) y n+ 1 ≈ y n−1 + h (9 y 'n+1 +19 y 'n−5 y 'n−1 + y 'n−2)
24
1
(b) y n−1 ≈ y n+ h( 9 y 'n +1+ 19 y 'n−5 y 'n−1+ y 'n−2 )
Numerical Solution 24 of Ordinary Differential Equations M(CS)-301/401
1
(c) y n ≈ y n−1+ h( 9 y 'n +1+ 19 y 'n−5 y 'n−1+ y 'n−2 )
24
1
(d) y n+ 1 ≈ y n + h(9 y 'n+1 +19 y 'n−5 y 'n−1 + y 'n−2)
24
dy
20. In finite difference method is replaced by
dx
y − y n −1 y − y n+1 y − yn y − y n−1
(a) n+1 (b) n−1 (c) n+1 (d) n
2h 2h 2h 2h

Answers

1. any, 2. (b), 3. (a), 4. (d), 5. (b), 6. (c), 7. (b), 8. (d), 9. (a), 10. (b) and (c), 11. (a) and (b), 12. (b),
13. (d), 14. (c), 15. (c), 16. (b), 17. (a), 18. (b), 19. (d), 20. (a).

Short Answer Questions

1. Describe Euler’s method to find the solution of the differential equation


dy
=f ( x , y) with y ( x 0 )= y 0.
dx
Interpret the error in this method geometrically. [WBUT 2003]

111
dy
2. Use Euler’s method to find y (0.4 ) where =log 10 (x + y), y ( 0 )=1 taking h=0.1.
dx
3. Using Euler’s modified formula find y (0.1), correct to 3 decimal places, given that
dy
=x 2+ y , y ( 0 )=0.94 .
dx
dy
4. Evaluate y (0.4 ) by Euler’s method, given that = y 2+ 3 x , y ( 0 )=1 , h=0.1 .
dx
5. Obtain the recursion formula for solving a second order boundary value problem by finite
difference method.
6. Find y (0.10) and y (0.15) by Euler’s method from the differential equation
dy
= y 2+ x2 with y (0)=0, correct to four decimal places, taking step length h=0.05.
dx
[WBUT 2007]
7. Solve by using Euler’s method the following differential equation for x=1 by taking h=0.2,
dy
=xy , y =1 when x=0 . [WBUT 2008, 2009]
dx
dy
8. Solve the differential equation =1− y , y ( 0 )=0 by Euler’s method at x=0.1 , 0.2 .
dx
[WBUT
2007, 2008]
9. Find the solution of the following differential equation by Euler’s method for x=1 by taking
Numerical
h=0.2 Solution of Ordinary Differential Equations M(CS)-301/401
dy
=x+ y with y=1 when x=0. [WBUT 2012]
dx
10. Use fourth order Runge-Kutta method to find an approximate value of y (0.2), given that
dy
y (0)=0 and =1+ y 2. [WBUT 2012]
dx
dy y 2 −x2
11. Using Runge-Kutta method of 4th order solve = with y (0)=1 at x=0.2 .
dx y 2+ x 2
[WBUT 2013]
dy
12. Given that = y + x , y ( 0 )=1, find y (0.1) by Euler’s method taking h=0.05.
dx
dy y −x
13. Use Euler’s method to find y (0.1) when = , y ( 0 )=1.
dx y+ x
dy
14. Using Euler’s method obtain the solution of =x− y with y (0)=1 and h=0.2 at x=0.4 .
dx

[WBUT 2008]
dy
15. Find y (1.1) using Runge-Kutta method of the fourth order, given that = y 2+ xy , y ( 1 )=1 and
dx
h=0.1. [WBUT 2005]

112
dy
16. Evaluate y (1.1) using Runge-Kutta method of order 4 for the problem =x 2+ y 2 , y ( 1 ) =0.
dx

[WBUT 2010]

Answers

3. y (0.1)=1.039

4. y (0.4 )=1.7729

6. y (0.10)=0.0001; y (0.15)=0.0006

7. y (1)=1.4593

8. y ( 0.1 )=0.1 ; y ( 0.2 )=0.19

9. y ( 1 )=2.9766

10. y ( 0.2 )=0.2027


Numerical Solution of Ordinary Differential Equations M(CS)-301/401
11. y ( 0.2 )=1.1960

12. y ( 0.1 )=1.1050

13. y ( 0.1 )=1.1

14. y ( 0.4 ) =0.68

15. y ( 1.1 )=1.2415

16. y ( 1.1 )=0.1107

Long Answer Questions

dy y −x
1. Given = with initial condition y=1 at x=0 , find y for x=0.1 by Euler’s method,
dx y+ x
correct up to 4 decimal places, taking step length h=0.02. [WBUT 2004, 2007]
2. Solve by using Euler’s method the following differential equation for x=1, taking h=0.2;
dy
=xy , y =1 when x=0 . [WBUT 2009]
dx

113
dy 1
3. Using Euler’s method evaluate y (2), correct up to three decimal places from = (x + y ) with
dx 2
y (0)=2 taking h=0.5. [WBUT 2007]
dy
4. Use Euler’s method to find the solution of =x− y with y (0)=1 , h=0.2 at x=0.4 .
dx
[WBUT 2011]
dy
5. Solve the following initial value problem using Euler’s method: =x 2+ y with y ( 0 )=1.
dx
Compute the first steps of the solution with h=0.1. Compare the result (% relative error) with
those obtained from the exact solution y=3 e x −x 2−2 x−2. [WBUT 2011]
6. Use Euler’s method to find the numerical solution of the following differential equation:
f ' ( x )=1+ x−x 2 with y (0)=1 , h=0.02 find y (0.1). [WBUT 2010]
dy
7. Apply Euler’s method to find y at x =0.01 and 0.02 from = y +e x with y (0)=0.
dx
[WBUT 2010]
dy x− y
8. Given that = , y ( 1 )=1, compute y (1.9) by modified Euler’s method.
dx x+ y
[WBUT 2004]
dy y 1
9. Given that + = , y ( 1 )=1 , evaluate y (1.2) by modified Euler’s method correct up to 4
dx x x2
decimal places. [WBUT 2003, 2006]
Numerical Solution of Ordinary Differential Equations dy M(CS)-301/401
10. Solve by Euler’s modified method, the following differential equation =x 2+ y , y ( 0 )=1 for
dx
x=0.02 by taking step length h=0.01. [WBUT 2006, 2008]
dy
11. Given that =log 10 (x + y) with the initial condition that y=1 when x=0 . Find y for x=0.2
dx
and x=0.5 using Euler’s modified formula. [WBUT 2012]
12. Use Runge-Kutta method of order 4 to calculate y(0.2) and y(0.4) for the equation ;
dy
=−xy , y ( 0 ) =1. [WBUT 2003]
dx
dy
13. Use Runge-Kutta method to compute y (0.4 ) from =x 2 y with y (0)=2, taking h=0.1.
dx

[WBUT 2003]
dy
14. Solve initial value problem 10 = x2 + y 2 , y ( 0 )=1 for x=0.1 , 0.2 by using Runge-Kutta
dx
fourth order method and find the solution correct upto 4 places of decimal. [WBUT 2004]
dy
15. Solve the equation =x 2+ y 2 , y ( 0 )=1 for x=0.1 by using Runge-Kutta 4th order method and
dx
find the solution correct upto 4 places of decimal(h=0.05). [WBUT 2007]

114
16. Find the values of y(0.1), y(0.2) and y(0.3) using Runge-Kutta method of order four, given that
dy
=xy + y 2 , y ( 0 )=1. [WBUT 2006, 2009]
dx
dy 1
17. Solve the equation = , y ( 0 )=1 for y (0.1) and y (0.2), using Runge-Kutta method of
dx x + y
fourth order. [WBUT 2006]
dy
18. Solve initial value problem 10 = x2 + y 2 , y ( 0 )=1 for x=0.1 , 0.2 by using Runge-Kutta 4th
dx
order method and find the solution correct upto 2 places of decimal. [WBUT 2007]
dy
19. Using Runge-Kutta method of order 4, find y (0.2), given that =3 e x +2 y , y ( 0 )=1, taking
dx
h=0.1. [WBUT 2010]
20. Use fourth order Runge-Kutta method to find an approximate value of y (0.2) given that
dy 2
y (0)=0 and =1+ y .
dx
[WBUT 2012]
dy
21. Compute y (0.5) by Milne’s predictor-corrector method from =2 e x − y , given that
dx
y (0.1)=2.0100 , y (0.2)=2.0401 , y (0.3)=2.0907 , y (0.4)=2.1621.
[WBUT 2012]
dy
22.Numerical
Apply Milne’s method
Solution to find Differential
of Ordinary y(0.8) for the equation
Equations =x+ y 2, given that
M(CS)-301/401
dx
y ( 0 )=0 , y ( 0.2 )=0.02 , y ( 0.4 )=0.0805 , y ( 0.6 ) =0.1839.
[WBUT 2013]
dy 1
23. Given = ( 1+ x2 ) y 2 , y ( 0 ) =1 , y ( 0.1 )=1.06 , y ( 0.2 )=1.12 , y ( 0.3 ) =1.21. Calculate y (0.4 )
dx 2
by Milne’s predictor-corrector method.
24. Using finite difference method solve the boundary value problem:
d2 y
+ y +1=0 with y (0)=0 , y (1)=0. [WBUT 2013]
d x2
25. Using Adam-Bashforth-Moulton method find y (1.4), given:
dy
=( 1+ y ) x 2 , y ( 1 )=1 , y ( 1.1 ) =1.233 , y ( 1.2 )=1.548 , y ( 1.3 ) =1.979.
dx

Answers

1. y ( 0.1 )=1.1095
2. y ( 1 )=1.4593
3. y ( 2 )=5.7656
4. y ( 0.4 ) =0.68
5. y ( 0.1 )=1.100 ; y ( 0.1 )=1.1055 ; 0.004975
6. y ( 0.1 )=1.1256

115
7. y ( 0.01 )=0.01 ; y ( 0.02 )=0.0202
8. y ( 1.9 )=1.1261
9. y ( 1.2 )=0.98718
10. y ( 0.02 )=1.0203
11. y ( 0.2 )=1.1118 ; y ( 0.5 )=1.12098
12. y ( 0.2 )=0.9802 ; y ( 0.4 )=0.9231
13. y ( 0.4 ) =2.0431
14. y ( 0.1 )=1.0101 ; y ( 0.2 ) =1.0207
15. y ( 0.1 )=1.1115
16. y ( 0.1 )=1.1169 ; y ( 0.2 )=1.2774 ; y ( 0.3 ) =1.5041
17. y ( 0.1 )=1.0914 ; y ( 0.2 )=1.1696
18. y ( 0.1 )=1.01 ; y ( 0.2 ) =1.02
19. y ( 0.2 )=2.3031
20. y ( 0.2 )=0.2027
21. y ( 0.5 )=2.255
22. y ( 0.8 )=0.3375
23. y ( 0.4 ) =1.2797
24. y ( 0.25 )=0.1047 ; y ( 0.5 ) =0.1404 ; y ( 0.75 )=0.1047
25. y ( 1.4 )=2.5749
Numerical Solution of Ordinary Differential Equations M(CS)-301/401

116

You might also like