You are on page 1of 66

vtu.allsyllabus.com www.allsyllabus.

com

Unit-II: Numerical Methods-II


Numerical solution of simultaneous first order differential equations

dy
= f(x, y, z) − − − − − −(1)
dx
dz
= φ(x, y, z) − − − − − −(2)
dx
with initial conditions y(x 0 ) = y 0 and z(x 0 ) = z 0

Picard’s method

m
Consider a first order simultaneo us differenti al equation

co
dy dz
= f(x, y, z) − − − − − −(1) = φ(x, y, z) − − − − − −(2)
dx dx

s.
with initial conditions y(x 0 ) = y 0 and z(x 0 ) = z 0
bu
The Picard' s iterative formula is given by
la

x
y n = y 0 + ∫ f(x, y n-1, zn-1 )dx − − − −(3)
yl

x 0
lls

x
z n = z 0 + ∫ φ(x, y n-1, z n-1 )dx − − − −(4)
x
.a

n = 1,2,3.....
w

__________________________________________________________
w

Problem (1):
w

dy
Using Picard' s Method find the second approximat ion of = x + z;
dx
dz
= x − y 2 ; y(0) = 2, z(0) = 1. Hence obtain the the values of y(0.1) and z(0.1)
dx

Soln: Given f (x, y, z ) = x + z ; φ(x, y, z ) = x − y 2

x0=0 x1=0.1
y0=2 y(x1)=?
z0=1 z(x1)=?

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

The Picard' s iterative formula is given by


x
y n = y 0 + ∫ f(x, y n-1, z n-1 )dx = y 0 +
x
∫ (x + z n-1 )dx 
x x 
 − − − −(1)
0 0

x x
z n = z 0 + ∫ φ(x, y n-1, z n-1 )dx = z 0 +
x 0
x

0
(x - (y n-1 )2 )
dx 

Put n = 1 in Eqn(1)
x x
y1 = y 0 + ∫ (x + z 0 )dx =2 + ∫ (x + 1)dx
x 0
0
x
 x2  x2
∴ y 1 = 2 +  + x  = 2 + x +
2 0 2

x x
 x - (y )2 dx = 1 +

m
z1 = z0 + ∫  0  ∫ (x - 4)dx
x 0

co
0

x
 x2  x2

s.
= 1+  − 4x  = 1 − 4x +
 2  2
 0
bu
Put n = 2 in Eqn(1)
la
x x 2
x
∫ (x + z1)dx =2 + ∫  x + 1 − 4x + dx
yl

y 2 = y0 +
2 
x 0 
lls

0
.a

x
 x 2  x 2 x3
y 2 = 2 + ∫ 1 − 3x +
w

dx = 2 + x − 3 + − − − (2)
 2  2 6
0 
w

 2  
2
x 
w

x x
z 2 = z0 + ∫  x - (y1) dx = 1 + ∫  x -  2 + x +
2  dx
   2  
x 0  
0  
x  x4 
= 1+ ∫  x -  4 + x2 + + 4x + x 3 + 2x 2  dx
  4 
0  
x x 4 
= 1 − ∫  4 + 3x + 3x 2 + x 3 + dx
 4 
0 
 x2 x 4 x 5 

= 1 − 4x + 3 3
+x + + − − − − − −(3)
 2 4 20 
 

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

From Eqn(2)

y(0.1) = 2 + (0.1) − 3
(0.1)2 + (0.1)3 = 2.1151
2 6
From Eqn(3)
 (0.1)2 + (0.1)3 + (0.1)4 + (0.1)5  = 0.5839
z(0.1) = 1 −  4(0.1) + 3
 2 4 20 
 

Problem (2):

Apply Picard' s Method to find the second approximat ion to y and z

m
dy dz 1
given that =z ; = x 3 (y + z ) ; y = 1 & z = when x = 0.
dx dx 2

co
Soln: Given f (x, y, z ) = z ; φ(x, y, z ) = x 3 (y + z)
x 0 = 0 , y 0 = 1 & z 0 = 1/2
s.
bu
The Picard' s iterative formula is given by
la

x x

yl

y n = y 0 + ∫ f(x, y n-1, z n-1 )dx = y 0 + ∫ z n-1dx


x x 
 − − − (1)
0 0
lls

x x
z n = z 0 + ∫ φ(x, y n-1, z n-1 )dx = z 0 + ∫ x (y n-1 + z n-1 )dx 
3
x x 
.a

0 0
w

Put n = 1 in Eqn(1)
w

x 1 xx
y 1 = y 0 + ∫ z 0 dx = 1 + dx = 1 +∫
w

x 0
0 2 2
x 1 x  1 1 3
z1 = z 0 + ∫ x 3 (y 0 + z 0 )dx = + ∫ x 3 1 + dx = + x 4
x 0 2 0  2 2 8

Put n = 2 in Eqn(1)
x x 1 3  x 3 5
y 2 = y 0 + ∫ z1dx = 1 + ∫  + x 4 dx = 1 + + x
x 0 2
0 8  2 40
x
z 2 = z 0 + ∫ x 3 (y 1 + z1 )dx
x 0

1 
x x   1 3 
= + ∫ x 3  1 +  +  + x 4  dx
2 0  2   2 8 
1 3 4 x5 3 8
= + x + + x
2 8 10 64
www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Put n = 3 in Eqn(1)
x  1 3x 4 x 5 3x 8 
x
y 3 = y 0 + ∫ z 2 dx = 1 + ∫  + + + dx
x 0
0 2 8 10 64 
x 3x 5 x 6 3x 9
= 1+ + + +
2 40 60 576
x
z 3 = z 0 + ∫ x 3 (y 2 + z 2 )dx
x 0

1 x 3  x x5   1 3 x5 x8 
= + ∫ x  1 + + 3  +  + x 4 + + 3  dx

m
2 0  2 40   2 8 10 64  
1 3 x5 3 8 x9 x 12

co
= + x4 + + x +7 +
2 8 10 64 360 256
__________________________________________________________

s.
Problem (3):
bu
Solve by using Picard' s Method successive approximat ion for x = 0.1& 0.2
dy dz
la
correct to three decimal places given that =x+z ; = x − y, y(0) = 0
dx dx
yl

and z(0) = 1.
lls

Soln: Given f (x, y, z ) = x + z ; φ(x, y, z ) = x − y


.a

x0=0 x1=0.1 x2=0.2


w

y0=0 y(x1)=? y(x2)=?


w

z0=1 z(x1)=? z(x2)=?


w

The Picard' s iterative formula is given by


(x + zn-1 )dx 
x x
y n = y 0 + ∫ f(x, y n-1, zn-1 )dx = y 0 + ∫
x x 
 − − − −(1)
0 0

x x
z n = z 0 + ∫ φ(x, y n-1, z n-1 )dx = z 0 + ∫ (x - y n-1 )dx 
x 0
x  0

Put n = 1 in Eqn(1)
0.1

(x + 1)dx =  x + x  = 0.105


2
x 0.1
y1 = y 0 + ∫ (x + z0 )dx = 0 + ∫
x 0
0 2 0
0.1
 2
(x - 0)dx = 1 +  x  = 1.005
x 0.1
z1 = z 0 + ∫ (x - y 0 )dx = 1 + ∫
x 0
0  2 0

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Put n = 2 in Eqn(1)
x 0.1
y2 = y0 + ∫ (x + z1 )dx = 0 + ∫ (x + 1.005 )dx
x 0
0
0.1
 x2 
y 2 =  + 1.005 x  = 0.105
2 0
0.1
x 0.1  x2 
z 2 = z 0 + ∫ (x - y 1 )dx = 1 + ∫ (x - 0.105 )dx = 1 +  − 0.105 x  = 0.994
x 0
0
 2 0
Put n = 3 in Eqn(1), we get
x 0.1
y3 = y0 + ∫ (x + z 2 )dx = 0 + ∫ (x + 0.994 )dx =0.105
x 0
0

m
x 0.1
z3 = z0 + ∫ (x − y 2 )dx = 1 + ∫ (x − 0.105 )dx =0.994
x 0

co
0

Thus y(0.1) = 0.105, z(0.1) = 0.994

s.
Now to find y(0.2) and z(0.3)
bu
Let x 0 = 0.1 , y 0 = 0.105 & z 0 = 0.994
la
yl

Put n = 1 in Eqn(1)
x 0.2
lls

y1 = y 0 + ∫ (x + z 0 )dx = 0.105 + ∫ (x + 0.994 )dx = 0.219


x 0
0.1
.a

x 0.2
z1 = z 0 + ∫ (x - y 0 )dx = 0.994 + ∫ (x - 0.105 )dx = 0.998
w

x 0
0.1
w

Put n = 2 in Eqn(1)
w

x 0.2
y2 = y0 + ∫ (x + z1 )dx = 0.105 + ∫ (x + 0.998 )dx = 0.219
x 0
0.1
x 0.2
z 2 = z0 + ∫ (x - y1 )dx = 0.994 + ∫ (x - 0.219 )dx = 0.987
x 0
0.1

Put n = 3 in Eqn(1)
x 0.2
y3 = y0 + ∫ (x + z 2 )dx = 0.105 + ∫ (x + 0.987 )dx = 0.219
x 0
0.1

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

x 0.2
z 3 = z 0 + ∫ (x - y 2 )dx = 0.994 + ∫ (x - 0.219 )dx
x 0
0.1
0.2
 x2 
∴ z 3 = 0.994 +  - 0.219x  = 0.987
 2 
 0.1

Since y 2 and y 3 are the same correct to three decimal places


y(0.2) = 0.219

Similarly z 2 and z3 are the same correct to three decimal

m
places z(0.2) = 0.987

co
Problem (4):

s.
Solve by using Picard' s Method of successive approximat ion for x = 0.1
bu
dy dz
correct to four decimal places given that = z − x and = y + x with
dx dx
la
y(0) = 1, z(0) = 1.
yl

Soln: Given f (x, y, z ) = z − x ; φ(x, y, z ) = y + x


lls

x0=0 x1=0.1
.a

y0=1 y(x1)=?
w

z0=1 z(x1)=?
w
w

The Picard' s iterative formula is given by


(zn-1 − x )dx 
x x
y n = y 0 + ∫ f(x, y n-1, zn-1 )dx = y 0 + ∫
x x 
 − − − −(1)
0 0

x x
z n = z 0 + ∫ φ(x, y n-1, z n-1 )dx = z 0 + ∫ (y n-1 + x )dx 
x 0
x 0

Put n = 1 in Eqn(1)
0.1

(1- x )dx = 1 +  x − x  = 1.095


2
x 0.1
y1 = y 0 + ∫ (z 0 − x )dx = 1 + ∫
x 0
0  2 0
0.1
x 0.1  x2 
z1 = z 0 + ∫ (y 0 + x )dx = 1 + ∫ (1 + x )dx = 1 +  x +  = 1.105
x 0
0  2 0

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Put n = 2 in Eqn(1)
x 0.1
y2 = y0 + ∫ (z1 − x )dx = 1 + ∫ (1.105 - x )dx
x 0
0
0.1
 x2 
∴ y 2 = 1 + 1.105x −  = 1.1055

 2 0

x 0.1
z2 = z0 + ∫ (y1 + x )dx = 1 + ∫ (1.095 + x )dx
x 0
0
0.1
 x2 
∴ z 2 = 1 + 1.095x +  = 1.1145
 2 0

om
Put n = 3 in Eqn(1)
x 0.1
y3 = y0 + ∫ (z 2 − x )dx = 1 + ∫ (1.1145 - x )dx

.c
x 0
0

 x2 
∴ y 3 = 1 + 1.1145x −  = 1.1064
 2 0
0.1 b us
la
yl

x 0.1
lls

z3 = z0 + ∫ (y 2 + x )dx = 1 + ∫ (1.1055 + x )dx


x 0
.a

0.1
 x 2
∴ z 3 = 1 +  1.1055x + 
w

= 1.1155
 2 
 0
w
w

Similarly
when n = 4 : y 4 = 1.1065 , z 4 = 1.1156
when n = 5 : y 5 = 1.1065 , z 5 = 1.1156

Since y 4 and y 5 are the same up to four decimal places


y(0.1) = 1.1065

Also since z 4 and z 5 are the same up to four decimal places,


z(0.1) = 1.1156

__________________________________________________________

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Problem (5):

