Está en la página 1de 45

Module – I Engineering Mathematics - IV 2017

Numerical Solution of Ordinary Differential


Equations of First order and first degree
Introduction
Many ordinary differential equations can be solved by analytical methods
discussed earlier giving closed form solutions i.e. expressing y in terms of a
finite number of elementary functions of x. However, a majority of differential
equations appearing in physical problems cannot be solved analytically. Thus it
becomes imperative to discuss their solution by numerical methods.

Numerical methods for Initial value problem:


Consider the first order and first degree differential equations ( )with
the initial condition ( ) that is and called initial value
problem.

We discuss the following numerical methods for solving an initial value


problem.

1. Taylor’s series method


2. Modified Euler’s method
3. Runge - Kutta method of order IV
4. Milne’s Predictor - Corrector Method
5. Adams – Bashforth Predictor - Corrector Method

Type -1
Taylor’s series method
Consider the first order and first degree differential equations
( ) condition ( ) .

Taylor’s series expansion of ( ) in powers of ( ) is

Dr. A.H.Srinivasa, MIT, Mysore Page 1


Module – I Engineering Mathematics - IV 2017
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Where
at the point( )

Worked Examples
1. Using Taylor’s Series method, find the value of y at x = 0.1, and x = 0.2 for

the initial value problem ( )

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ( ) ( ) ( ) [( )( ) ( ) ] [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) [( )( )
( )( )] ( ) ( ) ( ) ( ) [ ( ) ]

Substitute the values of ( ) ( ) ( ) ( ) in equation (*)

( )

Dr. A.H.Srinivasa, MIT, Mysore Page 2


Module – I Engineering Mathematics - IV 2017

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1. x = 0.2


( ) ( ) ( ) ( )

( ) ( ) ( ) ( )

2. Using Taylor’s Series method, find the value of y at x = 0.1, and x = 0.2 for