Using Picard' s Method of successive approximat ion find the second order
approximat ion to the values of x and y. Given that x and y satisfy the
dx dy
equations = xy + t ; x(0) = 1 and = ty + x ; y(0) = −1. Deduce the
dt dt
values of x & y at t = 0.1

Soln: Given f (t, x, y ) = xy + t ; φ(t, x, y ) = ty + x

t0=0 t1=0.1
x0=1 x( t0)=?

m
y0=-1 z( t0)=?

co
The Picard' s iterative formula is given by

s.
t t
x n = x 0 + ∫ f(t, x n-1, y n-1 )dt = x 0 + ∫ (x n-1y n-1 + t )dt
bu
t 0
t 0

t t
y n = y 0 + ∫ φ(t, x n-1, y n-1 )dt = y 0 + ∫ (ty n-1 + x n-1 )dt
la
t 0
t 0
yl

Put n = 1 in Eqn(1)
ls

t
 t2 
l

t t t2
.a

x1 = x 0 + ∫ (x 0 y 0 + t )dt = 1 + ∫ (- 1 + t )dt = 1 +  - t +  = 1 - t +
t 0
0  2 0 2
w

t t t2
y1 = y 0 + ∫ (ty 0 + x 0 )dt = - 1 + ∫ (- t + 1)dx = −1 + t −
w

t 0
0 2
w

Put n = 2 in Eqn(1)
t t t 2
 t2  
x2 = x0 + ∫ (x 1y 1 + t )dt = 1 + ∫ 
1 - t +  − 1 + t −  + t dt
t 0
0
 2  2 
t t4   3t 2 2t 3 t 4 t 5 
= 1 + ∫  - 1 + 3t - 2t 2 + t 3 - dt = 1 - t + − + −  − −(2)
0 4  2 3 4 20 

  
2
t 2 
(ty 1 + x 1 )dt = - 1 + ∫ t − 1 + t − t
t t
y2 = y0 + ∫  + 1 - t + dt
t 0
0
 2  2 
t 3t 2 t 3   t3 t4 
= −1 + ∫ 1 - 2t + - dt = - 1 + t − t 2 + −  − − − (3)
0 2 2   2 8

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

From Equations (2) & (3)


x(0 .1) = 0.9143
y(0 .1) = -0.9095

__________________________________________________________

m
co
Numerical solution of Second order Ordinary differential equations

Suppose we wish to solve a second order O.D.E of the form


s.
bu
y // = F(x, y, y / ) - - - - - (1)
la
with initial conditions y(x 0 ) = y 0 and y / (x 0 ) = y 0/
yl
lls

Set y / = z − − − − − (2),
then Eqn(1) becomes z / = F(x, y, z ) − − − − − (3)
.a

with y(x 0 ) = y 0 & z(x 0 ) = y 0/


w
w

Thus the problem of solving second order O.D.E of form (1) is reduced to
w

a problem of solving a system of O.D.E' s given by Eqn(2) & Eqn(3).


dy dz
i.e, =z & = F(x, y, z) with y(x 0 ) = y 0 & z(x 0 ) = y 0/
dx dx
__________________________________________________________

Problem (1):

Using Picard' s Method obtain the second order approximat ion to the
solution at x = 1.1 and x = 1.2 of the differenti al equation
d2 y dy
2
+ y2 − x 3 = 0 ; y(1) = 1 = y / (1) correct to three decimal places.
dx dx

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

So ln :
dy
Set = z , then the given differenti al equation becomes
dx
dz
+ y 2z − x 3 = 0 with initial conditions y(1) = 1, z(1) = 1
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = x 3 − y 2z

x0=1 x1=1.1 x2=1.2


y0=1 y(x1)=? y(x2)=?

m
z0=1 z(x1)=? z(x2)=?

co
The Picard' s iterative formula is given by

s.
x
y n = y 0 + ∫ f(x, y n-1, z n-1 )dx =y 0 + ∫ z n-1dx  x

x x 
bu
 − − − (1)
0 0

x x
z n = z 0 + ∫ φ(x, y n-1, z n-1 )dx = z 0 + ∫ (x - y n-1z n-1 )dx 
3 2
x x 
la
0 0

Put n = 1 in Eqn(1)
yl

x 1.1 1.1
y1 = y 0 + ∫ z 0 dx =1 + ∫ 1dx =1 + (x )1 = 1.1
ls

x 0
1
1.1

(x - 1)dx = 1 +  − x 
 x4
l

x 1.1
(x - y z )dx = 1 +
.a

3 2 3
z1 = z 0 + ∫ 0 0 ∫
x 0
1 4 1
w

∴ z1 = 1.0160
w
w

Put n = 2 in Eqn(1)
x 1.1
y 2 = y 0 + ∫ z1dx =1 + ∫ (1.0160 )dx =1 + (1.0160x )1.1
1
x 0
1

∴ y 2 = 1.1061
x 1.1
z 2 = z0 +
x
∫ (x 3
- y 12 z1 )dx = 1 + ∫
1
(x 3
- 1.2293 )dx
0

1.1
 x4 
= 1 +  − 1.2293x  = 0.9930
 4 1

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

To find y(1.2)
Let x 0 = 1.1 ; y 0 = 1.1016 ; z0 = 0.9930

Put n = 1 in Eqn(1)
x 1.2
y1 = y 0 + ∫ z0 dx =1.1016 + ∫ 0.9930dx
x 0
1.1
∴ y1 = 1.1016 + (0.9930x )1.2 = 1.2009
1.1

x 1.2
 x 3 - y 2 z dx = 0.9930 +  x 3 - 1.2050 dx = 1.0248
∫ ∫

m
z1 = z0 +
 0 0  
x 1.1

co
0

s.
Put n = 2 in Eqn(1) bu
x 1.2
y 2 = y 0 + ∫ z1dx =1.1016 + ∫ 1.0248dx
la
x 0
1.1
∴ y 2 = 1.1016 + (1.0248 )1.2 = 1.2040
yl

1.1
lls

Problem(2):
Using Picard' s Method obtain the third order approximat e solution at x = 0.1
.a

d2 y dy
w

of the differenti al equation 2


+ 2x + y = 0 with y(0) = 0.5, y / (0) = 0.1
dx dx
w

correct to four places of decimal.


dy
w

Soln: Set = z , then the given differenti al equation becomes


dx
dz
+ 2xz + y = 0 with initial conditions y(0) = 0.5, z(0) = 0.1
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = -(y + 2xz )

x0=0 x1=0.1
y0=0.5 y(x1)=?
z0=0.1 z(x1)=?

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

The Picard' s iterative formula is given by


x x 
yn = y 0 + ∫ f(x, y , z
n-1 n-1)dx =y 0 ∫ zn-1dx
+ 

x 0
x  0
 − − − (1)
x x 
zn = z0 + ∫ φ(x, yn-1, zn-1)dx = z0 − ∫  y + 2xzn-1 dx 
 n-1  
x 0
x  0

Put n = 1 in Eqn(1)
x 0.1
y1 = y 0 + ∫ z 0 dx =0.5 + ∫ (0.1)dx =0.5 + (0.1x )0.1
0 = 0.51
x 0
0
x 0.1
z1 = z 0 + ∫ − (y 0 + 2xz 0 )dx = 0.1 - ∫ (0.5 + 2(x )(0.1) )dx

m
x 0
0
0.1

co
  x2  
∴ z1 = 0.1 -  0.5x + 0.2   = 0.049
  2  0

s.
bu
Put n = 2 in Eqn(1)
x 0.1
y 2 = y 0 + ∫ z1dx =0.5 + ∫ (0.049 )dx =0.5 + (0.049x )0.1
0 = 0.5049
la
x 0
0
yl

x 0.1
z 2 = z 0 + ∫ − (y 1 + 2xz1 )dx = 0.1 - ∫ (0.51 + 0.098x )dx
x 0
lls

0.1
  x2 
∴ z 2 = 0.1 -  0.51x + 0.098   = 0.0485
.a

  2  0
w

Put n = 3 in Eqn(1)
w

x 0.1
y 3 = y 0 + ∫ z 2 dx =0.5 + ∫ (0.0485 )dx =0.5 + (0.0485x )0.1
0 = 0.5048
x 0
w

∴ y(0.1) = 0.5048
__________________________________________________________

Problem (3):
Employing Picard' s Method find the third order approximat e solution at
d2 y dy
x = 0.2 of the differenti al equation 2
+ 3x − 6y = 0 with y(0) = 1
dx dx
and y / (0) = 0.1

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

dy
Soln: Set = z , then the given differenti al equation becomes
dx
dz
+ 3xz − 6y = 0 with initial conditions y(0) = 1, z(0) = 0.1
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = 6y - 3xz

x0=0 x1=0.2
y0=1 y(x1)=?
z0=0.1 z(x1)=?

m
co
The Picard' s iterative formula is given by
x x 
yn = y0 + ∫ f(x,yn-1,zn-1)dx =y0 + ∫ zn-1dx 

s.
x x 
0 0 
 − − − (1)
x x
  
bu
zn = z0 + ∫ φ(x,yn-1,zn-1)dx = z0 + ∫  6y - 3xzn-1dx
x x  n-1  
0 0 
la

Put n = 1 in Eqn(1)
yl

x 0.2
(0.1)dx =1 + (0.1x )0.2
ls

y 1 = y 0 + ∫ z 0 dx =1 + ∫ 0 = 1.02
x 0
0
l
.a

x 0.2
z1 = z 0 + ∫ (6y 0 − 3xz 0 )dx = 0.1 + ∫ (6 − 0.3(x ))dx
x 0
0
w

0.2
  x2 
∴ z1 = 0.1 +  6x − 0.3   = 1.294
w

  2  0
w

Put n = 2 in Eqn(1)
x 0.2
y 2 = y 0 + ∫ z1dx =1 + ∫ (1.294 )dx =1 + (1.294x )0.2
0 = 1.2588
x 0
0
x 0.2
z2 = z0 + ∫ (6y 1 − 3xz1 )dx = 0.1 + ∫ (6.12 - 3.882x )dx
x 0
0
0.2
  x2 
∴ z 2 = 0.1 +  6.12x − 3.882   = 1.2463
  2  0

Put n = 3 in Eqn(1)
x 0.2
y 3 = y 0 + ∫ z 2 dx =1 + ∫ (1.2463 )dx =1 + (1.2463x )0.2
0 = 1.2492
x 0
0

∴ y(0.2) = 1.2492
www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

__________________________________________________________

Problem (4):
Using Picard' s Method find the third order approximat e solution at x = 0.2
d2 y dy dy
of the differenti al equation 2 + x − y = 0 with y = 1, = 0 when x = 0.
dx dx dx

dy
Soln: Set = z , then the given differenti al equation becomes
dx
dz
+ xz − y = 0 with initial conditions y(0) = 1, z(0) = 0

om
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = y - xz

.c
x0=0 x1=0.2
y0=1 y(x1)=?
b us
z0=0 z(x1)=?
la

The Picard' s iterative formula is given by


yl

x x 

lls

yn = y 0 + ∫ f(x, yn-1, zn-1)dx =y 0 + ∫ zn-1dx


x x 
0 0 
.a

 − − − (1)
x x 
zn = z0 + ∫ φ(x, yn-1, zn-1)dx = z0 + ∫  y - zn-1x dx 
w

n -1
x x   
w

0 0 
w

Put n = 1 in Eqn(1)
x 0.2
y1 = y 0 + ∫ z0 dx =1 + ∫ (0 )dx =1
x 0
0
x 0.2
z1 = z0 + ∫ y 0 − xz0 dx = 0 + ∫ (1 − 0 )dx = 0.2
( )
x 0
0

Put n = 2 in Eqn(1)
x 0.2
y 2 = y 0 + ∫ z1dx =1 + ∫ (0.2)dx =1 + (0.2x )0.2 = 1.04
0
x 0
0
www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

x 0.2
z 2 = z0 + ∫ (y1 − xz1)dx = 0 + ∫ (1 - 0.2x )dx
x 0
0
0.2
  x2  
∴ z 2 =  x − 0.2  = 0.196
  2 
   0

Put n = 3 in Eqn(1)
x 0.2
y 3 = y 0 + ∫ z 2dx =1 + ∫ (0.196 )dx =1 + (0.196x )0.2 = 1.0392
0
x 0
0

m
∴ y = 1.0392

co
_________________________________________________________

s.
Problem (5): bu
By using Picard' s Method find the third order approximat e solution when
d2 y
la
x = 0.1 and x = 0.2 of the differenti al equation + xy = 0 with initial
dx 2
yl

conditions y(0) = 1, y / (0) = 0.5


lls

dy
Soln: Set = z , then the given differenti al equation becomes
dx
.a

dz
+ xy = 0 with initial conditions y(0) = 1, z(0) = 0.5
w

dx
∴ f (x, y, z ) = z & φ (x, y, z ) = -xy
w
w

x0=0 x1=0.1 x2=0.2


y0=1 y(x1)=? y(x2)=?
z0=0.5 z(x1)=? z(x2)=?

The Picard' s iterative formula is given by


x x 
y n = y 0 + ∫ f(x, y n-1, zn-1)dx =y 0 + ∫ zn-1dx 
x x 
0 0 
 − − − (1)
x x 
zn = z 0 + ∫ φ(x, y n-1, zn-1)dx = z 0 + ∫ − xyn-1dx 
x x 
0 0 

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Put n = 1 in Eqn(1)
x 0.1
y1 = y 0 + ∫ z0 dx =1 + ∫ (0.5 )dx =1 + (0.5x )0.1 = 1.05
0
x 00

0.1
x 0.1  x2 
z1 = z0 − ∫ (xy 0 )dx = 0.5 − ∫ (x )dx = 0.5 −  = 0.495
 2 
x 0
0  0

Put n = 2 in Eqn(1)
x 0.1
y 2 = y 0 + ∫ z1dx =1 + ∫ (0.495 )dx =1 + (0.495x )0.1 = 1.0495
0

m
x 0 0

co
0.1
 2
(1.05x )dx = 0.5 −1.05 x 
x 0.1
z2 = z0 − ∫ (xy1 )dx = 0.5 − ∫

s.
x 0
0 bu  2 0
= 0.4947
la
Put n = 3 in Eqn(1)
yl

x 0.1
y 3 = y 0 + ∫ z 2 dx =1 + ∫ (0.4947 )dx =1 + (0.4947x )0.1
0 = 1.0494
lls

x 0
0

∴ y(0.1) = 1.0494
.a

0.1
x 0.1  x2 
z3 = z0 − ∫ (xy 2 )dx = 0.5 − ∫ (1.0495x )dx = 0.5 −1.0495  
w

x 0
0
 2 0
w

= 0.4947
w

∴ z(0.1) = 0.4947
To find y (0.2):
Let x 0 = 0.1, y 0 = 1.0494 & z 0 = 0.4947

Put n = 1 in Eqn(1)
x 0.2
y 1 = y 0 + ∫ z 0 dx =1.0494 + ∫ (0.4947 )dx
x 0
0.1
0.2
∴ y 1 = 1.0494 + (0.4947x )0.1 = 1.0988

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

x 0.2
z1 = z0 − ∫ (xy 0 )dx = 0.4947 − ∫ (1.0494x )dx
x 0
0.1
0.2
 x 2
∴ z1 = 0.4947 − 1.0494  = 0.4789
 2 
 0.1
Put n = 2 in Eqn(1)
x 0.2
y 2 = y 0 + ∫ z1dx =1.0494 + ∫ (0.4789 )dx =1.0972
x 0
0.1
x 0.2
(1.0988x )dx =0.4782

m
z 2 = z 0 − ∫ xy1dx =0.4947 - ∫
x 0
0.1

co
Put n = 3 in Eqn(1)

s.
x 0.2
y 3 = y 0 + ∫ z 2dx =1.0494 + ∫ (0.4782 )dx =1.0972
x 0
0.1
bu
∴ y(0.2) = 1.0972
la
yl

__________________________________________________________
lls

Problem (6):
.a

Using Picard' s Method find the third order approximat e solution at x = 0.2
w

2
d2 y  dy 
of the differenti al equation 2
= x  − y 2 with y(0) = 1, y / (0) = 0.
dx  dx 
w
w

dy
Soln: Set = z , then the given differenti al equation becomes
dx
dz
= xz 2 − y 2 with initial conditions y(0) = 1, z(0) = 0
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = xz 2 − y 2

x0=0 x1=0.2
y0=1 y(x1)=?
z0=0 z(x1)=?

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

The Picard' s iterative formula is given by


x x 
yn = y 0 + ∫ f(x, y , z
n-1 n-1)dx =y 0 ∫ zn-1dx
+ 

x0
x  0
 − − − (1)
x x 
zn = z 0 + ∫ φ(x, yn-1, zn-1)dx = z0 + ∫  xz 2 - y 2 dx 
 n-1 n-1  
x 0
x  0

Put n = 1 in Eqn(1)
x 0.2
y1 = y 0 + ∫ z 0 dx =1 + ∫ (0)dx =1

m
x 0
0
x 0.2
z1 = z 0 + (x(z ) 2 2
− (y 0 ) dx = 0 + ) (0 - 1)dx = -0.2

co
∫ 0 ∫
x 0
0

s.
Put n = 2 in Eqn(1)
bu
x 0.2
y 2 = y 0 + ∫ z1dx =1 + ∫ (- 0.2 )dx =1 − (0.2x )0.2
0 = 0.96
x 0
la
0

x 0.2
z2 = z0 + ∫ (x(z ) 1
2 2
− (y1 ) dx = 0 + ) ∫ (x(- 0.2) − 1)dx = -0.1992
2
yl

x 0
0
lls

Put n = 3 in Eqn(1)
x 0.2
.a

y 3 = y 0 + ∫ z 2dx =1 + ∫ (- 0.1992 )dx


x 0
0
w

0.2
= 1 − (0.1992x )0 = 0.9601
w
w

∴ y(0.2) = 0.9601

_________________________________________________________

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Numerical solution of simultaneous first order differential equations

Consider the first order simultaneous differential equation


dy
= f(x, y, z) − − − − − −(1)
dx

dz
= φ(x, y, z) − − − − − −(2)
dx

with initial conditions y(x 0 ) = y 0 and z(x 0 ) = z 0

m
Runge-Kutta Method of 4th Order

co
1
y1 = y 0 + [k1 + 2k 2 + 2k 3 + k 4 ]

s.
6
1
z1 = z 0 + [l1 + 2l2 + 2l3 + l4 ] ; where
bu
6
k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
la

 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
yl

 2 2 2  2 2 2
lls

 h k l   h k l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  ; l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2 2 2  2 2 2
.a

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )
w

__________________________________________________________
w
w

Problem (1):
Using Runge - Kutta Method of 4th order solve the system of equations
dy dz
=y+z ; = z - y ; y(0) = 0, z(0) = 1 at the point x = 0.1 correct to
dx dx
four decimal places.

Soln: Given f (x, y, z ) = y + z ; φ(x, y, z ) = z − y ; h = 0.1

x0=0 x1=0.1

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

y0=0 y1=?
z0=1 z1=?

Runge-Kutta Method of 4th Order

y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]
6 
 − − − − − −(1)
1
z1 = z 0 + [l1 + 2l 2 + 2l3 + l 4 ] 
6 
where
k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )

m
 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2  2 2 2

co
 h k l   h k l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  ; l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 

s.
 2 2 2  2 2 2
k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )
bu
la

k1 = hf (x 0 , y 0 , z0 ) = h[y 0 + z0 ] = 0.1[0 + 1] = 0.1


yl
ls

l1 = hφ(x 0 , y 0 , z0 ) = h[z0 − y 0 ] = 0.1[1 − 0] = 0.1


l
.a

 l   l 
w

h k k
k 2 = hf  x 0 + , y 0 + 1 , z0 + 1  = h y 0 + 1 + z0 + 1 
 2 2 2  2 2
w

 0.1 0.1
w

= 0.10 + + 1+ = 0.11
 2 2 
 h k l   l  k 
l2 = hφ x 0 + , y 0 + 1 , z 0 + 1  = hz 0 + 1 −  y 0 + 1 
 2 2 2  2  2 
 0.1  0.1
= 0.11 + − 0 +  = 0.1
 2  2 

 h k l   k l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  = h y 0 + 2 + z 0 + 2 
 2 2 2  2 2
 0.11 0.1
= 0.10 + + 1+ = 0.1105
 2 2 
 h k l   l  k 
l3 = hφ x 0 + , y 0 + 2 , z 0 + 2  = hz 0 + 2 −  y 0 + 2 
 2 2 2  2  2 
www.allsyllabus.com
 0.1  0.11
= 0.11 + − 0 +  = 0.0995
vtu.allsyllabus.com www.allsyllabus.com

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ) = h[y 0 + k 3 + z 0 + l3 ]
= 0.1[0 + 0.1105 + 1 + 0.0995 ] = 0.121

l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 ) = h[z 0 + l3 − (y 0 + k 3 )]
= 0.1[1 + 0.0995 − (0 + 0.1105 )] = 0.0989

Substituting all these values in Eqn(1), we get

m
1
y1 = y 0 + [k1 + 2k 2 + 2k 3 + k 4 ]

co
6
1
= 0 + [0.1 + 2(0.11) + 2(0.1105 ) + 0.121] = 0.1103

s.
6 bu
∴ y(0.1) = 0.1103
1
z1 = z 0 + [l1 + 2l2 + 2l3 + l4 ]
la
6
yl

1
= 1+ [0.1 + 2(0.1) + 2(0.0995 ) + 0.0989 ] = 1.0996
6
lls

∴ z(0.1) = 1.0996
.a

__________________________________________________________
w

Problem (2):
w
w

Using Runge - Kutta Method of 4 th order solve the system of


dy dz
equations = x + z; = x - y 2 ; y(0) = 2, z(0) = 1 for x = 0.1
dx dx
correct to four decimal places.

Soln: Given f (x, y, z ) = x + z ; φ(x, y, z ) = x − y 2 ; h = 0.1

x0=0 x1=0.1
y0=2 y1=?
z0=1 z1=?

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Runge-Kutta Method of 4th Order

y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]
6 
 − − − − − −(1)
1
z1 = z 0 + [l1 + 2l 2 + 2l 3 + l 4 ] 
6 

where
k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l 2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2  2 2 2
 h k l   h k l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  ; l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2  2

m
2 2 2 2
k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )

co
s.
k 1 = hf (x 0 , y 0 , z 0 ) = h[x 0 + z 0 ] = 0.1[0 + 1] = 0.1
bu
[ ]
la
l1 = hφ(x 0 , y 0 , z 0 ) = h x 0 − (y 0 ) = 0.1[0 − 22 ] = −0.4
2
yl

 l   l
lls

h k h
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  = h x 0 + + z 0 + 1 
 2 2 2  2 2
.a

 0.1 0.4 
= 0.10 + + 1- = 0.085
2 
w

 2
 k1  
w

2
 h k1 l1  h 
l2 = hφ x 0 + , y 0 + , z 0 +  = h x 0 + −  y 0 +  
 2 2  2 
w

2 2 
 0.1  0.1 
2

= 0.11 + − 2 +   = −0.4152
 2  2  

 h k l   h l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  = h x 0 + + z 0 + 2 
 2 2 2  2 2
 0.1 - 0.4152 
= 0.10 + + 1+  = 0.0842
 2 2

 h k2 l2   h  k2  
2

l3 = hφ x 0 + , y 0 + , z 0 +  = h x 0 + −  y 0 +  
 2 2 2  2  2 
 0.1  0.085  
2

= 0.10 + − 2 +   = −0.4121
 2  2  www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

[
l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 ) = h x 0 + h − (y 0 + k 3 )
2
]
[ 2
= 0.1 0 + 0.1 − (2 + 0.0842 ) = −0.4243 ]
Substituting all these values in Eqn (1)

m
1

co
y1 = y 0 + [k1 + 2k 2 + 2k 3 + k 4 ]
6
1

s.
= 2 + [0.1 + 2(0.0855 ) + 2(0.0842 ) + 0.0687 ] = 2.0845
6
bu
∴ y(0.1) = 2.0845
1
la
z1 = z 0 + [l1 + 2l2 + 2l3 + l4 ]
6
yl

1
= 1+ [- 0.4 + 2(- 0.4152 ) + 2(- 0.4121) − 0.4243 ] = 0.5868
lls

6
∴ z(0.1) = 0.5868
.a

__________________________________________________________
w

Problem (3):
w

dy dz
w

Solve the differenti al equations = 1 + xz ; = − xy for x = 0.3 using


dx dx
fourth order Runge - Kutta Method correct to four decimal places.
The initial values are y = 0 and z = 1 when x = 0.