the initial value problem ( )

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( )( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( )( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( )
( )( ) ( )( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( )
( )( ) ( )( ) ( ) [ ( ) ]

Dr. A.H.Srinivasa, MIT, Mysore Page 3


Module – I Engineering Mathematics - IV 2017
Substitute the values of ( ) ( ) ( ) ( ) in equation (*)

( ) ( ) ( ) ( ) ( )

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1 and x = 0.2


( ) ( )
( ) ( )

( ) ( )
( ) ( )

3. Using Taylor’s Series method, find the value of y at x = 0.1, and x = 0.2, for

the initial value problem ( )

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( ) ( ) [ ( ) ]
( )

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( ) [ ( ) ]
(

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ]

Differentiate w.r.t we get,

Dr. A.H.Srinivasa, MIT, Mysore Page 4


Module – I Engineering Mathematics - IV 2017
( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ]

Substitute the values of ( ) ( ) ( ) ( ) in equation (*)

( ) ( ) ( ) ( ) ( )

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1 and x = 0.2


( ) ( ) ( )
( ) ( )

( ) ( ) ( )
( ) ( )

4. Using Taylor’s Series method, solve the initial value problem

( ) and hence find the value of y at x = 0.1

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( )( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

Dr. A.H.Srinivasa, MIT, Mysore Page 5


Module – I Engineering Mathematics - IV 2017
( ) ( ) ( ) ( ) ( )( ) ( ) [ ( ) ]

Substitute the values of ( ) ( ) ( ) ( ) in equation (*)

( ) ( ) ( ) ( ) ( )

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1
( ) ( ) ( )
( ) ( )

5. Using Taylor’s Series method, solve the initial value problem

( ) and hence find the value of y at x = 0.1 and 0.2

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( )[ ( )] ( ) ( )( ) ( )
[ ( ) ]

Differentiate w.r.t we get,

Dr. A.H.Srinivasa, MIT, Mysore Page 6


Module – I Engineering Mathematics - IV 2017
( ) ( ) ( ) ( ) ( ) ( )( ) ( )( )
[ ( ) ]

Substitute the values of ( ) ( ) ( ) ( ) in equation (1)

( ) ( ) ( ) ( ) ( )

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1 and x = 0.2


( ) ( )
( ) ( ) ( )

( ) ( )
( ) ( ) ( )

Type - 2
Modified Euler’s method
dy
Consider the initial value problem  f ( x, y ); y ( x0 )  y0
dx
Suppose we determine solution of this problem at a point xn  x0  nh (where
h is step length) by using Euler's method

The solution is given by yn  yn 1  hf ( xn 1 , yn 1 ), n  1,2,3,...


p

Here, this will gives approximate solution by Euler’s method. Since the
accuracy is poor in this formula this value

Example. 1 Using modified Euler's method find y(0.2) by solving the equation

with h = 0.1 dy
 x  y 2 ; y (0)  1
dx
Solution:- By data

x x0  0 x1  0.1 x2  0.2
h  0.1 f ( x, y)  x  y 2
y y0  1 y1  ? y2  ?

Dr. A.H.Srinivasa, MIT, Mysore Page 7


Module – I Engineering Mathematics - IV 2017
This problem has to be worked in two stages for finding y(0.2)

Stage 1:- First to calculate the y(0.1) y1 From Euler’s formula


y1p  y 0  hf ( x0 , y 0 )

y1p  y 0  h x0  y 02 
y1p  1  0.10  (1)  2

y1p  0.9

By modified Euler’s formula, we have

y1c1  y0 
h
2
 f x , y   f x , y 
0 0 1 1
p

x  y    x  y  
h    p 2
y1c1  y0  0
2
0 1 1
2

y1c1  1
0.1
2
 1  0.1  0.9  2

y1c1  1  0.05 0.9  0.9    0.91452

The second Modified value of y1

y1c2  y0 
h

2
 
  

x0  y02   x1  y1c1
2

y1c2  1  0.05 0.9  0.9145   0.9132


2

The Third Modified value of y1

y1c3  y 0 
h

2
 
  

x0  y02   x1  y1c2
2

y1c3  1  0.05 0.9  0.9132   0.9133 2

y1  y (0.1)  0.9133

Dr. A.H.Srinivasa, MIT, Mysore Page 8


Module – I Engineering Mathematics - IV 2017

Type – 4
Predictor - Corrector Method
In the predictor – Corrector methods, Four prior values are required for finding
the value of y at x. These Four values may be given or extract using the initial
condition by Taylors series

A predictor formula is used to predict the value of y at x and then corrector


formula is applied to improve this value.

We describe two such methods namely

1. M ilne’s M ethod

2. Adams Bashforth M ethod

Milne’s Predictor –Corrector Method


Working rule:
Consider the initial value problem with a set of four points

y( x0 )  y0 , y( x1 )  y1, y( x2 )  y2 , y( x3 )  y3 , Here x0 , x1, x2 , x3 equally


spaced. To find y4 at the point x4

M ilne’s Predictor formula

Dr. A.H.Srinivasa, MIT, Mysore Page 9


Module – I Engineering Mathematics - IV 2017

y4p  y0 
4h
2 f1  f 2  2 f 3 
3
Milne’s Corrector formula

y 4c  y 2 
h
3

f 2  4 f 3  f 4p  where f 4p 
dy
dx
 f ( x4 , y 4p )

To improve the accuracy again apply corrector formula by assuming

y 4c1  y4c

y4c1  y2 
h
3

f 2  4 f 3  f 4c  where f 4c 
dy
dx
 f ( x4 , y 4c )

Worked Examples

1. Using Milne’s method, find y(0.8), given y   x  y given y(0) = 0, y(0.2) =


2

0.0200, y(0.4) = 0.0795, y(0.6) = 0.1762.

Solution:- Construct the table by using given values

 f  x, y   x  y 2
dy
x y
dx
x0  0 y0  0 f 0  0  (0) 2  0
x1  0.2 y1  0.0200 f1  0.2  (0.0200) 2  0.1996
x2  0.4 y 2  0.0795 f 2  0.4  (0.0795) 2  0.3937
x3  0.6 y3  0.1762 f 3  0.6  (0.1799) 2  0.5689
x4  0.8 y4  ?

By M ilne’s Predictor formula

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  0
4(0.2)
2(0.1996)  0.3937  20.5689
3
y 4p  0.30488

By M ilne’s Corrector formula

Dr. A.H.Srinivasa, MIT, Mysore Page 10


Module – I Engineering Mathematics - IV 2017

y 4c  y 2 
h
3

f 2  4 f 3  f 4p f 4p  x4  y 4p  0.7070

y 4c  0.0795 
0.2
0.3937  40.5689 f 3  0.7070
3
y 4c  0.3045

c
To improve the accuracy of our results substitute the y 4 in corrector formula
Milne’s Predictor formula

4 
c1
y2 
h
3

f 2  4 f 3  f 4c   
2
f 4c  x4  y 4c  0.70723

y 4c1  0.0795 
0.2
0.3937  40.5689  0.7072
3
y 4c1  0.3046

2. Compute y(0.4), by applying Milne’s predictor corrector method. Use


corrector formula twice for the differential equation. Given
dy x 0 0.1 0.2 0.3
 2e x  y and
dx y 2 2.010 2.04 2.09
Solution:- Construct the table by using given values

 f x, y   2e x  y
dy
x y
dx
x0  0 y0  2 f 0  2e 0  2  0.0
x1  0.1 y1  2.010 f1  2e 0.1  2.010  0.20034
x2  0.2 y 2  2.04 f 2  2e 0.2  2.04  0.40281
x3  0.3 y3  2.09 f 3  2e 0.3  2.09  0.60972
x4  0.4 y4  ?

By M ilne’s Predictor formula

Dr. A.H.Srinivasa, MIT, Mysore Page 11


Module – I Engineering Mathematics - IV 2017

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  2 
4(0.1)
2(0.20034)  0.40281  20.60972
3
y 4p  2.16231
By M ilne’s Corrector formula

y4c  y2 
h
3

f 2  4 f 3  f 4p  f 4p  2e x4  y4p  0.82134

y4c  2.04 
0.1
0.40281 40.60972  0.82134
3
y4c  2.1620

c
To improve the accuracy of our results substitute the y 4 in corrector formula

y 4c1  y 2 
h
3

f 2  4 f 3  f 4c 
f 4c  2e x4  y 4c  0.82155

y 4c1  2.04 
0.1
0.40281  40.60972  0.82155
3
y 4c1  2.16211

It is the required value of y at x = 0.4

dy x y
3. Find y at x = 0.3, using applying Milne’s method. Given  and
dx 2
x  0.1 0 0.1 0.2
y 0.90878 1 1.11145 1.25253

Solution:- Construct the table by using given values

Dr. A.H.Srinivasa, MIT, Mysore Page 12


Module – I Engineering Mathematics - IV 2017

x y
 f  x, y  
dy
x y y 
dx 2
x0  0.1 y 0  0.90878 f 0  0.40439
x1  0 y1  1.0000 f1  0.5
x 2  0.1 y 2  1.11145 f 2  0.605725
x3  0.2 y3  1.25253 f 3  0.72626
x 4  0.3 y4  ? ?

By M ilne’s Predictor formula

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  0.90878 
4(0.1)
2(0.5)  0.60572  20.72626
3
y 4p  1.15502

By M ilne’s Corrector formula

y 4c  y 2 
h
3

f 2  4 f 3  f 4p 
x 4  y 4p
f 4p   0.72751
2
y 4c  1.11145 
0.1
0.60572  40.72626  0.72751
3
y 4c  1.25272

c
To improve the accuracy of our results substitute the y 4 in corrector formula

y 4c1  y 2 
h
3

f 2  4 f 3  f 4c 
x4  y 4c
f4 
c
 0.77636
2
y 4c1  1.11145 
0.1
0.60572  40.72626  0.77636
3
y 41 MIT,
c
Dr. A.H.Srinivasa, Mysore
1.25435 Page 13
Module – I Engineering Mathematics - IV 2017

It is the required value of y at x = 0.3

4. Find y at x = 4.4 using Milne’s method. Given

x 4.0 4.1 4.2 4.3 5xy  2  y 2  0 and


y 1 1.0049 1.0097 1.0143

Solution:- Construct the table by using given values


2  y2
 f  x, y  
dy
x y y 
dx 5x
2  y0 2
x0  4 y0  1 f0   0.05
5 x0
2  y12
x1  4.1 y1  1.0049 f1   0.0485
5 x1
2  y2 2
x 2  4.2 y 2  1.0097 f2   0.0467
5 x2
2  y3 2
x3  4.3 y3  1.0143 f3   0.0452
5 x3
x 4  4.4 y4  ? ?

By M ilne’s Predictor formula

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  1 
4(0.1)
2(0.0485)  0.0467  20.0452
3
y 4p  1.01876

By M ilne’s Corrector formula

y 4c  y 2 
h
3

f 2  4 f 3  f 4p 
2  y p 2
f 4p  4
 0.04373
5x4

y 4  1.0097
c
Dr. A.H.Srinivasa,
0.1

MIT,Mysore0.0467  40.0456  0.04373 Page 14
3
y 4c  1.00909
Module – I Engineering Mathematics - IV 2017

c
To improve the accuracy of our results substitute the y 4 in corrector formula

y 4c1  y 2 
h
3

f 2  4 f 3  f 4c 
2  y 
c 2
f 4p  4
 0.04462
5x4

y 4c1  1.0097 
0.1
0.0467  40.0452  0.04462
3
y 4c1  1.01877

It is the required value of y at x = 4.4

5. Find y at x = 0.4 using Milne’s method. Given


y   xy  y 2 , y (0)  1, y (0.1)  1.1169,
y (0.2)  1.2773, y (0.3)  1.5049

Solution: - Construct the table by using given values

x y y   f x, y   xy  y 2
x0  0 y0  1 f 0  x0 y0  y02  1
x1  0.1 y1  1.1169 f1  x1 y1  y12  1.3592
x2  0.2 y 2  1.2773 f 2  x2 y 2  y 22  1.887
x3  0.3 y3  1.5049 f 3  x3 y3  y32  2.7162
x4  0.4 y4  ? ?

By M ilne’s Predictor formula

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  1 
4(0.1)
2(1.3592)  1.887  22.7162
3
Dr. A.H.Srinivasa, MIT, Mysore Page 15
y 4p  1.8352
Module – I Engineering Mathematics - IV 2017

By M ilne’s Corrector formula

y 4c  y 2 
h
3

f 2  4 f 3  f 4p 
f 4p  x 4 y 4  y 4p   2
 4.1020

y 4c  1.2773 
0.1
1.887  42.7162  4.102  1.8391
3
c
To improve the accuracy of our results substitute the y 4 in corrector
formula c1 h
y4  y2 
3
c
f c
2  4 f3  f 4
c 2
  
f 4  x4 y 4  y 4  4.1179

y 4c1  1.2773 
0.1
1.887  42.7162  4.1179
3
y 4c1  1.8396
It is the required value of y at x = 0.4

II . Adams Bashforth Predictor Corrector M ethod

Working rule:
Consider the initial value problem with a set of four points

y( x0 )  y0 , y( x1 )  y1, y( x2 )  y2 , y( x3 )  y3 , Here x0 , x1, x2 , x3 equally


spaced. To find y4 at the point x4

Adams-Bashforth Predictor formula


h
y4p  y3 55 f 3  59 f 2  37 f1  9 f 0 
24
Adams-Bashforth Corrector formula

y4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p  dy
W here f 4p   f ( x4 , y 4p )
dx

Dr. A.H.Srinivasa, MIT, Mysore Page 16


Module – I Engineering Mathematics - IV 2017
To improve the accuracy again apply corrector formula by assuming

y 4c1  y 4c

y4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4c 
W here dy
f 4c   f ( x4 , y4c )
dx

Example: 1
xy
Find y(0.4), by applying Adams-Bashforth method given that y  and
2

x 0 0.1 0.2 0.3


y 1 1.0025 1.0101 1.0228

Solution:- Construct the table by using given values

 f  x, y  
dy xy
x y
dx 2
x0  0 y0  1 f0  0
x1  0.1 y1  1.0025 f1  0.0501
x2  0.2 y 2  1.0101 f 2  0.1010
x3  0.3 y3  0.1762 f 3  0.1534
x4  0.4 y4  ?

Adams-Bashforth Predictor formula

y 4p  y3 
h
55 f 3  59 f 2  37 f1  9 f 0 
24
y 4p  1.0228 
0.1
55(0.1534)  59(0.1010)  37(0.05012)1  9(0)
24
y 4p  1.0408
Dr. A.H.Srinivasa, MIT, Mysore Page 17
Module – I Engineering Mathematics - IV 2017

Adams-Bashforth Corrector formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p 
x4 y 4p (0.4)(1.0408)
f 4p   0.2081
2 2
y 4c  1.0228 
0.1
0.0501  5(0.1010)  19(0.1534)  9(0.2081)
24
y 4c  1.0408

Example. 2 Given y  x 2 (1  y), y(1)  1, y(1.1)  1.233, y(1.2)  1.548, y(1.3)  1.979

determine y(1.4) by Adams- Bashforth method

Solution:- Construct the table by using given values

x y y  f x, y   x 2 (1  y )
x0  1 y0  1 f0  x02 (1  y 0 )  2
x1  1.1 y1  1.233 f1  x12 (1  y1 )  2.702
x2  1.2 y 2  1.548 f2  x22 (1  y 2 )  3.669
x3  1.3 y3  1.979 f3  x32 (1  y3 )  5.035
x4  1.4 y4  ? ?

Adams-Bashforth Predictor formula

y 4p  y3 
h
55 f 3  59 f 2  37 f1  9 f 0 
24
y 4p  1.979 
0.1
55(5.035)  59(3.669)  37(2.702)  9(2)
24
y 4p  2.572

Dr. A.H.Srinivasa, MIT, Mysore Page 18


Module – I Engineering Mathematics - IV 2017
Adams-Bashforth Corrector formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p
f 4p  x42 (1  y 4p )  (1.4) 2 (1  2.572)  7.001

y 4c  1.979 
0.1
2.702  5(3.669)  19(5.035)  9(7.001)
24
y 4c  2.575

To correct this solution again apply Adams-Bashforth Corrector formula,

Substitute y4c in y4c1


y 4c1  y3 
h
24
 
f1  5 f 2  19 f 3  9 f 4c

f 4c  x4 (1  y 4c )  (1.4) 2 (1  2.575)  7.007


2

y 4c1  1.979 
0.1
2.702  5(3.669)  19(5.035)  9(7.007)
24
y 4c1  2.575
Example. 3 Given dy
 2e x y, y(0)  2, y(0.1)  2.4725, y(0.2)  3.1261, y(0.3)  4.0524
dx
determine y(0.4) by Adams- Bashforth method.

Solution:- Construct the table by using given values

x y y   f x, y   2e x y )
x0  0 y0  1 f0  4
x1  0.1 y1  2.4725 f1  5.4652
x2  0.2 y 2  3.1261 f 2  7.6364
x3  0.3 y3  4.0524 f 3  10.9406
x4  0.4 y4  ? ?

Adams-Bashforth Predictor formula

y 4p  y3 
h
55 f 3  59 f 2  37 f1  9 f 0 
24
y 4p  4.0524 
0.1
55(10.9406)  59(7.6364)  37(5.4652)  9(4)
24
Dr.yA.H.Srinivasa, MIT, Mysore Page 19
4  5.3749
p
Module – I Engineering Mathematics - IV 2017

Adams-Bashforth Corrector formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p 
f 4p  2 y 4p e x 4  2(5.3749)e 0.4  16.0366

y 4c  4.0524 
0.1
5.4652  5(7.6364)  19(10.9406)  9(16.0366)
24
y 4c  5.3835

To correct this solution again apply Adams-Bashforth Corrector formula,

Substitute y4c in y4c1


y 4c1  y3 
h
24

f1  5 f 2  19 f 3  9 f 4c 
f 4c  2 y 4 e  2(5.33835)e 0.4  16.06248
c x4

y 4c1  4.0524 
0.1
5.4652  5(7.6364)  19(10.9406)  9(16.0624)
24
y 4c1  5.3845
Example. 4

Solve the differential equation


dy
 x  y 2 , at x  0.8 given y(0)  0, y(0.2)  0.02, y(0.4)  0.0795, y(0.6)  0.1762
dx
Using Adams- Bashforth method

Solution:- Construct the table by using given values

 f  x, y   x  y 2
dy
x y
dx
x0  0 y0  0 f0  0
x1  0.2 y1  0.02 f1  0.1996
x2  0.4 y 2  0.0795 f 2  0.3936
x3  0.6 y3  0.1762 f 3  0.5689
x4  0.8 y4  ? ?

Dr. A.H.Srinivasa, MIT, Mysore Page 20


Module – I Engineering Mathematics - IV 2017
Adams-Bashforth Predictor formula

y 4p  y3 
h
55 f 3  59 f 2  37 f1  9 f 0 
24
y 4p  0.1762 
0.2
55(0.5689)  59(0.3936)  37(0.1996)  9(0)
24
y 4p  0.30495
Adams-Bashforth Corrector formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p 
 
f 4p  x4  y 4p
2
 0.8  (0.3049) 2  0.70701

y 4c  0.1762 
0.2
0.1996  5(0.3936)  19(0.56895)  9(0.70701)
24
y 4c  0.30457

To correct this solution again apply Adams-Bashforth Corrector formula,

Substitute y4c in y4c1

y 4c1  y3 
h

24
f1  5 f 2  19 f 3  9 f 4c 
f 4c  x4  y  p 2
4  0.8  (0.30457) 2  0.70724

y 4c  0.1762 
0.2
0.1996  5(0.3936)  19(0.56895)  9(0.70724)
24
y 4c  0.30459

Example. 5

Solve the differential equation

dy x2
 , at x  1.0 given y (0)  1, y (0.25)  1.0026,
dx 1  y 2
y (0.5)  1.0206, y (0.75)  1.0679
Dr. A.H.Srinivasa, MIT, Mysore Page 21
Module – I Engineering Mathematics - IV 2017

Solution:- Construct the table by using given values

x2
 f  x, y  
dy
x y
dx 1 y2
x0  0 y0  1 f0  1
x1  0.25 y1  1.0026 f1  0.0312
x2  0.5 y 2  1.0206 f 2  0.1225
x3  0.75 y3  1.0679 f 3  0.2628
x4  1.0 y4  ? ?

Adams-Bashforth Predictor formula


h
55 f 3  59 f 2  37 f1  9 f 0 
y 4p  y3 
24
y 4p  1.0679 
0.25
55(0.2628)  59(0.1225)  37(0.0312)  9(0)
24
y 4p  1Corrector
Adams-Bashforth
.1552 formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p 
x42 12
f 4p    0.4284
 
1 y p
2
4
1  1.15522

y 4c  1.0679 
0.25
0.0312  5(0.1224)  19(0.2628)  9(0.4284)
24
y 4c  1.154

To correct this solution again apply Adams-Bashforth Corrector formula,

Substitute y4c in y4c1

y 4c1  y3 
h
24

f1  5 f 2  19 f 3  9 f 4c 
2
x4 12
f4 
c
  0.4289
 
1 MIT,
Dr. A.H.Srinivasa,
c 2
 yMysore
4
1  1 . 154 2
Page 22

y 4c  1.0679 
0.25
0.0312  5(0.1224)  19(0.2628)  9(0.4289)
24
c
Module – I Engineering Mathematics - IV 2017

Numerical Solution of Ordinary Differential


Equations of First order and first degree
Introduction
Many ordinary differential equations can be solved by analytical methods
discussed earlier giving closed form solutions i.e. expressing y in terms of a
finite number of elementary functions of x. However, a majority of differential
equations appearing in physical problems cannot be solved analytically. Thus it
becomes imperative to discuss their solution by numerical methods.

Numerical methods for Initial value problem:


Consider the first order and first degree differential equations ( )with
the initial condition ( ) that is and called initial value
problem.

We discuss the following numerical methods for solving an initial value


problem.

1. Taylor’s series method


2. Modified Euler’s method
3. Runge - Kutta method of order IV
4. Milne’s Predictor - Corrector Method
5. Adams – Bashforth Predictor - Corrector Method

Type -1
Taylor’s series method
Consider the first order and first degree differential equations
( ) condition ( ) .

Taylor’s series expansion of ( ) in powers of ( ) is

Dr. A.H.Srinivasa, MIT, Mysore Page 23


Module – I Engineering Mathematics - IV 2017
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Where
at the point( )

Worked Examples
1. Using Taylor’s Series method, find the value of y at x = 0.1, and x = 0.2 for

the initial value problem ( )

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ( ) ( ) ( ) [( )( ) ( ) ] [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) [( )( )
( )( )] ( ) ( ) ( ) ( ) [ ( ) ]

Substitute the values of ( ) ( ) ( ) ( ) in equation (*)

( )

Dr. A.H.Srinivasa, MIT, Mysore Page 24


Module – I Engineering Mathematics - IV 2017

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1. x = 0.2


( ) ( ) ( ) ( )

( ) ( ) ( ) ( )

2. Using Taylor’s Series method, find the value of y at x = 0.1, and x = 0.2 for

the initial value problem ( )

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( )( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( )( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( )
( )( ) ( )( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( )
( )( ) ( )( ) ( ) [ ( ) ]

Dr. A.H.Srinivasa, MIT, Mysore Page 25


Module – I Engineering Mathematics - IV 2017
Substitute the values of ( ) ( ) ( ) ( ) in equation (*)

( ) ( ) ( ) ( ) ( )

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1 and x = 0.2


( ) ( )
( ) ( )

( ) ( )
( ) ( )

3. Using Taylor’s Series method, find the value of y at x = 0.1, and x = 0.2, for

the initial value problem ( )

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( ) ( ) [ ( ) ]
( )

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( ) [ ( ) ]
(

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ]

Differentiate w.r.t we get,

Dr. A.H.Srinivasa, MIT, Mysore Page 26


Module – I Engineering Mathematics - IV 2017
( ) ( ) ( ) ( ) ( ) ( )
[ ( ) ]

Substitute the values of ( ) ( ) ( ) ( ) in equation (*)

( ) ( ) ( ) ( ) ( )

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1 and x = 0.2


( ) ( ) ( )
( ) ( )

( ) ( ) ( )
( ) ( )

4. Using Taylor’s Series method, solve the initial value problem

( ) and hence find the value of y at x = 0.1

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( )( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

Dr. A.H.Srinivasa, MIT, Mysore Page 27


Module – I Engineering Mathematics - IV 2017
( ) ( ) ( ) ( ) ( )( ) ( ) [ ( ) ]

Substitute the values of ( ) ( ) ( ) ( ) in equation (*)

( ) ( ) ( ) ( ) ( )

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1
( ) ( ) ( )
( ) ( )

5. Using Taylor’s Series method, solve the initial value problem

( ) and hence find the value of y at x = 0.1 and 0.2

Solution:

Taylor’s Series expansion of ( ) about a point is given by

( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )

Here, compare ( )  ( ) , then and

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( ) ( ) ( ) ( )( ) [ ( ) ]

Differentiate w.r.t we get,

( ) ( )[ ( )] ( ) ( )( ) ( )
[ ( ) ]

Differentiate w.r.t we get,

Dr. A.H.Srinivasa, MIT, Mysore Page 28


Module – I Engineering Mathematics - IV 2017
( ) ( ) ( ) ( ) ( ) ( )( ) ( )( )
[ ( ) ]

Substitute the values of ( ) ( ) ( ) ( ) in equation (1)

( ) ( ) ( ) ( ) ( )

( )
This is called Taylors series expansion up to fourth degree term.

Put x = 0.1 and x = 0.2


( ) ( )
( ) ( ) ( )

( ) ( )
( ) ( ) ( )

Type - 2
Modified Euler’s method
dy
Consider the initial value problem  f ( x, y ); y ( x0 )  y0
dx
Suppose we determine solution of this problem at a point xn  x0  nh (where
h is step length) by using Euler's method

The solution is given by yn  yn 1  hf ( xn 1 , yn 1 ), n  1,2,3,...


p

Here, this will gives approximate solution by Euler’s method. Since the
accuracy is poor in this formula this value

Example. 1 Using modified Euler's method find y(0.2) by solving the equation

with h = 0.1 dy
 x  y 2 ; y (0)  1
dx
Solution:- By data

x x0  0 x1  0.1 x2  0.2
h  0.1 f ( x, y)  x  y 2
y y0  1 y1  ? y2  ?

Dr. A.H.Srinivasa, MIT, Mysore Page 29


Module – I Engineering Mathematics - IV 2017
This problem has to be worked in two stages for finding y(0.2)

Stage 1:- First to calculate the y(0.1) y1 From Euler’s formula


y1p  y 0  hf ( x0 , y 0 )

y1p  y 0  h x0  y 02 
y1p  1  0.10  (1)  2

y1p  0.9

By modified Euler’s formula, we have

y1c1  y0 
h
2
 f x , y   f x , y 
0 0 1 1
p

x  y    x  y  
h    p 2
y1c1  y0  0
2
0 1 1
2

y1c1  1
0.1
2
 1  0.1  0.9  2

y1c1  1  0.05 0.9  0.9    0.91452

The second Modified value of y1

y1c2  y0 
h

2
 
  

x0  y02   x1  y1c1
2

y1c2  1  0.05 0.9  0.9145   0.9132


2

The Third Modified value of y1

y1c3  y 0 
h

2
 
  

x0  y02   x1  y1c2
2

y1c3  1  0.05 0.9  0.9132   0.9133 2

y1  y (0.1)  0.9133

Dr. A.H.Srinivasa, MIT, Mysore Page 30


Module – I Engineering Mathematics - IV 2017

Type – 4
Predictor - Corrector Method
In the predictor – Corrector methods, Four prior values are required for finding
the value of y at x. These Four values may be given or extract using the initial
condition by Taylors series

A predictor formula is used to predict the value of y at x and then corrector


formula is applied to improve this value.

We describe two such methods namely

1. M ilne’s M ethod

2. Adams Bashforth M ethod

Milne’s Predictor –Corrector Method


Working rule:
Consider the initial value problem with a set of four points

y( x0 )  y0 , y( x1 )  y1, y( x2 )  y2 , y( x3 )  y3 , Here x0 , x1, x2 , x3 equally


spaced. To find y4 at the point x4

M ilne’s Predictor formula

Dr. A.H.Srinivasa, MIT, Mysore Page 31


Module – I Engineering Mathematics - IV 2017

y4p  y0 
4h
2 f1  f 2  2 f 3 
3
Milne’s Corrector formula

y 4c  y 2 
h
3

f 2  4 f 3  f 4p  where f 4p 
dy
dx
 f ( x4 , y 4p )

To improve the accuracy again apply corrector formula by assuming

y 4c1  y4c

y4c1  y2 
h
3

f 2  4 f 3  f 4c  where f 4c 
dy
dx
 f ( x4 , y 4c )

Worked Examples

1. Using Milne’s method, find y(0.8), given y   x  y given y(0) = 0, y(0.2) =


2

0.0200, y(0.4) = 0.0795, y(0.6) = 0.1762.

Solution:- Construct the table by using given values

 f  x, y   x  y 2
dy
x y
dx
x0  0 y0  0 f 0  0  (0) 2  0
x1  0.2 y1  0.0200 f1  0.2  (0.0200) 2  0.1996
x2  0.4 y 2  0.0795 f 2  0.4  (0.0795) 2  0.3937
x3  0.6 y3  0.1762 f 3  0.6  (0.1799) 2  0.5689
x4  0.8 y4  ?

By M ilne’s Predictor formula

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  0
4(0.2)
2(0.1996)  0.3937  20.5689
3
y 4p  0.30488

By M ilne’s Corrector formula

Dr. A.H.Srinivasa, MIT, Mysore Page 32


Module – I Engineering Mathematics - IV 2017

y 4c  y 2 
h
3

f 2  4 f 3  f 4p f 4p  x4  y 4p  0.7070

y 4c  0.0795 
0.2
0.3937  40.5689 f 3  0.7070
3
y 4c  0.3045

c
To improve the accuracy of our results substitute the y 4 in corrector formula
Milne’s Predictor formula

4 
c1
y2 
h
3

f 2  4 f 3  f 4c   
2
f 4c  x4  y 4c  0.70723

y 4c1  0.0795 
0.2
0.3937  40.5689  0.7072
3
y 4c1  0.3046

2. Compute y(0.4), by applying Milne’s predictor corrector method. Use


corrector formula twice for the differential equation. Given
dy x 0 0.1 0.2 0.3
 2e x  y and
dx y 2 2.010 2.04 2.09
Solution:- Construct the table by using given values

 f x, y   2e x  y
dy
x y
dx
x0  0 y0  2 f 0  2e 0  2  0.0
x1  0.1 y1  2.010 f1  2e 0.1  2.010  0.20034
x2  0.2 y 2  2.04 f 2  2e 0.2  2.04  0.40281
x3  0.3 y3  2.09 f 3  2e 0.3  2.09  0.60972
x4  0.4 y4  ?

By M ilne’s Predictor formula

Dr. A.H.Srinivasa, MIT, Mysore Page 33


Module – I Engineering Mathematics - IV 2017

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  2 
4(0.1)
2(0.20034)  0.40281  20.60972
3
y 4p  2.16231
By M ilne’s Corrector formula

y4c  y2 
h
3

f 2  4 f 3  f 4p  f 4p  2e x4  y4p  0.82134

y4c  2.04 
0.1
0.40281 40.60972  0.82134
3
y4c  2.1620

c
To improve the accuracy of our results substitute the y 4 in corrector formula

y 4c1  y 2 
h
3

f 2  4 f 3  f 4c 
f 4c  2e x4  y 4c  0.82155

y 4c1  2.04 
0.1
0.40281  40.60972  0.82155
3
y 4c1  2.16211

It is the required value of y at x = 0.4

dy x y
3. Find y at x = 0.3, using applying Milne’s method. Given  and
dx 2
x  0.1 0 0.1 0.2
y 0.90878 1 1.11145 1.25253

Solution:- Construct the table by using given values

Dr. A.H.Srinivasa, MIT, Mysore Page 34


Module – I Engineering Mathematics - IV 2017

x y
 f  x, y  
dy
x y y 
dx 2
x0  0.1 y 0  0.90878 f 0  0.40439
x1  0 y1  1.0000 f1  0.5
x 2  0.1 y 2  1.11145 f 2  0.605725
x3  0.2 y3  1.25253 f 3  0.72626
x 4  0.3 y4  ? ?

By M ilne’s Predictor formula

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  0.90878 
4(0.1)
2(0.5)  0.60572  20.72626
3
y 4p  1.15502

By M ilne’s Corrector formula

y 4c  y 2 
h
3

f 2  4 f 3  f 4p 
x 4  y 4p
f 4p   0.72751
2
y 4c  1.11145 
0.1
0.60572  40.72626  0.72751
3
y 4c  1.25272

c
To improve the accuracy of our results substitute the y 4 in corrector formula

y 4c1  y 2 
h
3

f 2  4 f 3  f 4c 
x4  y 4c
f4 
c
 0.77636
2
y 4c1  1.11145 
0.1
0.60572  40.72626  0.77636
3
y 41 MIT,
c
Dr. A.H.Srinivasa, Mysore
1.25435 Page 35
Module – I Engineering Mathematics - IV 2017

It is the required value of y at x = 0.3

4. Find y at x = 4.4 using Milne’s method. Given

x 4.0 4.1 4.2 4.3 5xy  2  y 2  0 and


y 1 1.0049 1.0097 1.0143

Solution:- Construct the table by using given values


2  y2
 f  x, y  
dy
x y y 
dx 5x
2  y0 2
x0  4 y0  1 f0   0.05
5 x0
2  y12
x1  4.1 y1  1.0049 f1   0.0485
5 x1
2  y2 2
x 2  4.2 y 2  1.0097 f2   0.0467
5 x2
2  y3 2
x3  4.3 y3  1.0143 f3   0.0452
5 x3
x 4  4.4 y4  ? ?

By M ilne’s Predictor formula

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  1 
4(0.1)
2(0.0485)  0.0467  20.0452
3
y 4p  1.01876

By M ilne’s Corrector formula

y 4c  y 2 
h
3

f 2  4 f 3  f 4p 
2  y p 2
f 4p  4
 0.04373
5x4

y 4  1.0097
c
Dr. A.H.Srinivasa,
0.1

MIT,Mysore0.0467  40.0456  0.04373 Page 36
3
y 4c  1.00909
Module – I Engineering Mathematics - IV 2017

c
To improve the accuracy of our results substitute the y 4 in corrector formula

y 4c1  y 2 
h
3

f 2  4 f 3  f 4c 
2  y 
c 2
f 4p  4
 0.04462
5x4

y 4c1  1.0097 
0.1
0.0467  40.0452  0.04462
3
y 4c1  1.01877

It is the required value of y at x = 4.4

5. Find y at x = 0.4 using Milne’s method. Given


y   xy  y 2 , y (0)  1, y (0.1)  1.1169,
y (0.2)  1.2773, y (0.3)  1.5049

Solution: - Construct the table by using given values

x y y   f x, y   xy  y 2
x0  0 y0  1 f 0  x0 y0  y02  1
x1  0.1 y1  1.1169 f1  x1 y1  y12  1.3592
x2  0.2 y 2  1.2773 f 2  x2 y 2  y 22  1.887
x3  0.3 y3  1.5049 f 3  x3 y3  y32  2.7162
x4  0.4 y4  ? ?

By M ilne’s Predictor formula

y 4p  y0 
4h
2 f1  f 2  2 f 3 
3
y 4p  1 
4(0.1)
2(1.3592)  1.887  22.7162
3
Dr. A.H.Srinivasa, MIT, Mysore Page 37
y 4p  1.8352
Module – I Engineering Mathematics - IV 2017

By M ilne’s Corrector formula

y 4c  y 2 
h
3

f 2  4 f 3  f 4p 
f 4p  x 4 y 4  y 4p   2
 4.1020

y 4c  1.2773 
0.1
1.887  42.7162  4.102  1.8391
3
c
To improve the accuracy of our results substitute the y 4 in corrector
formula c1 h
y4  y2 
3
c
f c
2  4 f3  f 4
c 2
  
f 4  x4 y 4  y 4  4.1179

y 4c1  1.2773 
0.1
1.887  42.7162  4.1179
3
y 4c1  1.8396
It is the required value of y at x = 0.4

II . Adams Bashforth Predictor Corrector M ethod

Working rule:
Consider the initial value problem with a set of four points

y( x0 )  y0 , y( x1 )  y1, y( x2 )  y2 , y( x3 )  y3 , Here x0 , x1, x2 , x3 equally


spaced. To find y4 at the point x4

Adams-Bashforth Predictor formula


h
y4p  y3 55 f 3  59 f 2  37 f1  9 f 0 
24
Adams-Bashforth Corrector formula

y4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p  dy
W here f 4p   f ( x4 , y 4p )
dx

Dr. A.H.Srinivasa, MIT, Mysore Page 38


Module – I Engineering Mathematics - IV 2017
To improve the accuracy again apply corrector formula by assuming

y 4c1  y 4c

y4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4c 
W here dy
f 4c   f ( x4 , y4c )
dx

Example: 1
xy
Find y(0.4), by applying Adams-Bashforth method given that y  and
2

x 0 0.1 0.2 0.3


y 1 1.0025 1.0101 1.0228

Solution:- Construct the table by using given values

 f  x, y  
dy xy
x y
dx 2
x0  0 y0  1 f0  0
x1  0.1 y1  1.0025 f1  0.0501
x2  0.2 y 2  1.0101 f 2  0.1010
x3  0.3 y3  0.1762 f 3  0.1534
x4  0.4 y4  ?

Adams-Bashforth Predictor formula

y 4p  y3 
h
55 f 3  59 f 2  37 f1  9 f 0 
24
y 4p  1.0228 
0.1
55(0.1534)  59(0.1010)  37(0.05012)1  9(0)
24
y 4p  1.0408
Dr. A.H.Srinivasa, MIT, Mysore Page 39
Module – I Engineering Mathematics - IV 2017

Adams-Bashforth Corrector formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p 
x4 y 4p (0.4)(1.0408)
f 4p   0.2081
2 2
y 4c  1.0228 
0.1
0.0501  5(0.1010)  19(0.1534)  9(0.2081)
24
y 4c  1.0408

Example. 2 Given y  x 2 (1  y), y(1)  1, y(1.1)  1.233, y(1.2)  1.548, y(1.3)  1.979

determine y(1.4) by Adams- Bashforth method

Solution:- Construct the table by using given values

x y y  f x, y   x 2 (1  y )
x0  1 y0  1 f0  x02 (1  y 0 )  2
x1  1.1 y1  1.233 f1  x12 (1  y1 )  2.702
x2  1.2 y 2  1.548 f2  x22 (1  y 2 )  3.669
x3  1.3 y3  1.979 f3  x32 (1  y3 )  5.035
x4  1.4 y4  ? ?

Adams-Bashforth Predictor formula

y 4p  y3 
h
55 f 3  59 f 2  37 f1  9 f 0 
24
y 4p  1.979 
0.1
55(5.035)  59(3.669)  37(2.702)  9(2)
24
y 4p  2.572

Dr. A.H.Srinivasa, MIT, Mysore Page 40


Module – I Engineering Mathematics - IV 2017
Adams-Bashforth Corrector formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p
f 4p  x42 (1  y 4p )  (1.4) 2 (1  2.572)  7.001

y 4c  1.979 
0.1
2.702  5(3.669)  19(5.035)  9(7.001)
24
y 4c  2.575

To correct this solution again apply Adams-Bashforth Corrector formula,

Substitute y4c in y4c1


y 4c1  y3 
h
24
 
f1  5 f 2  19 f 3  9 f 4c

f 4c  x4 (1  y 4c )  (1.4) 2 (1  2.575)  7.007


2

y 4c1  1.979 
0.1
2.702  5(3.669)  19(5.035)  9(7.007)
24
y 4c1  2.575
Example. 3 Given dy
 2e x y, y(0)  2, y(0.1)  2.4725, y(0.2)  3.1261, y(0.3)  4.0524
dx
determine y(0.4) by Adams- Bashforth method.

Solution:- Construct the table by using given values

x y y   f x, y   2e x y )
x0  0 y0  1 f0  4
x1  0.1 y1  2.4725 f1  5.4652
x2  0.2 y 2  3.1261 f 2  7.6364
x3  0.3 y3  4.0524 f 3  10.9406
x4  0.4 y4  ? ?

Adams-Bashforth Predictor formula

y 4p  y3 
h
55 f 3  59 f 2  37 f1  9 f 0 
24
y 4p  4.0524 
0.1
55(10.9406)  59(7.6364)  37(5.4652)  9(4)
24
Dr.yA.H.Srinivasa, MIT, Mysore Page 41
4  5.3749
p
Module – I Engineering Mathematics - IV 2017

Adams-Bashforth Corrector formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p 
f 4p  2 y 4p e x 4  2(5.3749)e 0.4  16.0366

y 4c  4.0524 
0.1
5.4652  5(7.6364)  19(10.9406)  9(16.0366)
24
y 4c  5.3835

To correct this solution again apply Adams-Bashforth Corrector formula,

Substitute y4c in y4c1


y 4c1  y3 
h
24

f1  5 f 2  19 f 3  9 f 4c 
f 4c  2 y 4 e  2(5.33835)e 0.4  16.06248
c x4

y 4c1  4.0524 
0.1
5.4652  5(7.6364)  19(10.9406)  9(16.0624)
24
y 4c1  5.3845
Example. 4

Solve the differential equation


dy
 x  y 2 , at x  0.8 given y(0)  0, y(0.2)  0.02, y(0.4)  0.0795, y(0.6)  0.1762
dx
Using Adams- Bashforth method

Solution:- Construct the table by using given values

 f  x, y   x  y 2
dy
x y
dx
x0  0 y0  0 f0  0
x1  0.2 y1  0.02 f1  0.1996
x2  0.4 y 2  0.0795 f 2  0.3936
x3  0.6 y3  0.1762 f 3  0.5689
x4  0.8 y4  ? ?

Dr. A.H.Srinivasa, MIT, Mysore Page 42


Module – I Engineering Mathematics - IV 2017
Adams-Bashforth Predictor formula

y 4p  y3 
h
55 f 3  59 f 2  37 f1  9 f 0 
24
y 4p  0.1762 
0.2
55(0.5689)  59(0.3936)  37(0.1996)  9(0)
24
y 4p  0.30495
Adams-Bashforth Corrector formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p 
 
f 4p  x4  y 4p
2
 0.8  (0.3049) 2  0.70701

y 4c  0.1762 
0.2
0.1996  5(0.3936)  19(0.56895)  9(0.70701)
24
y 4c  0.30457

To correct this solution again apply Adams-Bashforth Corrector formula,

Substitute y4c in y4c1

y 4c1  y3 
h

24
f1  5 f 2  19 f 3  9 f 4c 
f 4c  x4  y  p 2
4  0.8  (0.30457) 2  0.70724

y 4c  0.1762 
0.2
0.1996  5(0.3936)  19(0.56895)  9(0.70724)
24
y 4c  0.30459

Example. 5

Solve the differential equation

dy x2
 , at x  1.0 given y (0)  1, y (0.25)  1.0026,
dx 1  y 2
y (0.5)  1.0206, y (0.75)  1.0679
Dr. A.H.Srinivasa, MIT, Mysore Page 43
Module – I Engineering Mathematics - IV 2017

Solution:- Construct the table by using given values

x2
 f  x, y  
dy
x y
dx 1 y2
x0  0 y0  1 f0  1
x1  0.25 y1  1.0026 f1  0.0312
x2  0.5 y 2  1.0206 f 2  0.1225
x3  0.75 y3  1.0679 f 3  0.2628
x4  1.0 y4  ? ?

Adams-Bashforth Predictor formula


h
55 f 3  59 f 2  37 f1  9 f 0 
y 4p  y3 
24
y 4p  1.0679 
0.25
55(0.2628)  59(0.1225)  37(0.0312)  9(0)
24
y 4p  1Corrector
Adams-Bashforth
.1552 formula

y 4c  y3 
h
24

f1  5 f 2  19 f 3  9 f 4p 
x42 12
f 4p    0.4284
 
1 y p
2
4
1  1.15522

y 4c  1.0679 
0.25
0.0312  5(0.1224)  19(0.2628)  9(0.4284)
24
y 4c  1.154

To correct this solution again apply Adams-Bashforth Corrector formula,

Substitute y4c in y4c1

y 4c1  y3 
h
24

f1  5 f 2  19 f 3  9 f 4c 
2
x4 12
f4 
c
  0.4289
 
1 MIT,
Dr. A.H.Srinivasa,
c 2
 yMysore
4
1  1 . 154 2
Page 44

y 4c  1.0679 
0.25
0.0312  5(0.1224)  19(0.2628)  9(0.4289)
24
c
Module – I Engineering Mathematics - IV 2017

Dr. A.H.Srinivasa, MIT, Mysore Page 45

También podría gustarte