Soln: Given f (x, y, z ) = 1 + xz ; φ(x, y, z ) = − xy ; h = 0.3

x0=0 x1=0.3
y0=0 y1=?
z0=1 z1=?

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Runge-Kutta Method of 4th Order

y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]
6 
 − − − − − −(1)
1
z1 = z 0 + [l1 + 2l 2 + 2l3 + l 4 ] 
6 
where
k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2  2 2 2
 h k2 l2   h k2 l 
k 3 = hf  x 0 + , y 0 + , z 0 +  ; l3 = hφ x 0 + , y 0 + , z 0 + 2 
 2 2 2  2 2 2
k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )

m
co
k 1 = hf (x 0 , y 0 , z 0 ) = h[1 + x 0 z 0 ] = 0.3[1 + 0x1] = 0.3

s.
bu
l1 = hφ(x 0 , y 0 , z 0 ) = h[- x 0 y 0 ] = 0.3[- 0x0] = 0
la
 h k l    h  l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  = h1 +  x 0 +  z 0 + 1 
yl

 2 2 2   2  2 
lls

  0.3  0 
= 0.3 1 +  0 + 1 +  = 0.345
  2  2 
.a

 h k l    h  k 
w

l 2 = hφ x 0 + , y 0 + 1 , z 0 + 1  = h−  x 0 +  y 0 + 1 
 2 2 2   2  2 
w

  0.3  0.3 
= 0.3 −  0 +  0 +  = −0.0067
w

  2  2 

 h k l    h  l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  = h1 +  x 0 +  z 0 + 2 
 2 2 2   2  2 
  0.3  - 0.0067 
= 0.3 1 +  0 + 1 +  = 0.3448
  2  2 

 h k l    h  k 
l3 = hφ x 0 + , y 0 + 2 , z0 + 2  = h−  x 0 +  y 0 + 2 
 2 2 2   2  2 
  0.3  0.345 
= 0 .3  −  0 +  0 +  = −0.0077
  2  2 

) = h[1 + (x 0 + h)(z0 + l3 )]
k 4 = hf (x 0 + h, y 0 + k 3 , z0 + l3www.allsyllabus.com
= 0.3[1 + (0 + 0.3 )(1 - 0.0077 )] = 0.3893
vtu.allsyllabus.com www.allsyllabus.com

Substituting all these values in Eqn (1), we get

m
1
[k1 + 2k 2 + 2k 3 + k 4 ]

co
y1 = y 0 +
6
1

s.
= 0 + [0.3 + 2(0.345 ) + 2(0.3448 ) + 0.3893 ] = 0.3448
6
bu
∴ y(0.3) = 0.3448
1
z1 = z 0 + [l1 + 2l2 + 2l3 + l4 ]
la
6
yl

1
= 1 + [0 + 2(- 0.0067 ) + 2(- 0.0077 ) − 0.0310 ] = 0.9900
6
ls

∴ z(0.3) = 0.9900
l
.a

__________________________________________________________
w

Problem (4):
w

dx dy
w

Solve the system of equations = y−t ; = x + t at t = 0.1 using


dt dt
fourth order Runge - Kutta Method given that x = 1 and y = 1 when t = 0.
Soln: Given f (t, x, y ) = y - t ; φ(t, x, y ) = x + t ; h = 0.1

t0=0 t1=0.1
x0=1 x1=?
y0=1 y1=?

Runge-Kutta Method of 4th Order


1
x1 = y 0 + [k1 + 2k 2 + 2k 3 + k 4 ]
6 
 − − − − − −(1)
1 
y1 = z0 + [l1 + 2l2 + 2l3 + l 4 ]www.allsyllabus.com
6 
vtu.allsyllabus.com www.allsyllabus.com

m
k 1 = hf (t 0 , x 0 , y 0 ) = h[y 0 - t 0 ] = 0.1[1 - 0] = 0.1

co
l1 = hφ(t 0 , x 0 , y 0 ) = h[x 0 + t 0 ] = 0.1[1 + 0] = 0.1

s.
bu
 h k l   l   h 
k 2 = hf  t 0 + , x 0 + 1 , y 0 + 1  = h y 0 + 1  −  t 0 + 
 2 2 2   2  2 
la

 0.1  0.1
= 0.11 +  − 0 +  = 0.1
yl

 2   2 
lls

 h k l   k   h 
.a

l 2 = hφ t 0 + , x 0 + 1 , y 0 + 1  = h x 0 + 1  +  t 0 + 
 2 2 2  2  2 
w

 0.1  0.1
= 0.11 +  + 0 +  = 0.11
2 
w

 2  
w

 h k l   l  h 
k 3 = hf  t 0 + , x 0 + 2 , y 0 + 2  = h y 0 + 2 −  t 0 + 
 2 2 2  2  2 
 0.11  0.1
= 0.1 1 + − 0 +  = 0.1005
 2  2 

 h k l   k   h 
l3 = hφ t 0 + , x 0 + 2 , y 0 + 2  = h x 0 + 2  +  t 0 + 
 2 2 2  2  2 
 0.1  0.1
= 0.11 +  + 0 +  = 0.11
 2   2 

k 4 = hf (t 0 + h, x 0 + k 3 , y 0 + l3 ) = h[(y 0 + l3 ) − (t 0 + h)]
= 0.1[1 + 0.11 − (0 + 0.1)] = 0.101
www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Substituting all these values in Eqn (1), we get


1
x1 = x 0 + [k 1 + 2k 2 + 2k 3 + k 4 ]
6
1
= 1 + [0.1 + 2(0.1) + 2(0.1005 ) + 0.101] = 1.1003

m
6

co
1
y1 = y 0 + [l1 + 2l 2 + 2l3 + l4 ]
6

s.
1
= 1 + [0.1 + 2(0.11) + 2(0.11) + 0.1200 ] = 1.1100
bu
6
∴ x(0.1) = 1.1003 & y(0.1) = 1.1100
la
__________________________________________________________
yl

Problem (5):
ls

dz
l
.a

Solve the differenti al equations at x = 0.1 given that + 4y + 2z = 0 ;


dx
w

dy
- z = 0 ; y(0) = z(0) = 1 using fourth order Runge - Kutta Method correct
dx
w

to four decimal places.


w

Soln: Given f (x, y, z ) = z ; φ(x, y, z ) = −4y - 2z ; h = 0.1

x0=0 x1=0.1
y0=1 y1=?
z0=1 z1=?

Runge-Kutta Method of 4th Order

y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]
6 
 − − − − − −(1)
1
z1 = z 0 + [l1 + 2l 2 + 2l3 + l 4 ] 
6 
where www.allsyllabus.com
k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
vtu.allsyllabus.com www.allsyllabus.com

k 1 = hf (x 0 , y 0 , z 0 ) = h[z 0 ] = 0.1[1] = 0.1

m
co
l1 = hφ(x 0 , y 0 , z 0 ) = h[- 4y 0 − 2z 0 ] = 0.1[- 4x1 - 2x1] = -0.6

s.
 h k l   l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  = h z 0 + 1 
 2  2 
2 2
bu
 - 0.6 
= 0.11 +  = 0.07
2 
la

yl

 h k l    k   l 
lls

l2 = hφ x 0 + , y 0 + 1 , z 0 + 1  = h− 4 y 0 + 1  − 2 z 0 + 1 
 2 2 2   2  2 
.a

  0.1  - 0.6 
= 0.1− 41 +  − 21 +  = −0.56
  2   2 
w
w

 h k l   l 
w

k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  = h z 0 + 2 
 2 2 2   2 
 - 0.56 
= 0.11 +  = 0.072
 2 

 h k l    k   l 
l3 = hφ x 0 + , y 0 + 2 , z 0 + 2  = h− 4 y 0 + 2  − 2 z 0 + 2 
 2 2 2   2  2 
  0.07   - 0.56 
= 0.1− 41 +  − 21 +  = −0.558
  2   2 

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ) = h[(z 0 + l3 )]
= 0.1[1 − 0.558 ] = 0.0442

[− 4(y 0 + k 3 ) − 2(z0 + l3 )]
l4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 ) = hwww.allsyllabus.com
= 0.1[− 4(1 + 0.072 ) − 2(1 − 0.558 )] = −0.5172
vtu.allsyllabus.com www.allsyllabus.com

Substituting all these values in Eqn (1), we get


1
y1 = y 0 + [k1 + 2k 2 + 2k 3 + k 4 ]
6
1
= 1+ [0.1 + 2(0.07 ) + 2(0.072 ) + 0.0442 ] = 1.0713
6
∴ y(0.1) = 1.0713

m
1
z1 = z 0 + [l1 + 2l2 + 2l3 + l4 ]

co
6
1
= 1 + [- 0.6 + 2(- 0.56 ) + 2(- 0.558 ) − 0.5172 ] = 0.4411

s.
6 bu
∴ z(0.1) = 0.4411
Problem (6):
la
dy dz
Solve =x+z ; = x - y given y(0) = 0, z(0) = 1 for x = 0.1 using
yl

dx dx
lls

Runge - Kutta Method correct to four decimal places.


.a

{Ans : y(0.1) = 0.1050, z(0.1) = 0.9998}


w

Problem (7):
w
w

dy dz
Solve =z; = x 3 (y + z ) given y(0) = 1, z(0) = 1/2 for x = 0.1 using
dx dx
Runge - Kutta Method correct to four decimal places.

{Ans : y(0.1) = 1.050, z(0.1) = 0.51}


__________________________________________________________

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

m
co
s.
bu
la
Numerical solution of Second order Ordinary differential equations
yl

Consider a Second order O.D.E of the form


lls

y // = F(x, y, y / ) - - - - - (1)
.a

with initial conditions y(x 0 ) = y 0 and y / (x 0 ) = y 0/


w
w

Set y / = z − − − − − (2), then Eqn(1) becomes


z / = F(x, y, z ) − − − − − (3) with y(x 0 ) = y 0 & z(x 0 ) = y 0/
w

Thus the problem of solving second order O.D.E of form (1) is reduced to
a problem of solving a system of O.D.E' s given by Eqn(2) & Eqn(3).
dy dz
i.e, =z & = F(x, y, z) with y(x 0 ) = y 0 & z(x 0 ) = y 0/
dx dx
__________________________________________________________

Problem (1):

Using Runge − Kutta method of fourth order solve the differential equation
2
d2 y d y
= x  − y 2 for x = 0.2 correct to four decimal places. Initial
 
dx 2  dx  www.allsyllabus.com

conditions are y(0) = 1, y / (0) = 0


vtu.allsyllabus.com www.allsyllabus.com

Soln: Set dy = z , then the given equation becomes


dx
dz
= xz 2 − y 2 with conditions y(0) = 1, z(0) = 0
dx h=0.1
∴ f (x, y, z ) = z & φ(x, y, z ) = xz 2 − y 2

x0=0 x1=0.2
y0=1 y1=?

m
z0=0 -------

co
s.
Runge-Kutta Method of 4th Order
bu
y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]
6 
la
 − − − − − −(1)
1
z1 = z 0 + [l1 + 2l 2 + 2l 3 + l 4 ] 
yl

where 6 
ls

k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
l
.a

 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2  2 2 2
w

 h k l   h k l 
w

k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  ; l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2 2 2  2 2 2
w

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )

k 1 = hf (x 0 , y 0 , z 0 ) = h[z 0 ] = 0.2[0] = 0

[ 2 2
] [ 2
l1 = hφ(x 0 , y 0 , z 0 ) = h x 0 (z 0 ) − (y 0 ) = 0.2 0(0 ) − (1) = −0.2
2
]
 h k l   l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  = h z 0 + 1 
 2 2 2   2 
 - 0.2 
= 0.2  0 +  = −0.02
 2 

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

 h k l 
l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2
 h 
2
l1   k1  
2

= h x 0 +  z 0 +  −  y 0 +  
 2  2  2 
 0.2  - 0.2   0  
2 2

= 0.2  0 +  0 +  − 1 +   = −0.1998
 2  2   2 

 h k l   l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  = h z 0 + 2 
 2 2 2   2 

m
 - 0.1998 
= 0.2  0 +  = −0.0199

co
 2 

s.
 h k l 
l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2 2 2
bu
 h 
2
l2   k2  
2

= h x 0 +  z 0 +  −  y 0 +  
la
 2  2  2 
yl

 0.2  - 0.1998   - 0.02  


2 2

= 0.2  0 +  0 +  − 1 +   = −0.1958
lls

 2  2   2  
k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ) = h[(z 0 + l3 )] = −0.0391
.a

Substituting all these values in Eqn (1), we get


w
w

1
y1 = y 0 + [k 1 + 2k 2 + 2k 3 + k 4 ]
6
w

1
= 1 + [0 + 2(- 0.02 ) + 2(- 0.0199 ) − 0.0391] = 0.9801
6
y(0.2) = 0.9801

__________________________________________________________

Problem (2):

Using Runge − Kutta method of fourth order solve the differential equation
d2 y  dy 
= x3  y +  for x = 0.1 correct to four decimal places.
dx 2  dx 

Initial conditions are y(0) = 1, y / (0) = 0.5


www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

dy
Soln: Set = z , then the given equation becomes
dx
dz
= x 3 (y + z) with conditions y(0) = 1, z(0) = 0.5
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = x 3 (y + z) ; h = 0.2
x0=0 x1=0.1
y0=1 y1=?
z0=0.5 -------

m
Runge-Kutta Method of 4th Order

co
y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]

s.
6
 − − − − − −(1)
1
z1 = z 0 + [l1 + 2l 2 + 2l3 + l 4 ] 
bu
6 
where
la

k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
yl

 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
ls

 2 2 2  2 2 2
l
.a

 h k l   h k l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  ; l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
w

 2 2 2  2 2 2
w

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )
w

k 1 = hf (x 0 , y 0 , z 0 ) = h[z 0 ] = 0.1[0.5 ] = 0.05

[ 3
]
l1 = hφ(x 0 , y 0 , z 0 ) = h (x 0 ) (y 0 + z 0 ) = 0.1[0(1 + 0.5 )] = 0

 h k l   l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  = h z 0 + 1 
 2 2 2   2 
 0 
= 0.1 0.5 +  = 0.05
 2 

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

 h k l 
l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2
 3
h   l   k  
= h x 0 +   z 0 + 1  +  y 0 + 1 
 2   2  2  
 3
0.1  0.05 0 
= 0.1 0 +  1 + + 0.5 +  = 0.0000
 2   2 2 

 h k l   l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  = h z 0 + 2 
 2 2 2   2 
 0 
= 0.1  0.5 +  = 0.05
 2 

m
co
 h k l 
l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2 2 2

s.
 3
h  k l 
= h x 0 +   y 0 + 2 + z 0 + 2 
bu
 2  2 2 
 3
0.1  0.05 0 
la
= 0.1 0 +  1 + + 0.5 +  = 0.0000
 2   2 2 
yl
lls

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ) = h[(z 0 + l3 )] = 0.05
.a
w
w

Substituting all these values in Eqn (1), we get


w

1
y1 = y 0 + [k1 + 2k 2 + 2k 3 + k 4 ]
6
1
= 1+ [0.05 + 2(0.05 ) + 2(0.05 ) + 0.05] = 1.0500
6
∴ y(0.1) = 1.0500

__________________________________________________________

Problem (3):
Using Runge − Kutta method of fourth order solve the differential equation
d2 y dy
+ 2x − 4y = 0, y(0) = 0.2, y / (0) = 1/2 for x = 0.1 correct to four decimal
dx 2 dx
www.allsyllabus.com
places.
vtu.allsyllabus.com www.allsyllabus.com

dy
Soln: Set = z , then the given equation becomes
dx
dz
= 4y - 2xz with conditions y(0) = 0.2, z(0) = 0.5
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = 4y − 2xz ; h = 0.1

x0=0 x1=0.1
y0=0.2 y1=?
z0=0.5 -------

m
Runge-Kutta Method of 4th Order

co
y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]

s.
6
 − − − − − −(1)
1
z1 = z 0 + [l1 + 2l 2 + 2l3 + l 4 ] 
bu
6 
where
la

k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
yl

 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
ls

 2 2 2  2 2 2
l

 l   l 
.a

h k h k
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  ; l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2 2 2  2 2 2
w

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )
w
w

k1 = hf (x 0 , y 0 , z 0 ) = h[z 0 ] = 0.1[0.5] = 0.05

l1 = hφ(x 0 , y 0 , z 0 ) = h[4y 0 − 2x 0 z 0 ] = 0.1[4x0.2 − 2x0x0.5] = 0.08

 h k l   l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  = h z 0 + 1 
 2 2 2  2 
 0.08 
= 0.1 0.5 +  = 0.054
 2 
 h k l 
l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2
  k   h  l 
= h4 y 0 + 1  − 2 x 0 +  z 0 + 1 
  2  2 www.allsyllabus.com
2 
  0.05   0.1 0.08 
= 0.1 4 0.2 +  − 2 0 +  0.5 +  = 0.0846
vtu.allsyllabus.com www.allsyllabus.com

m
 h k l 
l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 

co
 2 2 2

s.
  k   h  l 
= h4 y 0 + 2  − 2 x 0 +  z 0 + 2 
  2   2  2 
bu
  0.054   0.1 0.0846 
= 0.14 0.2 +  − 2 0 +  0.5 +  = 0.0853
la
  2   2  2 
yl

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ) = h[(z 0 + l3 )] = 0.0585
lls
.a
w
w
w

Substituting all these values in Eqn (1), we get


1
y1 = 0.2 + [0.05 + 2(0.054 ) + 2(0.0542 ) + 0.0585] = 0.2542
6
∴ y(0.1) = 0.2542
Problem (4):

d2 y
Given 2
= y 3 , y(0) = 10, y / (0) = 5 for x = 0.1. Find the value of y(0.1)
dx
correct to four decimal places using Runge - Kutta method of fourth order.

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

dy
Soln: Set = z , then the given equation becomes
dx
dz
= y 3 with conditions y(0) = 10, z(0) = 5
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = y 3 ; h = 0.1

x0=0 x1=0.1
y0=10 y1=?
z0=5 -------

m
Runge-Kutta Method of 4th Order

co
y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]

s.
6
 − − − − − −(1)
1
z1 = z 0 + [l1 + 2l 2 + 2l3 + l 4 ] 
bu
6 
where
la

k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
yl

 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
lls

 2 2 2  2 2 2
 l   l 
.a

h k h k
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  ; l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2 2 2  2 2 2
w

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )
w
w

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

k1 = hf (x 0 , y 0 , z 0 ) = h[z 0 ] = 0.1[5] = 0.5

l1 = hφ(x 0 , y 0 , z 0 ) = h (y 0 )3  = 0.1(10 )3  = 100


   

 h k l   l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  = h   z 0 + 1  
 2 2 2  2 
 100  
= 0.1   5 +  = 5.5
 2  

 h k l 
l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 

m
 2 2 2
 k1  
3

co
= h y 0 +  
 2 

s.
 0.5  
3

= 0.110 +   = 107.6890
bu
 2  
la

 h k l   l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  = h  z 0 + 2 
yl

 2 2 2   2 
lls

 107.6890 
= 0.1 5 +  = 5.8844
 2 
.a

 h k l 
l3 = hφ x 0 + , y 0 + 2 , z0 + 2 
w

 2 2 2
w

 k2  
3

= h  y0 +  
w

 2  
 
 5.5  
3
 
= 0.1 10 +   = 207.2671
 2  
 
k 4 = hf (x 0 + h, y 0 + k 3 , z0 + l3 ) = h[(z0 + l3 )] = 21.2267
Substituting all these values in Eqn (1), we get
y1 = y0 + 1 [k1 + 2k 2 + 2k 3 + k 4 ]
6
1
= 10 + [0.5 + 2(5.5) + 2(5.8844 ) + 21.2267 ]
6
= 17.4159
∴ y(0.1) = 17.4159

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Problem (5):

Using Runge − Kutta method of fourth order find y(0.2) and y / (0.2) , given
d2 y dy
that 2
=y+x ; y(0) = 1, y / (0) = 0 correct four decimal places.
dx dx

dy
Soln: Set = z , then the given equation becomes
dx
dz
= y + xz with conditions y(0) = 1, z(0) = 0
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = y + xz ; h = 0.2

m
co
x0=0 x1=0.2

s.
y0=1 y1=? bu
z0=0 -------
la
Runge-Kutta Method of 4th Order
yl

y1 = y 0 +
1
[k 1 + 2k 2 + 2k 3 + k 4 ]
ls

6 
 − − − − − −(1)
l

1
z1 = z 0 + [l1 + 2l 2 + 2l3 + l 4 ] 
.a

6 
w

where
w

k 1 = hf (x 0 , y 0 , z 0 ) ; l1 = hφ(x 0 , y 0 , z 0 )
w

 h k l   h k l 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  ; l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2  2 2 2
 h k l   h k l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  ; l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2 2 2  2 2 2
k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ); l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 )

k 1 = hf (x 0 , y 0 , z 0 ) = h[z 0 ] = 0.2[0] = 0

l1 = hφ(x 0 , y 0 , z 0 ) = h[y 0 + x 0 z 0 ] = 0.2[1 + 0x0] = 0.2

 h k l   l   0.2 
k 2 = hf  x 0 + , y 0 + 1 , z 0 + 1  = h z 0 + 1  = 0.2  0 +  = 0.02
 2 2 2  2   2 
www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

 h k l 
l2 = hφ x 0 + , y 0 + 1 , z 0 + 1 
 2 2 2
 k   h  l 
= h y 0 + 1  +  x 0 +  z 0 + 1 
 2  2  2 
 0   0.2  0.2 
= 0.2 1 +  +  0 +  0 +  = 0.202
 2   2  2 

 h k l   l 
k 3 = hf  x 0 + , y 0 + 2 , z 0 + 2  = h z 0 + 2 
 2 2 2   2 
 0.202 

m
= 0.2  0 +  = 0.0202
 2 

co
 h k l 

s.
l3 = hφ x 0 + , y 0 + 2 , z 0 + 2 
 2 2 2
bu
 k   h  l 
= h y 0 + 2  +  x 0 +  z 0 + 2 
 2  2  2 
la

 0.02   0.2  0.202 


yl

= 0.2 1 +  + 0 +  0 +  = 0.2040


 2   2  2 
lls

k 4 = hf (x 0 + h, y 0 + k 3 , z 0 + l3 ) = h[(z 0 + l3 )] = 0.0408
.a
w

l 4 = hφ(x 0 + h, y 0 + k 3 , z 0 + l3 ) = h[(y 0 + k 3 ) + (x 0 + h)(z 0 + l3 )]


w

= 0.2[(1 + 0.0202 ) + (0 + 0.2 )(0 + 0.2040 )] = 0.2122


w

Substituting all these values in Eqn (1)


1
y1 = y 0 + [k 1 + 2k 2 + 2k 3 + k 4 ]
6
1
= 1 + [0 + 2(0.02 ) + 2(0.0202 ) + 0.0408 ] = 1.0202
6
y(0.2) = 1.0202

1
y / (0.2 ) = z(0.2) = z 0 + [l1 + 2l2 + 2l3 + l4 ]
6
1
=0+ [0.2 + 2(0.202 ) + 2(0.2040 ) + 0.2122 ]
6
∴ y / (0.2 ) = 0.2040

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Problem (6):
Using Runge − Kutta method of fourth order solve the differenti al equation
d2 y dy
2
+ 3x − 6y = 0 for x = 0.2 correct four decimal places. Initial conditions
dx dx
are y(0) = 1, y / (0) = 0.1

{Ans : y(0.2) = 1.1380}

m
co
Problem (7):
Using Runge − Kutta method of fourth order find the solution at x = 0.1,
d2 y dy
s.
given that − x2
bu
− 2xy = 1 ; y(0) = 1, y / (0) = 0 correct four decimal
2
dx dx
places.
la
yl

{Ans : y(0.1) = 1.0053}


lls

__________________________________________________________
.a
w
w
w

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Numerical solution of Second order Ordinary differential equations


using Milne’s method

Consider a Second order O.D.E of the form


y // = F(x, y, y / ) - - - - - (1)
with initial conditions y(x 0 ) = y 0 and y / (x 0 ) = y 0/

m
Set y / = z − − − − − (2), then Eqn(1) becomes

co
z / = φ(x, y, z ) − − − − − (3) with y(x 0 ) = y 0 & z(x 0 ) = y 0/

s.
Thus the problem of solving second order O.D.E of form (1) is reduced to
bu
a problem of solving a system of O.D.E' s given by Eqn(2) & Eqn(3).
dy dz
= φ(x, y, z) with y(x 0 ) = y 0 & z(x 0 ) = y 0/
la
i.e, =z &
dx dx
yl
lls

__________________________________________________________
.a
w

Milne’s Predictor-Corrector Method


w
w

y 4,p = y 0 +
4h
(2z1 − z 2 + 2z 3 ) 
3 
 − −(1) → Predictor formula
4h / 
z 4,p = z 0 + (2z1 − z 2 + 2z3 ) 
/ /

3
h 
y (r4,+c1) = y 2 + (z 2 + 4z 3 + z(r)
4 ) 
3 
 − −(2) → Corrector formula
( h /
z 4,c = z 2 + z 2 + 4z 3 + (z 4 ) 
(r +1)

3
/
)
/ (r ) 


(0) (r) (r)
where y 4 = y 4,p & y 4 = y 4,c for r ≠ 0
z(0) (r) (r)
4 = z 4,p & z 4 = z 4,c for r ≠ 0 ; (z )( ) = φ(x , y
/
4
r
4
(r)
4 4 )
, z (r)

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Problem (1):

d2 y dy
Apply Milne' s method to compute y(0.8). Given that = 1 − 2y ;
dx 2 dx
and
x 0 0.2 0.4 0.6

y 0 0.02 0.0795 0.1762

m
y/ 0 0.1996 0.3937 0.5689

co
s.
Soln: Set dy = z , then the given equation becomes
bu
dx
dz
= 1 − 2yz with conditions y(0) = 0, z(0) = 0
la
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = 1 − 2yz; h = 0.2
yl

Thus x 0 0.2 0.4 0.6


lls

0.8
y 0 0.02 0.0795 0.1762 ?
.a

z 0 0.1996 0.3937 0.5689


w

-
w
w

y i = y(x i ) dz
zi = z(xi ) z/ = = 1 - 2yz
dx
y1 = 0.02
z1 = 0.1996 z1/ = 1 − 2y1z1 = 0.9920

z 2 = 0.3937 z 2/ = 1 − 2y 2 z 2 = 0.9374
y 2 = 0.0795
z 3 = 0.5689 z 3/ = 1 − 2y 3 z 3 = 0.7995
y 3 = 0.1762

Milne’s Predictor formula

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

y 4,p = y 0 +
4h
(2z1 − z 2 + 2z 3 ) 
3 
 − − − − − (1)
4h
z 4,p = z0 + (2z1 − z 2 + 2z 3 ) 
/ / /

4(0.2)
∴ y 4,p = 0 + (2(0.1996 ) − (0.3937 ) + 2(0.5689 ))
3
= 0.3049
4(0.2)
z 4,p = 0 + (2(0.9920 ) − (0.9374 ) + 2(0.7995 ))
3
= 0.7055

m
Milne’s Corrector formula

co
h 
y (r4,+c1) = y 2 + ( 4 )
z 2 + 4z 3 + z(r)

s.
3 
 − − − −(2)
h
( )
bu
z (r4,+c1) = z 2 + z 2/ + 4z 3/ + (z 4/ )
(r )

3 
la

where
yl

y (0) (r) (r)


4 = y 4,p & y 4 = y 4,c for r ≠ 0
lls

z (0) (r) (r)


4 = z 4,p & z 4 = z 4,c for r ≠ 0
.a

(z )( ) = φ(x , y
/
4
r
4
(r)
4 4 )
, z(r)
w

First improvement: {Put r = 0 in Eqn (2)}


w
w

h
y (1)
4,c = y 2 + (z2 + 4z 3 + z(0)4 ) = y 2 + h (z2 + 4z 3 + z 4,p )
3 3
0.2
= 0.0795 + (0.3937 + 4(0.5689 ) + 0.7055 ) = 0.3045
3
z (1)
4,c = z 2 +
h /
3
(
z 2 + 4z 3/ + (z 4/ )
(0 )
)
where
(z )( ) = φ(x , y
/
4
0
4
(0)
4 4 ) = φ(x 4 , y 4,p , z 4,p ) = 1 − 2y 4,p z 4,p = 0.5698
, z(0)
0.2
∴ z (1)
4,c = 0.3937 + (0.9374 + 4(0.7995 ) + 0.5698 )
3
= 0.7074

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Second improvement: {Put r = 1 in Eqn (2)}

h
y (2)
4,c = y 2 + (z 2 + 4z 3 + z(1)4 ) = y 2 + h (z 2 + 4z 3 + z(1)4,c )
3 3
0.2
= 0.0795 + (0.3937 + 4(0.5689 ) + 0.7074 ) = 0.3046
3

z (2)
4,c = z 2 +
h /
3
(
z 2 + 4z 3/ + (z 4/ )
(1)
)
where
(z )( ) = φ(x
/
4
1
4 4 , z 4 ) = φ(x 4 , y 4,c , z 4,c ) = 1 − 2y 4,c z 4,c = 0.5692
, y (1) (1) (1) (1) (1) (1)

m
0.2
∴ z (2)
4,c = 0.3937 + (0.9374 + 4(0.7995 ) + 0.5692 )
3

co
= 0.7073

s.
Third improvement: {Put r = 2 in Eqn (2)}
bu
h
y (3)
4,c = y 2 + (z 2 + 4z 3 + z (2)4 ) = y 2 + h (z 2 + 4z 3 + z(2)4,c )
3 3
la

= 0.3046
yl
lls

Since y (2) (3)


4,c & y 4,c are the same correct to four decimal places

y(0.4) = 0.3046
.a

__________________________________________________________
w

Problem (2):
w

d2 y
w

dy
Apply Milne' s method to compute y(1.4) given that 2 2 = 4 x + and
dx dx

x 1 1.1 1.2 1.3


y 2 2.2156 2.4649 2.7514
y/ 2 2.3178 2.6725 3.0657

dy
Soln: Set = z , then the given equation becomes
dx
dz
= 2x + z with conditions y(1) = 2, z(1) = 2
dx 2
z ) = 2x + z ; h = 0.1
∴ f (x, y, z ) = z & φ(x, y,www.allsyllabus.com
2
Thus
vtu.allsyllabus.com www.allsyllabus.com

x 1 1.1 1.2 1.3 1.4


y 2 2.2156 2.4649 2.7514 ?
z 2 2.3178 2.6725 3.0657 -
dz z
y i = y(x i ) z/ = = 2x +
zi = z(x i ) dx 2

z1 = 2.3178 z1
y1 = 2.2156 z1/ = 2x1 +

om
= 3.3589
2
z 2 = 2.6725 z
y 2 = 2.4649 z 2/ = 2x 2 + 2 = 3.7362
2

c
z3

s.
y 3 = 2.7514 z 3 = 3.0657 /
z 3 = 2x 3 + = 4.1328
2
bu
la
Milne’s Predictor formula
yl

y 4,p = y 0 +
4h
(2z1 − z 2 + 2z 3 ) 

lls

3
 − − − − − (1)
4h
z 4,p = z0 + (2z1 − z 2 + 2z 3 ) 
/ / /
.a

3
w

4(0.1)
∴ y 4,p = 2 + (2(2.3178 ) − (2.6725 ) + 2(3.0657 ))
w

3
w

= 3.0793
4(0.1)
z 4,p = 2 + (2(3.3589 ) − (3.7362 ) + 2(4.1328 ))
3
= 3.4996
Milne’s Corrector formula

h 
y (r4,+c1) = y 2 + (z 2 + 4z 3 + z(r)4 ) 
3
 − − − −(2)
h
(
z (r4,+c1) = z 2 + z 2/ + 4z 3/ + (z 4/ )
3
(r )
) 

where y (0) 4 = y 4,p & y (r) (r)
4 = y 4,c for r ≠ 0
z (0)
4 = z 4,p & z (r) (r)
4 = z 4,c for r ≠ 0

(z )( ) = φ(x
/
4
r
4 4 , z4 )
, y (r) (r)

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

First improvement: {Put r = 0 in Eqn (2)}


h
y (1)
4,c = y 2 + (z 2 + 4z 3 + z (0)4 ) = y 2 + h (z 2 + 4z 3 + z 4,p )
3 3
0.1
= 2.4649 + (2.6725 + 4(3.0657 ) + 3.4996 ) = 3.0794
3

z (1)
4,c = z 2 +
3
(
h /
z 2 + 4z 3/ + (z 4/ )
(0 )
)
where

m
z 4,p
(z )( ) = φ(x
/ 0
4 , y 4 , z 4 ) = φ(x 4 , y 4,p , z 4,p ) = 2x 4 +
(0) (0)
= 4.5498

co
4
2
0.1
∴ z (1)
4,c = 2.6725 + (3.7362 + 4(4.1328 ) + 4.5498 ) = 3.4997

s.
3 bu
Second improvement: {Put r = 1 in Eqn (2)}
la

h
y (2)
4,c = y 2 + (z 2 + 4z 3 + z (1)4 ) = y 2 + h (z 2 + 4z 3 + z (1)4,c )
yl

3 3
lls

0.1
= 2.4649 + (2.6725 + 4(3.0657 ) + 3.4997 )
3
.a

= 3.0794
w
w

Since y (1) (2)


4,c & y 4,c are the same correct to four decimal places
w

y(1.4) = 3.0794

__________________________________________________________

Problem (3):

d2 y dy
Given 2
+x + y = 0 , y(0) = 1, y / (0) = 0. Find y(0.4) correct four
dx dx
decimal places by Milne' s method after finding y(0.1), y / (0.1), y(0.2),
y / (0.2), y(0.3) and y / (0.3) using Picard' s method with third approximat ion.

dy
Set = z , then the given equation becomes
dx
dz
+ xz + y = 0 with conditions y(0) = 1, z(0) = 0
www.allsyllabus.com
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = −(y + xz ), h = 0.1
vtu.allsyllabus.com www.allsyllabus.com

Soln:

x0=0 x1=0.1 x2=0.2 x3=0.3 x4=0.4


y0=1 y(x1)=? y(x2)=? y(x3)=? y(x4)=?
z0=0 z(x1)=? z(x2)=? z(x3)=? -----

Picard’s method Milne’s method

The Picard' s iterative formula is given by

m
x
y n = y 0 + ∫ f(x, y n-1, zn-1 )dx = y 0 +
x
∫ (zn-1 )dx
x x 
 − − − −(1)

co
0 0

x x
z n = z 0 + ∫ φ(x, y n-1, z n-1 )dx = z 0 − ∫ (y n-1 + xz n-1 )dx 
x x 

s.
0 0

bu
Step (1): To find y(0.1) & z(0.1)
la

Put n = 1 in Eqn(1)
yl

x 0.1
y1 = y 0 + ∫ (z0 )dx = 1 + ∫ (0 )dx =1
lls

x 0
0
x 0.1
z1 = z 0 + ∫ − ( y 0 + xz0 )dx = 0 − (1 + x(0))dx = −0.1
.a


x 0
0
w
w

Put n = 2 in Eqn(1)
w

x 0.1
y2 = y0 + ∫ (z1 )dx = 1+ ∫ (- 0.1)dx = 0.99
x 0
0
x 0.1
z 2 = z 0 + ∫ − (y 1 + xz1 )dx = 0 - ∫ (1 + x(- 0.1))dx = −0.0985
x 0
0

Put n = 3 in Eqn(1)
x 0.1
y3 = y0 + ∫ (z 2 )dx = 1+ ∫ (- 0.0995 )dx =0.9900
x 0
0
x 0.1
z 3 = z 0 + ∫ − (y 2 + xz 2 )dx = 0 - ∫ (0.99 + x(- 0.0995 ))dx = −0.0985
x 0
0

∴ y(0.1) = 0.9900 & z(0.1) = −0.0985

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

m
Step (2): To find y(0.2) & z(0.2)

co
Put n
Let x 0==20.1
in, Eqn(1)
y 0 = 0.99 , z 0 = −0.0985

s.
x 0.2
y 2 = y 0 + ∫ (z1 )dx = 0.99 - ∫ (0.1960 )dx = 0.9704
x 0.1
Put n = 1 in Eqn(1)
0
bu
x 0.2
z 2 = z 0 + x∫ − (y1 + xz1 )dx = 0.2
−0.0985 - ∫ (0.9801 + x (- 0.1960 ))dx
y1 = y 0 + x∫ (z 0 )dx = 0.99 + ∫ (- 0.09850.1
)dx =0.9801
la
0

x 0
0.1
= −0.1935
yl

Put n = 3x in Eqn(1)
z1 = z 0 + ∫ x− ( y 0 + xz0 )dx 0.2
lls

y 3 = y 0 +x ∫ (z 2 )dx = 0.99 + ∫ (- 0.1935 )dx =0.9706


0

x 0.1
.a

0
0.2
= - 0.0985
x − ∫ (0.99 + x (- 0.0985 ))dx0.2 = −0.1960
z 3 = z 0 + ∫ − (y 20.1+ xz 2 )dx = −0.0985 - ∫ (0.9704 + x (- 0.1935 ))dx
w

x 0
0.1

= −0.1926
w

∴ y(0.2) = 0.9706 & z(0.2) = −0.1926


w

Step (3): To find y(0.3) & z(0.3)

Let x 0 = 0.2 , y 0 = 0.9706 , z 0 = −0.1926

Put n = 1 in Eqn(1)
x 0.3
y1 = y 0 + ∫ (z 0 )dx = 0.9706 + ∫ (- 0.1926 )dx =0.9513
x 0
0.2
x
z1 = z 0 + ∫ − ( y 0 + xz0 )dx www.allsyllabus.com
x 0

0.3
vtu.allsyllabus.com www.allsyllabus.com

m
co
s.
bu
Put n = 2 in Eqn(1)
la
x 0.3
y2 = y0 + ∫ (z1 )dx = 0.9706 - ∫ (0.2848 )dx = 0.9421
x 0.2
yl

x 0.3
z 2 = z 0 + ∫ − (y1 + xz1 )dx = −0.1926 - ∫ (0.9513 + x(- 0.2848 ))dx
lls

x 0
0.2

= −0.2806
.a

Put n = 3 in Eqn(1)
w

x 0.3
y3 = y0 + ∫ (z 2 )dx = 0.9706 + ∫ (- 0.2806 )dx =0.9425
w

x 0
0.2
x 0.3
w

z 3 = z 0 + ∫ − (y 2 + xz 2 )dx = −0.1926 - ∫ (0.9421 + x(- 0.2806 ))dx


x 0
0.2

= −0.2797
∴ y(0.3) = 0.9425 & z(0.3) = −0.2797

y i = y(x i ) dz
zi = z(xi ) z/ = = −(y + xz)
dx

y1 = 0.9900 z1 = −0.0985 z1/ = −(y1 + x1z1 )


= -(0.99 + 0.1x - 0.0985)
= -0.9801

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

z 2 = −0.1926 z 2/ = −(y 2 + x 2 z 2 )
y 2 = 0.9706
= -(0.9706 + 0.2x - 0.1926)
= -0.9320
y 3 = 0.9425 z 3 = −0.2797 z 3/ = −(y 3 + x 3 z 3 )
= -(0.9425 + 0.3x - 0.2797)
= -0.8585

Milne’s Predictor formula

4h
(2z1 − z 2 + 2z 3 ) 

m
y 4,p = y 0 +
3 
 − − − − − (2)

co
4h
z 4,p = z0 + (2z1 − z2 + 2z 3 ) 
/ / /

s.
bu
4(0.1)
(2(− 0.0985 ) − (− 0.1926 ) + 2(- 0.2797 ))
la
∴ y 4,p = 1 +
3
yl

= 0.9248
ls

4(0.1)
z 4,p = 0 + (2(− 0.9801) − (− 0.9320 ) + 2(- 0.8585 ))
3
l
.a

= −0.3660
w
w

Milne’s Corrector formula



w

h
y (r4,+c1) = y 2 + (z 2 + 4z 3 + z (r)
4 ) 
3
 − − − −(3)
h
(
z (r4,+c1) = z 2 + z 2/ + 4z 3/ + (z 4/ )
3
(r )
)


where y (0)
4 = y 4,p & y (r) (r)
4 = y 4,c for r ≠ 0

z (0)
4 = z 4,p & z (r) (r)
4 = z 4,c for r ≠ 0

(z )( ) = φ(x
/
4
r
4 4 , z4 )
, y (r) (r)

First improvement: {Put r = 0 in Eqn (3)}

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

h
y (1)
4,c = y 2 + (z 2 + 4z3 + z(0)4 ) = y 2 + h (z 2 + 4z3 + z 4,p )
3 3
0.1
= 0.9706 + (− 0.1926 + 4(- 0.2797 ) − 0.3660 ) = 0.9146
3
z (1)
4,c = z 2 +
h /
3
(
z 2 + 4z 3/ + (z 4/ )
(0 )
)
where
(z )( ) = φ(x , y
/
4
0
4
(0)
4 4 ) = φ(x 4 , y 4,p , z 4,p ) = −(y 4,p + x 4 z 4,p ) = −0.7784
, z (0)
0.1
∴ z (1)
4,c = -0.1926 + (− 0.9320 + 4(- 0.8585 ) − 0.7784 )
3
= −0.3641

m
co
s.
bu
la
Second improvement: {Put r = 1 in Eqn (3)}
yl

h
y (2)
4,c = y 2 + (z 2 + 4z 3 + z (1)4 ) = y 2 + h (z 2 + 4z 3 + z(1)4,c )
lls

3 3
0.1
= 0.9706 + (− 0.1926 + 4(- 0.2797 ) − 0.3641) = 0.9148
.a

3
w

z (2)
4,c = z 2 +
h /
3
(
z 2 + 4z 3/ + (z 4/ )
(1)
)
w

where
w

(z )( ) = φ(x
/
4
1
4 4 , z 4 ) = φ(x 4 , y 4,c , z 4,c ) = −(y 4,c + x 4 z 4,c ) = −0.7690
, y (1) (1) (1) (1) (1) (1)

0.1
∴ z (1)
4,c = -0.1926 + (− 0.9320 + 4(- 0.8585 ) − 0.7690 ) = −0.3638
3

Third improvement: {Put r = 2 in Eqn (3)}


h
y (3)
4,c = y 2 + (z2 + 4z 3 + z(2)4 ) = y 2 + h (z2 + 4z3 + z(2)4,c )
3 3
0.1
= 0.9706 + (− 0.1926 + 4(- 0.2797 ) − 0.3638 )
3
= 0.9148

Since y (2) (3)


4,c & y 4,c are the same correct to four decimal places

y(0.4) = 0.9148 www.allsyllabus.com


vtu.allsyllabus.com www.allsyllabus.com

__________________________________________________________

Problem (4):
Using the Milne' s method obtain an approximat e soloution at the point
d2 y dy
x = 0.4 of the problem 2
+ 3x − 6y = 0 ; y(0) = 1, y / (0) = 0.1 after
dx dx
evaluating y(0.1), y (0.1), y(0.2), y / (0.2), y(0.3) and y / (0.3) with the aid
/

om
of Picard' s second order approximat ion.

dy

.c
Soln: Set = z , then the given equation becomes
dx
dz
dx
us
+ 3xz - 6y = 0 with conditions y(0) = 1, z(0) = 0.1
b
∴ f (x, y, z ) = z & φ(x, y, z ) = 6y − 3xz
la
yl

x0=0 x1=0.1 x2=0.2 x3=0.3 x4=0.4


lls

y0=1 y(x1)=? y(x2)=? y(x3)=? y(x4)=?


z0=0.1 z(x1)=? z(x2)=? z(x3)=? -----
.a
w

Picard’s method Milne’s method


w
w

The Picard' s iterative formula is given by


x x 
yn = y 0 + ∫ f(x, yn-1, zn-1)dx = y0 + ∫ (zn-1)dx 

x 0
x 0 
 − − − −(1)
x x 
zn = z0 + ∫ φ(x, yn-1, zn-1)dx = z0 − ∫ (6 y n −1 - 3xzn-1)dx 
Step (1): To find y(0.1) & z(0.1)
x x 
0 0 
Put n = 1 in Eqn(1)
x 0.1
y1 = y0 + ∫ (z0 )dx = 1 + ∫ (0.1)dx =1.01
x 0
0
www.allsyllabus.com
x 0.1
z1 = z0 + ∫ (6 y0 + 3 xz0 )dx = 0.1 + ∫ (6(1) - 3(0.1)x )dx = 0.6985
vtu.allsyllabus.com www.allsyllabus.com

Put n = 2 in Eqn(1)
x 0.1
y 2 = y 0 + ∫ (z1)dx = 1 + ∫ (0.6985 )dx = 1.0698
x 0 0

x
z2 = z0 + ∫ (6y1 − 3xz1)dx
x

m
0

0.1

co
= 0.1 + ∫ (6(1.01) − 3(0.6985 )x )dx = 0.6955
0

s.
Step (2): To find y(0.2) & z(0.2)
∴ y(0.1) = 1.0698
bu
z(0.1) = 0.6955
la
yl
lls

Step (2): To find y(0.2) & z(0.2)


.a

Let x 0 = 0.1, y 0 = 1.0698 , z 0 = 0.6955


w
w

Put n = 1 in Eqn(1)
w

x 0.2
y1 = y 0 + ∫ (z 0 )dx = 1.0698 + ∫ (0.6955 )dx =1.1393
x 0
0.1
x
z1 = z 0 + ∫ (6 y 0 − 3xz 0 )dx
x 0

0.2
= 0.6955 + ∫ (6(1.0698 ) − 3(0.6955 )x )dx = 1.3060
0.1

Put n = 2 in Eqn(1)
x 0.2
y2 = y0 + ∫ (z1)dx = 1.0698 + ∫ (1.3060 )dx = 1.2004
x 0
0.1
x 0.2
z 2 = z0 + ∫ (6y1 − 3xz1)dx = 0.6995 + ∫ (6(1.1393 ) − 3(1.3060 )x )dx = 1.3203
x 0.1 Dr. V. Ramachandra Murthy
0 www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Step (3): To find y(0.3) & z(0.3)

Step (3): To find y(0.3) & z(0.3)

Let x 0 = 0.2 , y 0 = 1.2004 , z 0 = 1.3203

m
Put n = 1 in Eqn(1)

co
x 0.3
y1 = y 0 + ∫ (z 0 )dx = 1.2004 + ∫ (1.3203 )dx =1.3324
x 0
0.2

s.
x
z1 = z 0 + ∫ (6 y 0 − 3xz 0 )dx bu
x 0

0.3
= 1.3203 + ∫ (6(1.2004 ) − 3(1.3203 )x )dx = 1.9415
la
0.2
yl
lls
.a

Put n = 2 in Eqn(1)
w

x 0.3
y 2 = y 0 + ∫ (z1)dx = 1.2004 + ∫ (1.9415 )dx
w

x 0.2
w

= 1.3945
x
z 2 = z0 + ∫ (6y1 − 3xz1)dx
x 0

0.3
= 1.3203 + ∫ (6(1.3324 ) − 3(1.9415 )x )dx
0.2
= 1.9741

∴ y(0.3) = 1.3945 & z(0.3) = 1.9741

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

y i = y(x i ) dz
zi = z(xi ) z/ = = 6 y − 3 xz
dx

y1 = 1.0698 z1 = 0.6955 z1/ = 6y1 − 3x 1z1


= 6(1.0698) − 3(0.1)(0.6 955)
= 6.2101

y 2 = 1.2004 z 2 = 1.3203 z 2/ = 6y 2 − 3x 2 z 2
= 6(1.2004) − 3(0.2)(1.3 203)
= 6.4102
z3/ = 6 y 3 − 3 x3 z3

m
y 3 = 1.3945 z 3 = 1.9741
= 6( 1.3945 ) − 3( 0.3 )( 1.9741)

co
= 6.5903

s.
Milne’s Predictor formula bu
y 4,p = y 0 +
4h
(2z1 − z 2 + 2z 3 ) 
3 
 − − − − − (2)
la
4h
z 4,p = z0 + (2z1 − z 2 + 2z 3 ) 
/ / /
yl

3
lls
.a

4(0.1)
w

∴ y 4,p = 1 + (2(0.6955 ) − (1.3203 ) + 2(1.9741))


3
w

= 1.5358
w

4(0.1)
z 4,p = 0.1 + (2(6.2101) − (6.4102 ) + 2(6.5903 ))
3
= 2.6587

Milne’s Corrector formula


h 
y (r4,+c1) = y 2 +
3
( 4 )
z 2 + 4z 3 + z (r) 
 − − − −(3)
z (r4,+c1)
h
(
= z 2 + z 2/ + 4z 3/ + (z 4/ )
3
(r )
)


where
y (0) (r) (r)
4 = y 4,p & y 4 = y 4,c for r ≠ 0

z (0) (r) (r)


4 = z 4,p & z 4 = z 4,c for www.allsyllabus.com
r≠0
(z )( ) = φ(x , y
/
4
r
4
(r)
4 4 )
, z (r)
vtu.allsyllabus.com www.allsyllabus.com

First improvement: {Put r = 0 in eqn(3)}

h h
= y 2 +  z 2 + 4z 3 + z  = y 2 + z 2 + 4z 3 + z 4,p
(1) (0)
y
4,c 3 4  3
( )
0.1
= 1.2004 + (1.3203 + 4(1.9741) + 2.6587 ) = 1.5962
3
(1) h  / /  / 
(0) 
z = z2 + z + 4z +  z  
4,c 3  2 3  4 

where
(0) 

om
 z /  = φ x 4 , y , z  = φ x 4 , y 4,p , z 4,p = 6y 4,p − 3x 4 z 4,p ) = 6.0244
(0) (0) ( )
  4  4 4 
0.1

.c
(1) (6.4102 + 4(6.5903 ) + 6.0244 )
∴z = 1.3203 +
4,c 3
= 2.6135
b us
Second improvement: {Put r = 1 in eqn(3)}
la

= y 2 +  z 2 + 4z 3 + z  = y 2 +  z 2 + 4z 3 + z
(2) h (1) h (1) 
yl

4,c 
y
4,c 3 4  3
lls

0.1
= 1.2004 + (1.3203 + 4(1.9741) + 2.6135 ) = 1.5947
.a

3
h (1) 
w

= z 2 +  z / + 4z / +  z /  
(2)
z
4,c 3  2 3  4 
w


w

where
(1)
 z /  = φ x , y(1) , z(1)  = φ x , y (1) , z(1)  = 6y (1) − 3x z(1) ) = 6.4410
 4 4 4   4 4,c 4,c  4 4,c
 4    4,c
(2) 0.1
∴z
4,c
= 1.3203 + (6.4102 + 4(6.5903 ) + 6.4410 )
3
= 2.6274

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Third improvement: {Put r = 2 in eqn(3)}

y (3) = y 2 +  z 2 + 4z 3 + z(2)  = y 2 +  z 2 + 4z 3 + z(2) 


h h
4,c 3 4  3 4,c 
0.1
= 1.2004 + (1.3203 + 4(1.9741) + 2.6274 ) = 1.5952
3
h (2) 
= z 2 +  z / + 4z / +  z /  
(3)
z
4,c 3  2 3  4 

where
(2) 
 z /  = φ x 4 , y 4 , z 4  = φ x 4 , y 4,c , z 4,c  = 6y 4,c − 3x 4 z 4,c ) = 6.4153
(2) (2) (2) (2) (2) (2)
  4    

m
0.1
∴ z(2) = 1.3203 + (6.4102 + 4(6.5903 ) + 6.4153 )
4,c 3

co
= 2.6265

s.
Fourth improvement: {Put r = 3 in eqn(3)}
bu
h h
= y 2 +  z 2 + 4z 3 + z  = y 2 +  z 2 + 4z 3 + z
(4) (3) (3) 
4,c 
y
la
4,c 3 4  3
= 1.5952
yl
lls

(3) (4)
Since y & y are the same correct to four decimal places
.a

4,c 4,c
y(0.4) = 1.5952
w
w

Problem(5):
w

d2 y
Given = 1 + x + y 2 , y(0) = 2 , y / (0) = 1. Find y(0.4)
dx 2
correct four decimal places by Milne' s method after finding
y(0.1), y / (0.1), y(0.2), y / (0.2), y(0.3) and y / (0.3) using
Picard' s method with second approximat ion.

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Soln:

dy
Set = z , then the given equation becomes
dx
dz
= 1 + x + y 2 with conditions y(0) = 2, z(0) = 1
dx
∴ f (x, y, z ) = z & φ(x, y, z ) = 1 + x + y 2

x0 = 0 x1 = 0.1 x 2 = 0 .2 x 3 = 0 .3 x 4 = 0 .4
y0 = 2 y(x1) = ? y(x 2 ) = ? y(x 3 ) = ? y(x 4 ) = ?

m
z0 = 1 z(x1) = ? z(x 2 ) = ? z(x 3 ) = ?

co
s.
Using Picard’s method
bu
Using Milne’s method
la

The Picard' s iterative formula is given by


yl

x x 

lls

yn = y 0 + ∫ f(x, yn-1, zn-1)dx = y 0 + ∫ (zn-1)dx 


x x 
.a

0 0
 − − − −(1)
x x 
zn = z 0 + ∫ φ(x, y n-1, zn-1)dx = z 0 + ∫ 1 + x + (y n-1)2 dx 
w

  
w

x 0
x 
0
w

Step(1): To find y(0.1) & z(0.1)

Put n = 1 in Eqn(1)
x 0.1
y1 = y 0 + ∫ (z 0 )dx = 2 + ∫ (1)dx =2.1
x 0
0
x 0.1
1 + x + (y )2 dx = 1 + 1 + x + (2)2 dx = 1.505
z1 = z 0 + ∫  0  ∫  
x 0
0

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Put n = 2 in Eqn(1)
x 0.1
y 2 = y 0 + ∫ (z1)dx = 2 + ∫ (1.505 )dx
x 0
0
= 2.1505

x
1 + x + (y )2 dx
z 2 = z0 + ∫  1 
x 0

0.1
= 1 + ∫ 1 + x + (2.1)2 dx = 1.546
 
0

m
co
∴ y(0.1) = 2.1505 & z(0.1) = 1.546

s.
bu
la
yl
lls
.a
w
w
w

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Step(2): To find y(0.2) & z(0.2)

Let x 0 = 0.1, y 0 = 2.1505 , z 0 = 1.546

Put n = 1 in Eqn(1)
x 0.2
y1 = y 0 + ∫ (z 0 )dx = 2.1505 + ∫ (1.546 )dx =2.3051
x 0
0.1

x
1 + x + (y )2 dx

m
z1 = z 0 + ∫  0 
x

co
0

0.2
1 + x + (2.1505 )2 dx = 2.1234

s.
= 1.546 +
 
0.1
bu
Put n = 2 in Eqn(1)
la
x 0.2
y 2 = y 0 + ∫ (z1)dx = 2.1505 + ∫ (2.1234 )dx
yl

x 0.1
lls

= 2.3628
.a
w

x 0.2
1 + x + (y )2 dx = 1.546 + 1 + x + (2.3051)2 dx
z 2 = z0 + ∫ ∫
w

 1   
x 0.1
w

= 2.1923

∴ y(0.2) = 2.3628 & z(0.2) = 2.1923

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Step(3): To find y(0.3) & z(0.3)

Let x 0 = 0.2 , y 0 = 2.3628 , z0 = 2.1923

Put n = 1 in Eqn(1)
x 0.3
y1 = y 0 + ∫ (z0 )dx = 2.3628 + ∫ (2.1923 )dx =2.5820
x 0
0.2

m
x
1 + x + ( y )2 dx
z1 = z 0 + ∫  0 

co
x 0

0.3

s.
1 + x + (2.3628 )2 dx = 2.8755
= 2.1923 + ∫  
bu
0.2
la
Put n = 2 in Eqn(1)
x 0.3
yl

y 2 = y 0 + ∫ (z1)dx = 2.3628 + ∫ (2.8755 )dx


lls

x 0
0.2
.a

= 2.6503
w

x 0.3
w

1 + x + (y )2 dx = 2.1923 + 1 + x + (2.5820 )2 dx


z 2 = z0 + ∫  1  ∫  
w

x 0
0.2
= 2.9839

∴ y(0.3) = 2.6503 & z(0.3) = 2.9839

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

dz
yi = y(xi ) zi = z(xi ) z/ = = 1+ x + y2
dx
z / = 1 + x1 + (y1)2
1
y1 = 2.1505 z1 = 1.5460
= 1 + 0.1 + (2.1505 )2
= 5.7246
z / = 1 + x 2 + (y 2 )2
2
y 2 = 2.3628 z 2 = 2.1923
= 1 + 0.2 + (2.3628 )2
= 6.7828

m
z / = 1 + x 3 + (y 3 )2
3

co
y 3 = 2.6503 z3 = 2.9839
= 1 + 0.3 + (2.6503 )2

s.
= 8.3240
bu
la

Milne’s Predictor formula


yl
ls

y 4,p = y 0 +
4h
(2z1 − z 2 + 2z3 ) 

l

3
.a

 − − − − − (2)
4h  /
 2z − z 2 + 2z 3 
z 4,p = z0 + / /
w

3  1 
w

4(0.1)
∴ y 4,p = 2 + (2(1.5460 ) − (2.1923 ) + 2(2.9839 ))
w

3
= 2.9157
4(0.1)
z 4,p = 1 + (2(5.7246 ) − (6.7828 ) + 2(8.3240 ))
3
= 3.8419

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com



Milne' s corrector formula : 

(r +1) h (r)  
y = y 2 +  z 2 + 4z 3 + z   − − − −(3)
4,c 3 4  
h (r ) 
= z 2 +  z / + 4z / +  z /  
(r +1)
z
4,c 3  2 3  4  


where
(0) (r) (r)
y = y 4,p & y = y for r ≠ 0
4 4 4,c

m
(0) (r) (r)
z = z 4,p & z = z for r ≠ 0
4 4 4,c

co
(r )
 z /  = φ x , y(r), z(r) 
 4 4 4 

s.
 4   bu
First improvement: {Put r = 0 in eqn(3)}
la
h h
= y 2 +  z 2 + 4z 3 + z  = y 2 + z 2 + 4z 3 + z 4,p
(1) (0)
y
4,c 3 4  3
( )
yl

0.1
lls

= 2.3628 + (2.1923 + 4(2.9839 ) + 3.8419 ) = 2.9618


3
.a

h (0) 
= z 2 +  z / + 4z / +  z /  
(1)
z
4,c 3  2 3  4 
w


w

where
w

(0)
 z / = φ x 4 , y , z  = φ x 4 , y 4,p , z 4,p = 1 + x 4 + y 4,p 2 = 9.9013
(0) (0)
 4  4 4 
( ) ( )
(1) 0.1
∴z
4,c
= 2.1923 + (6.7828 + 4(8.3240 ) + 9.9013 )
3
= 3.8583

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Second improvement: {Put r = 1 in eqn(3)}

h h
y 4,c = y 2 +  z 2 + 4z 3 + z 4  = y 2 +  z 2 + 4z 3 + z 4,c 
(2) (1) (1)
3  3 
0.1
= 2.3628 + (2.1923 + 4(2.9839 ) + 3.8583 ) = 2.9623
3
h (1) 
z(2) = z 2 +  z / + 4z / +  z /  
4,c 3  2 3  4 

where
(1) 2
 z /  = φ x , y(1) , z(1)  = φ x , y(1) , z(1)  = (1 + x +  y(1)  ) = 10.1722

m
 4 4   4 4,c 4,c  4  
 4  4     4,c 

co
(2)
∴ z 4,c = 3.8673

s.
Similarly
bu
Put r = 2 in Eqn(3)
la
(3)
y = 2.9626
4,c
yl

(3)
z = 3.8674
lls

4,c
.a

Put r = 3 in Eqn(3)
w

(4)
y = 2.9626
w

4,c
w

(3) (4)
Since y & y are the same correct to four decimal places
4,c 4,c
y(0.4) = 2.9626

www.allsyllabus.com
vtu.allsyllabus.com www.allsyllabus.com

Problem(6):

d2 y dy
Given = 1+ , y(0) = 1, y / (0) = 1. Find y(0.4)
dx 2 dx
correct four decimal places by Milne' s method after finding
y(0.1), y / (0.1), y(0.2), y / (0.2), y(0.3) and y / (0.3) using
Picard' s method with second approximat ion.

{Ans : y(0.4) = 1.5752}

m
Problem(7):

co
Apply Milne' s method to compute y(0.4) given that

s.
d2 y dy
+ = 2e x and
bu
dx 2 dx
la
x 0 0.1 1.2 1.3
yl

y 2 2.01 2.04 2.09


/
0 0.2 0.4 0.6
lls

y
.a

{Ans : y(0.4) = 2.16}


w
w
w

www.allsyllabus.com

You might also like