0% found this document useful (0 votes)
22 views137 pages

Unit - 2 Numerical Solutions of First Order ODE: Mathematics - II

The document outlines the second unit of a B.Tech Mathematics course focused on numerical solutions of first-order ordinary differential equations (ODEs). It covers various methods including Euler's Method, Modified Euler's Method, and Runge-Kutta Methods, along with examples illustrating their application. The introduction emphasizes the necessity of numerical methods for solving differential equations in many scientific and engineering problems where analytical solutions are not feasible.

Uploaded by

lakhtariakevin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views137 pages

Unit - 2 Numerical Solutions of First Order ODE: Mathematics - II

The document outlines the second unit of a B.Tech Mathematics course focused on numerical solutions of first-order ordinary differential equations (ODEs). It covers various methods including Euler's Method, Modified Euler's Method, and Runge-Kutta Methods, along with examples illustrating their application. The introduction emphasizes the necessity of numerical methods for solving differential equations in many scientific and engineering problems where analytical solutions are not feasible.

Uploaded by

lakhtariakevin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 137

B.Tech.

2nd Semester
Mathematics – II (2301HS201)

Unit – 2
Numerical
Solutions of
First Order ODE
Prof. Darshan Pipaliya
Department of Humanities &
Science
Darshan Institute of Engineering & Technology, Rajkot
darshan.pipaliya@darshan.ac.in
8160597689
 Looping
Topics of Unit 2
 Numerical Solutions of First Order ODE
• Euler’s Method
• Modified Euler’s Method
• Runge – Kutta Methods (3rd & 4th Order)
• Predictor-Corrector Methods
 Milne’s Method
 Adam’s Bashforth Method
 Looping
Outline of Unit 2
 Euler’s Method
 Modified Euler’s Method
 Third Order Runge – Kutta Method
 Fourth Order Runge – Kutta Method
 Milne’s Method
 Adam’s Bashforth Method
Introduction

 Many problems in science and engineering can be reduced to


the problem of solving differential equations satisfying given
certain conditions.
 The analytical method of solutions of differential equations can
be applied to only a selected class of differential equations. In
many physical and engineering problems these methods cannot
be used and hence numerical methods are used to solve such
differential equation.

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 4
Method – 1
Euler’s Method
Euler’s Method to Solve First Order ODE
Consider the differential equation
dy
=f ( x, y ) with y ( x 0 )= y 0 ,then
dx
𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=0 , 1 ,2 , 3 , … , n −1
𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0,1,2,3 ,… ,n− 1
xn − x0
h= is step size, where m is number of steps.
m
Notes: (1). Euler’s Method is also known as First Order Runge -
Kutta (2).
Method.
This method is slow to obtain desired accuracy. For that
We need to take small value of h.
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 6
Procedure to Solve First Order ODE by Euler’s
Method
(1). from differential equation.

(2). Identify x 0∧ y 0 ¿ initial condition y (x 0 )= y 0 .


(3). Identify x n from instruction.
xn − x0
(4). Calculate h if required by using h= .
m
(5). Find x 1 ,x 2 ,…, x n by using.
(6). Find by using .

(7). is the required numerical solution of given ODE.


#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 7
Method : 1 Example : 1
Exampl
e:1

Here,
Solution
x 0 =0 , y 0 =1
:
, =5
x n =0.1 m
x n − x¿ 0.1 − 0
h= 0
5
¿ 0.02
m

y ( 0.1 ) =?

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 8
Method : 1 Example : 1 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 0 +0.02=0.02 x 0 =0 ,y 0 =1 ,h =0.02
⇒ x 1 =0.02 𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
y 1 = y 0 +h ⋅ f ( x 0 , y 0 )
f ( x , y ) =x + y + xy
y 1 =1+0.02 ⋅f ( 0 ,1 )
y 1 =1+0.02 { 0 +1+0 ( 1 ) }
y 1 =1+0.02 ( 1 )
⇒y 1 = y ( x 1 )= y ( 0.0 2 )=1 .02
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 9
Method : 1 Example : 1 (Continue)
Step : 2 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=1
x 2= x1 + h¿ 0 .02+ 0.02=0.0 4 x 1=0.02 ,y 1 =1.02
h=0.02
,
⇒ x 2 =0.04 𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=1
y 2 = y 1 +h ⋅ f ( x 1 , y 1 ) f ( x , y ) =x + y + xy
y 2 =1.02+ 0.02⋅ f ( 0 .02 , 1.02 )
y 2 =1.02+ 0.02⋅ { 0 .02+1 .02+0 .02 ( 1.02 ) }
y 2 =1.02+0.02 (1.0604 )
⇒y 2 = y ( x 2 ) = y ( 0.0 4 ) =1.0412
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 10
Method : 1 Example : 1 (Continue)

Step : 3 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 2
x 3 =x 2+ h¿ 0 .04 +0.02=0.0 6 x 2=0.04 ,y 2 =1.0412h=0.02
,
⇒ x 3 =0.06 𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=2
y 3 = y 2 +h⋅ f ( x 2 , y 2 ) f ( x , y ) =x + y + xy
y 3 =1 .0412+0.02 ⋅f ( 0 .04 , 1.0412 )
y 3 =1 .0412+0.02 ⋅ { 0 .04 +1 .0412+0 .04 ( 1 .0412 ) }
y 3 =1 .0412+0.02 ( 1.1228 )
⇒y 3 = y ( x 3 ) = y ( 0.0 6 )=1.0637
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 11
Method : 1 Example : 1 (Continue)

Step : 4 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 3
x 4 =x 3 + h¿ 0 .06 +0.02=0.0 8 x 3 =0.06 ,y 3 =1.0637h=0.02
,
⇒ x 4=0.08 𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=3
y 4= y 3 +h ⋅ f ( x 3 , y 3 ) f ( x , y ) =x + y + xy
y 4=1 .0637+0.02 ⋅f ( 0 .06 ,1.0637 )
y 4=1 .0637+0.02 ⋅ { 0 .06 +1.0637+0 .06 ( 1.0637 ) }
y 4=1 .0637+ 0.02 ( 1.1875 )
⇒y 4= y ( x 4 ) = y ( 0. 08 )=1 .0875
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 12
Method : 1 Example : 1 (Continue)

Step : 5 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 4
x 5= x 4 +h¿ 0 .08 +0.02=0. 1 x 4 =0.08 ,y 4=1.0875h=0.02
,
⇒ x 5 =0.1 𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=4
y 5 = y 4 +h ⋅ f ( x 4 , y 4 ) f ( x , y ) =x + y + xy
y 5 =1.0875 +0.02 ⋅ f ( 0 .08 ,1.0875 )
y 5 =1.0875 +0.02 ⋅ { 0.08 +1.0875+0 .08 ( 1.0875 ) }
y 5 =1.0875 +0.02 ( 1.2545 )
⇒ y 5 = y ( x 5 ) = y ( 0.1 ) =1.1126
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 13
Method : 1 Example : 2
Exampl
e:2

Solution y− x
: Here , f ( x , y ) =
y+x
x 0 =0 , y 0 =1
x n =0.3
h=0.1
y ( 0.3 )=?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 14
Method : 1 Example : 2 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 0 +0. 1=0.1 x 0 =0 ,y 0 =1 ,h=0.1
⇒ x 1 =0.1 𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
y 1 = y 0 +h ⋅ f ( x 0 , y 0 ) y− x
y 1 =1+0.1 ⋅f ( 0 ,1 ) f ( x , y )=
y+x
y 1 =1+0.1
1 −0
1+ 0 ( )
y 1 =1+0.1 ( 1 )
⇒y 1 = y ( x 1 )= y ( 0.1 ) =1 .1
Prof. Darshan Pipaliya
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
15
Method : 1 Example : 2 (Continue)
Step : 2 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=1
x 2= x1 + h¿ 0 .1+ 0.1=0. 2 x 1=0.1 ,y 1 =1.1h=0.1
,
⇒ x 2 =0.2 𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=1
y 2 = y 1 +h ⋅ f ( x 1 , y 1 )
y− x
y 2 =1.1+ 0.1⋅ f ( 0 .1 , 1. 1 ) f ( x , y )=
y+x
y 2 =1.1+ 0.1 (
1.1− 0 .1
1.1+ 0.1 )
y 2 =1.1+ 0.1 ( 0.8333 )
⇒y 2 = y ( x 2 ) = y ( 0. 2 )=1 .1833
Prof. Darshan Pipaliya
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
16
Method : 1 Example : 2 (Continue)
Step : 3 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 2
x 3 =x 2+ h¿ 0 .2+ 0.1=0. 3 x 2=0.2 ,y 2 =1.1833 h
, =0.
⇒ x 3 =0.3 𝐲 𝐢+𝟏 = 𝐲 𝐢+ 𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=2
y 3 = y 2 +h⋅ f ( x 2 , y 2 ) y− x
y 3 =1.1833+0.1⋅ f ( 0.2,1.1833 ) f ( x , y )=
y+x
y 3 =1.1833+0.1 (
1.1833−0.2
1.1 833+0.2 )
y 3 =1 .1 833+0.1 ( 0.7108 )
⇒y 3 = y ( x 3 ) = y ( 0. 3 )=1 .2544
Prof. Darshan Pipaliya
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
17
Method – 2
Modified Euler’s Method
Modified Euler’s Method to Solve First Order
ODE
Consider the differential
dy
=f ( x, y ) with y ( x 0 )= y 0 ,then
equation
dx
,

𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+ 𝐤 𝟐
𝟐 ) , where
i=0,1,2,3,…,n−1
𝐤 𝟏=𝐡 ∙ 𝐟 ( 𝐱 𝐢 , 𝐲 𝐢 )

𝐤 𝟐=𝐡 ∙ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟏)
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 19
Modified Euler’s Method to Solve First Order
ODE
xn − x0
h= is step size, where m is number of steps.
m
Note: Modified Euler’s method is also
known as
Improved Euler’s
Method OR

2nd Order Runge - Kutta Method

OR

Heun’s Method.
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 20
Procedure to Solve First Order ODE by Modified
Euler’s Method
(1). Find from differential
equation.
(2). Identify x 0∧ y 0 ¿ initial condition y (x 0 )= y 0 .
(3). Identify x n from instruction.
xn − x0
(4). Calculate h if required by using h= .
m
(5). Find x 1 ,x 2 ,…, x n by using.

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 21
Procedure to Solve First Order ODE by Modified
Euler’s Method
(6). Find by using

𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+ 𝐤 𝟐
𝟐 ) , where
i=0,1,2,3,…,n−1
𝐤 𝟏=𝐡 ∙ 𝐟 ( 𝐱 𝐢 , 𝐲 𝐢 )

𝐤 𝟐=𝐡 ∙ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟏)

(7). is the required numerical solution of given ODE.

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 22
Method : 2 Example : 1
Exampl
e:1

Solution 2
: Here , f ( x , y ) =x − y
x 0 =0 , y 0 =1
x n =0.2
h=0.1
y ( 0.2 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 23
Method : 2 Example : 1 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 0 +0. 1=0.1 x 0 =0 ,y 0 =1 ,h=0.1
⇒ x 1 =0.1 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
k 1=h ⋅ f ( x 0 , y 0 ) f ( x , y )=x − y
2

k 1=0.1 ⋅ f ( 0 , 1 )
k 1=0.1 { 0 − ( 1 ) 2
}
⇒k 1=− 0.1
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 24
Method : 2 Example : 1 (Continue)
Step : 1 (Continue) 𝐤 𝟐=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟏 ) ,i
k 2=h⋅ f ( x 0 + h , y 0 +k 1) x 0 =0 ,h=0.1
k 2=0.1⋅ f ( 0+0.1 ,1 −0.1 ) y 0 =1 ,k 1=− 0.1

k 2= 0.1⋅ f ( 0.1 , 0.9 ) f ( x , y )=x − y

k 2=0.1 ( 0 .1− ( 0.9 ) 2


)
⇒k 2=− 0.0710

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 25
Method : 2 Example : 1 (Continue)
Step : 1 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+ 𝐤 𝟐
𝟐 ) , i=0
y1= y0 +
k1+ k2
2 ( ) y 0 =1 ,k 1=− 0.1,k 2=− 0.0710

y 1 =1+
2 ( − 0.1− 0.0710
) x 1= 0.1

y 1 =1− 0.0855
⇒ y 1 = y ( x 1 )= y ( 0.1 ) =0 .9145
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 26
Method : 2 Example : 1 (Continue)
Step : 2 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=1
x 2= x1 + h¿ 0 .1+ 0.1=0. 2 x 1=0.1 ,y 1 =0.9145h=0.1
,
⇒ x 2 =0.2 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=1
k 1=h ⋅ f ( x 1 , y 1 ) f ( x , y )=x − y
2

k 1=0.1 ⋅ f ( 0 .1 ,0.9145 )
k 1=0.1 { 0.1− ( 0.9145 ) 2
}
⇒k 1=− 0.0736
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 27
Method : 2 Example : 1 (Continue)
Step : 2 (Continue) 𝐤 𝟐=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟏 ) ,i=
k 2=h⋅ f ( x 1 +h , y 1 + k 1 ) x 1= 0.1h=0.1
,
k 2=0.1⋅ f ( 0 .1+0.1,0.9145− 0.0736 ) y 1 =0.9145k, 1=− 0.073
k 2=0.1⋅ f ( 0.2 , 0.8409 ) f ( x , y )=x − y
2

k 2=0.1 {0.2 −( 0.8409) 2


}
⇒k 2=− 0.0507

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 28
Method : 2 Example : 1 (Continue)
Step : 2 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+ 𝐤 𝟐
𝟐 ) ,i
y2= y1 + (− 0.0736 −0.0507
k 1 +k 2
2 ) k =− 0.0736k, =− 0.0507 y 1 =0.9145

y =0.9145+ (
2 ) 1 2
2 x 2= 0.2
y 2 =0.9145 − 0.0622
⇒ y 2 = y ( x 2 ) = y ( 0.2 ) =0 .8524
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 29
Method : 2 Example : 2
Exampl
e:2

Solution y− x
: Here , f ( x , y ) =
x =1 , y =2
0
√ xy
0

x n =1.3
h=0.1
y ( 1.3 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 30
Method : 2 Example : 2 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=0
x 1= x 0 + h¿ 1+ 0.1=1 .1 x 0 =1 ,y 0 =2 ,h =0.1
⇒ x 1 =1.1 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
k 1=h ⋅ f ( x 0 , y 0 ) y− x
f ( x , y )=
k 1=0.1 ⋅ f (1 , 2 ) √ xy
k 1=0.1
2 −1
√1 ( 2 ) ( )
⇒k 1=0.0707
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 31
Method : 2 Example : 2 (Continue)
Step : 1 (Continue) 𝐤 𝟐=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟏 ) ,i=
k 2=h⋅ f ( x 0 + h , y 0 +k 1) x 0 =1 ,h=0.1
k 2=0.1⋅ f ( 1+0.1 , 2+0.0707 ) y 0 =2 ,k 1=0.0707
k 2=0.1⋅ f ( 1.1, 2.0707 ) y− x

( )
2 .0707 −1 .1 f ( x , y )=
k 2=0.1 √ xy
√1 .1 ( 2.0707 )
⇒k 2= 0.0643
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 32
Method : 2 Example : 2 (Continue)
Step : 1 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+ 𝐤 𝟐
𝟐 ) , i=0
y1= y0 +
k1+ k2
2 ( ) y 0 =2 , k 1=0.0707k,2=0.064

y 1 =2+ ( 2
0.0707+ 0.0643
) x 1=1.1

y 1 =2+0.0675
⇒ y 1 = y ( x 1 )= y (1 . 1 )=2.0675
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 33
Method : 2 Example : 2 (Continue)
Step : 2 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=1
x 2= x1 + h¿ 1.1+ 0.1=1. 2 x 1=1.1y,1 =2.0675h=0.1
,
⇒ x 2 =1.2 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=1
k 1=h ⋅ f ( x 1 , y 1 ) y− x
f ( x , y )=
k 1=0.1 ⋅ f (1.1 , 2.0675 ) √ xy
k 1=0.1
2.0675 − 1.1
√1.1 ( 2.0675 ) ( )
⇒k 1=0.0642
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 34
Method : 2 Example : 2 (Continue)
Step : 2 (Continue) 𝐤 𝟐=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟏 ) ,i=
k 2=h⋅ f ( x 1 +h , y 1 + k 1 ) x 1=1.1
h=0.1
,
k 2=0.1⋅ f ( 1.1+0.1 , 2.0675+0.0642 ) y 1 =2.0675k, 1=0.064
k 2=0.1⋅ f ( 1.2 ,2.1317 ) y− x

(√ )
2 .1317 −1 .2 f ( x , y )=
k 2=0.1 √ xy
1 .2 ( 2.1317 )
⇒k 2= 0.0583
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 35
Method : 2 Example : 2 (Continue)
Step : 2 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+ 𝐤 𝟐
𝟐 ) , i=1
y2= y1 +
k 1 +k 2
2 (0.0642+0.0583) y 1 =2.0675k, 1=0.0642k,2=0.058

y 2 =2.0675+ ( 2 ) x 2=1

y 2 =2.0675+0.0613
⇒ y 2 = y ( x 2 ) = y ( 1. 2 ) =2.1288
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 36
Method : 2 Example : 2 (Continue)
Step : 3 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 2
x 3 =x 2+ h¿ 1.2+ 0.1=1 .3 x 2=1.2y,2 =2.1288h=0.1
,
⇒ x 3 =1.3 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=2
k 1=h ⋅ f ( x 2 , y 2 ) y− x
f ( x , y )=
k 1=0.1 ⋅ f (1.2 , 2.1288 ) √ xy
k 1=0.1
2.1288 − 1.2
√1.2 ( 2.1288 ) ( )
⇒k 1=0.0581
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 37
Method : 2 Example : 2 (Continue)
Step : 3 (Continue) 𝐤 𝟐=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟏 ) ,i
k 2=h⋅ f ( x 2 +h , y 2+ k 1 ) x 2=1.2
h=0.1
,
k 2=0.1⋅ f ( 1.2+0.1 , 2.1288+0.0581 ) y 2 =2.1288 ,k 1=0.058
k 2=0.1⋅ f ( 1.3 , 2.1869 ) y− x
2 .1869 −1 .3
( )
f ( x , y )=
k 2=0.1 √ xy
√1 .3 ( 2 .1869 )
⇒k 2= 0.0526
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 38
Method : 2 Example : 2 (Continue)
Step : 3 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+ 𝐤 𝟐
𝟐 ) , i=2
y3= y2 +
k1+ k2
2 (0.0581+0.0526) y 2 =2.1288k, 1=0.0581k,2=0.052

y 3 =2.1288+ ( 2 ) x 3 =1

y 3 =2.1288+0.0554
⇒ y 3 = y ( x 3 ) = y ( 1 . 3 )=2.1842
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 39
Method – 3
Third Order Runge – Kutta
Method
Third Order Runge – Kutta Method to Solve First
Order ODE dy
Consider the differential =f ( x, y ) with y ( x 0 )= y 0 ,then
dx
,equation
𝟏
𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟒 𝐤 𝟐 +𝐤 𝟑 ) ,where
𝟏
𝟔
𝐤 =𝐡 ∙ 𝐟 ( 𝐱 , 𝐲 ) 𝐢 𝐢
i=0,1,2,3,…,n−1
𝐤 𝟐=𝐡 ∙ 𝐟 𝐱 𝐢 +
𝟐 ( 𝟐
𝐡
, 𝐲 𝐢+
𝐤𝟏
)
𝐤 𝟑=𝐡 ∙ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 − 𝐤 𝟏 +𝟐 𝐤 𝟐 )
xn − x0
h= is step size, where m is number of steps.
m
Prof. Darshan Pipaliya
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
41
Procedure to Solve First Order ODE by Third Order Runge-Kutta Method

(1). Find from differential equation.

(2). Identify x 0∧ y 0 ¿ initial condition y (x 0 )= y 0 .


(3). Identify x n from instruction.
xn − x0
(4). Calculate h if required by using h= .
m
(5). Find x 1 ,x 2 ,…, x n by using.

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 42
Procedure to Solve First Order ODE by Third Order Runge-Kutta Method

(6). Find by using


𝟏
𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟒 𝐤 𝟐 +𝐤 𝟑 ) ,where
𝟔
i=0,1,2,3,…,n−1
𝐤 𝟐=𝐡 ∙ 𝐟 𝐱 𝐢 + ( 𝐡
𝟐
, 𝐲 𝐢+
𝐤𝟏
𝟐 )
(7). is the required numerical solution of given ODE.
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 43
Method : 3 Example : 1
Exampl
e:1

Solution
: Here , f ( x , y ) =−2 x − y
x 0 =0 , y 0 =−1
x n =0.2
h=0.1
y ( 0.2 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 44
Method : 3 Example : 1 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 0 +0. 1=0.1 , =0.1
x 0 =0 ,y 0 =−1 h
⇒ x 1 =0.1 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
k 1=h ⋅ f ( x 0 , y 0 ) f ( x , y ) =−2 x − y
k 1=0.1 ⋅ f ( 0 , −1 )
k 1=0.1 { − 2(0)− ( − 1 ) }
⇒k 1=0.1
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 45
Method : 3 Example : 1 (Continue)
Step : 1 (Continue)
𝐡
𝐤 𝟐=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (𝐤𝟏
𝟐
, i= )
h
k 2=h⋅ f x 0 + , y 0 +
2
k1
2 ( )0.1 x 0 =0 ,h=0.1
0.1
k 2=0.1⋅ f 0+ , −1+
2 2 ( ) , 1=0.1
y 0 =−1 k
f ( x , y ) =−2 x −
k 2=0.1⋅ f ( 0.05 , −0.95 )
k 2=0.1 {− 2 ( 0.05 ) − ( − 0.95 ) }
⇒k 2= 0.0850
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 46
Method : 3 Example : 1 (Continue)
Step : 1 (Continue) 𝐤 𝟑=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 − 𝐤 𝟏+𝟐 𝐤 𝟐 ) ,i=0
k 3=h⋅ f ( x 0 + h , y 0 −k 1+ 2 k 2 ) x 0 =0 ,h=0.1y, 0 =−1

k 2=0.1⋅ f ( 0+0.1,− 1− 0.1+2 ( 0.0850 ) ) k 1 =0.1 k, 2 =0.0850


k 2=0.1⋅ f ( 0.1 ,− 0.93 ) f ( x , y ) =−2 x − y
k 2=0.1 {− 2 ( 0.1 ) − ( −0.93 ) }
⇒k 3= 0.0730
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 47
Method : 3 Example : 1 (Continue)
𝟏
Step : 1 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟒 𝐤 𝟐 + 𝐤 𝟑 ) , i=
1 𝟔
y 1 = y 0 + ( k 1+ 4 k 2 + k 3 ) y 0 =−1 ,k 1=0.1 ,
6
1 k 2=0.0850k ,3=0.073
y 1 =−1+ { 0.1+4 ( 0.0850 ) +0.0730 }
6 x 1= 0.1
y 1 =−1+0.0855
⇒ y 1 = y ( x 1 )= y ( 0.1 ) =− 0.9145
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 48
Method : 3 Example : 1 (Continue)
Step : 2 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=1
x 2= x1 + h¿ 0 .1+ 0.1=0. 2 , =0.1
x 1=0.1 ,y 1 =−0.9145 h
⇒ x 2 =0.2 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=1
k 1=h ⋅ f ( x 1 , y 1 ) f ( x , y ) =−2 x − y
k 1=0.1 ⋅ f ( 0 .1 ,− 0.9145 )
k 1=0.1 { − 2(0 .1)− ( −0.9145 ) }
⇒k 1=0.0714
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 49
Method : 3 Example : 1 (Continue)
Step : 2 (Continue)
𝐡
𝐤 𝟐=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (
𝐤𝟏
𝟐
, i= )
( 0.1 ) 0.0714
h
k 2=h⋅ f x 1+ , y 1 +
2
k1
2
x 1=0.1h=0.1
,

k =0.1⋅ f ( 0.1+ ,−0.9145+


2 )
, 1=0.0714
y 1 =−0.9145 k
2
2 f ( x , y ) =−2 x −
k 2=0.1⋅ f ( 0.15 , −0.8788 )
k 2=0.1 {− 2 ( 0.15 ) − ( − 0.8788 ) }
⇒k 2= 0.0579
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 50
Method : 3 Example : 1 (Continue)
Step : 2 (Continue) 𝐤 𝟑=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 − 𝐤 𝟏+𝟐 𝐤 𝟐 ) ,i=1
k 3=h⋅ f ( x 1 +h , y 1 − k 1 +2 k 2 )
k 2=0.1⋅ f ( 0.1+0.1,− 0.9145−0.0714+2 ( 0.0579 ) )
k 2=0.1⋅ f ( 0.2 ,− 0.8702 ) x 1=0.1 h=0.1
, y, 1 =−0.9145
k 2=0.1 {− 2 ( 0.2 ) − ( −0.8702 ) } k 1=0.0714 k, 2=0.0579
⇒k 3= 0.0470 f ( x , y ) =−2 x −

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 51
Method : 3 Example : 1 (Continue)
𝟏
Step : 2 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟒 𝐤 𝟐 + 𝐤 𝟑 ) , i=
𝟔
1
y 2 = y 1 + ( k 1 + 4 k 2 +k 3 )
6
1
y 1 =−0.9145+ { 0.0714+4 ( 0.0579 ) +0.0 470 }
6
y 1 =−0.9145k, 1=0.071
y 1 =−0.9145 +0.5833
k 2=0.0579k ,3=0.0470
⇒ y 2 = y ( x 2 ) = y ( 0. 2 )=− 0 .8562 x 2= 0.2
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 52
Method : 3 Example : 2
Exampl
e:2

Solution
: Here , f ( x , y ) =2 xy
x 0 =1 , y 0 =1
x n =1.1
h=0.1
y ( 1.1 )=?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 53
Method : 3 Example : 2 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 1+ 0.1=1 .1 x 0 =1 ,y 0 =1h=0.1
,
⇒ x 1 =1.1 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
k 1=h ⋅ f ( x 0 , y 0 ) f ( x , y ) =2 xy
k 1=0.1 ⋅ f (1 , 1 )
k 1=0.1 { 2 (1) ( 1 ) }
⇒k 1=0.2
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 54
Method : 3 Example : 2 (Continue)
Step : 1 (Continue)
𝐡
𝐤 𝟐=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (𝐤𝟏
𝟐
, i= )
h
k 2=h⋅ f x 0 + , y 0 +
2
k1
2 ( )0.2 x 0 =1 ,h=0.1

k 2=0.1⋅ f 1+
0.1
2
,1+
2 ( ) y 0 =1k,1=0.2
f ( x , y ) =2 xy
k 2=0.1⋅ f ( 1.05 ,1.1 )
k 2=0.1 { 2 ( 1.05 )( 1.1 ) }
⇒k 2= 0.2310
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 55
Method : 3 Example : 2 (Continue)
Step : 1 (Continue) 𝐤 𝟑=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 − 𝐤 𝟏+𝟐 𝐤 𝟐 ) ,i=0
k 3=h⋅ f ( x 0 + h , y 0 −k 1+ 2 k 2 ) , 0=
x 0 =1 ,h=0.1 y

k 2=0.1⋅ f ( 1+0.1,1− 0.2+2 ( 0.2310 ) ) k 1=0.2k, 2=0.2310


k 2=0.1⋅ f ( 1.1, 1.2620 ) f ( x , y ) =2 xy
k 2=0.1 { 2 ( 1.1 ) ( 1.2620 ) }
⇒k 3= 0.2776
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 56
Method : 3 Example : 2 (Continue)
𝟏
Step : 1 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟒 𝐤 𝟐 + 𝐤 𝟑 ) , i=
𝟔
1 y 0 =1 ,k 1=0.2
y 1 = y 0 + ( k 1+ 4 k 2 + k 3 )
6 k =0.2310 k , =0.277
1 2 3
y 1 =1+ { 0. 2+4 ( 0. 2310 ) +0. 2 776 }
x 1=1.1
6
y 1 =1+0.2336
⇒ y 1 = y ( x 1 )= y (1 . 1 )=1.2336
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 57
Method : 3 Example : 3
Exampl
e:3

2 2
y − x
Solution Here , f ( x , y ) = 2 2
y +x
:
x 0 =0 , y 0 =1
x n =0.1
h=0.1
y ( 0.1 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 58
Method : 3 Example : 3 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 0 +0. 1=0.1 x 0 =0 ,y 0 =1h=0.1
,
⇒ x 1 =0.1 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
k 1=h ⋅ f ( x 0 , y 0 ) y
2
− x
2
f ( x , y )= 2 2
k 1=0.1 ⋅ f ( 0 , 1 ) y +x

{ }
2 2
( 1) −( 0)
k 1=0.1 2 2
( 1 ) +( 0 )
⇒k 1=0.1 #2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 59
Method : 3 Example : 3 (Continue)
Step : 1 (Continue)
𝐡
𝐤 𝟐=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (𝐤𝟏
𝟐
, i= )
h
k 2=h⋅ f x 0 + , y 0 +
2
k1
2 ( )0.1 x 0 =0 ,h=0.1
0.1
k 2=0.1⋅ f 0+ , 1+
2 2 ( ) y 0 =1k,1=0.1

k 2=0.1⋅ f ( 0.05 , 1.05 )

{ }
2 2
(1.05 ) − ( 0.05 )
k 2=0.1 2 2
( 1.05 ) + ( 0.05 )
⇒k 2= 0.0995 #2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 60
Method : 3 Example : 3 (Continue)
Step : 1 (Continue) 𝐤 𝟑=𝐡 ⋅ 𝐟 ( 𝐱𝐢 + 𝐡 , 𝐲 𝐢 − 𝐤 𝟏+𝟐 𝐤 𝟐 ) ,i=0
k 3=h⋅ f ( x 0 + h , y 0 −k 1+ 2 k 2 ) , 0=
x 0 =0 ,h=0.1 y

k 2=0.1⋅ f ( 0+0.1,1− 0.1+2 ( 0.0995 ) ) k 1=0.1k, 2=0.0995


k 2=0.1⋅ f ( 0.1 ,1.0991 ) y −
2
f ( x , y )= 2 2
x
2

{ }
2 2
(1.0991 ) − ( 0.1 ) y +x
k 2=0.1 2 2
( 1.0991 ) + ( 0.1 )
⇒k 3= 0.0984
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 61
Method : 3 Example : 3 (Continue)
𝟏
Step : 1 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟒 𝐤 𝟐 + 𝐤 𝟑 ) , i=
𝟔
1 y 0 =1 ,k 1=0.1
y 1 = y 0 + ( k 1+ 4 k 2 + k 3 )
6 k =0.0995 k , =0.098
1 2 3
y 1 =1+ { 0.1+ 4 ( 0. 0 995 ) + 0. 0 984
x 1= } 0.1
6
y 1 =1+0.0994
⇒ y 1 = y ( x 1 )= y ( 0 .1 )=1.0994
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 62
Method – 4
Fourth Order Runge – Kutta
Method
Fourth Order Runge – Kutta Method to Solve
First Order ODE dy
Consider the differential =f ( x, y ) with y ( x 0 )= y 0 ,then
dx
equation
,
𝟏
𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟐 𝐤 𝟐+𝟐 𝐤 𝟑+ 𝐤 𝟒 ) ,where
𝟏
𝟔
𝐤 =𝐡 ∙ 𝐟 ( 𝐱 , 𝐲 ) 𝐢 𝐢

( 𝟐,𝐲 + 𝟐 )
𝐤 𝟐=𝐡 ∙ 𝐟 𝐱 𝐢 +
𝐡
𝐢
𝐤𝟏
i=0,1,2,3,…,n−1
𝐤 =𝐡 ∙ 𝐟 ( 𝐱 + , 𝐲 +
𝟐 )
𝐡 𝐤 𝟐
𝟑 𝐢 𝐢
𝟐
𝐤 𝟒=𝐡 ∙ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟑 )
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 64
Procedure to Solve First Order ODE by Fourth Order Runge-Kutta Method

(1). Find from differential equation.

(2). Identify x 0∧ y 0 ¿ initial condition y (x 0 )= y 0 .


(3). Identify x n from instruction.
xn − x0
(4). Calculate h if required by using h= .
m
(5). Find x 1 ,x 2 ,…, x n by using.
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 65
Procedure to Solve First Order ODE by Fourth Order Runge-Kutta Method

(6). Find by using


𝟏
𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟐 𝐤 𝟐+𝟐 𝐤 𝟑+ 𝐤 𝟒 ) ,where
𝟔
𝐤 =𝐡 ∙ 𝐟 ( 𝐱 , 𝐲 )
𝟏 𝐢 𝐢

( 𝟐,𝐲 + 𝟐 )
𝐤 𝟐=𝐡 ∙ 𝐟 𝐱 𝐢 +
𝐡
𝐢
𝐤𝟏
i=0,1,2,3,…,n−1
𝐤 =𝐡 ∙ 𝐟 ( 𝐱 + , 𝐲 +
𝟐 )
𝐡 𝐤 𝟐
𝟑 𝐢 𝐢
𝟐
𝐤 𝟒=𝐡 ∙ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟑 )

(7). is the required numerical solution of given ODE.


#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 66
Method : 4 Example : 1
Exampl
e:1

Solution 2
: Here , f ( x , y ) =−2 xy
x 0 =0 , y 0 =1
x n =0.2
h=0.2
y ( 0.2 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 67
Method : 4 Example : 1 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 0 +0. 2=0 . 2 x 0 =0 ,y 0 =1h=0.2
,
⇒ x 1 =0.2 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
k 1=h ⋅ f ( x 0 , y 0 ) f ( x , y ) =−2 xy
2

k 1=0.2 ⋅ f ( 0 , 1 )
k 1=0.2 { −2 ( 0 ) ( 1 ) 2
}
⇒k 1=0
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 68
Method : 4 Example : 1 (Continue)
Step : 1 (Continue)
𝐡
𝐤 𝟐=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (
𝐤𝟏
𝟐
, i= )
h
k 2=h⋅ f x 0 + , y 0 +
2
k1
2 ( )0 x 0 =0 ,h=0.2

k 2=0.2⋅ f 0+
0.2
2
,1+
2 ( ) y 0 =1k,1=0
( )
f x , y =−2 xy
2

k 2= 0.2⋅ f ( 0.1 ,1 )
k 2= 0.2 {−2 ( 0.1 ) ( 1 ) 2
}
⇒k 2=− 0.04
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 69
Method : 4 Example : 1 (Continue)
Step : 1 (Continue)
𝐡
𝐤 𝟑=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (
𝐤𝟐
𝟐
, i= )
( 0.2 −0.04)
h
k 3=h⋅ f x 0 + , y 0+
2
k2
2
x 0 =0 ,h=0.2

k =0.2⋅ f ( 0+ ,1+
2 )
y 0 =1k,2=− 0.0
2
2 f ( x , y ) =−2 xy
2

k 2=0.2⋅ f ( 0.1 , 0.98 )


k 2=0.2 {−2 ( 0.1 ) ( 0.98 ) 2
}
⇒k 3=− 0.0384
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 70
Method : 4 Example : 1 (Continue)
Step : 1 (Continue) 𝐤 𝟒=𝐡 ⋅ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟑 ) ,i=0
x 0 =0 ,h=0.2
k 4 =h ⋅ f ( x 0 +h , y 0 + k 3 )
y 0 =1k 3,=− 0.0384
k 2=0.2⋅ f ( 0 +0.2 , 1+ ( −0.0384 ) ) 2
f ( x , y ) =−2 xy
k 2=0.2⋅ f ( 0.2 , 0.9616 )
k 2=0.2 {−2 ( 0.2 ) ( 0.9616 ) 2
}
⇒k 4 =−0.074
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 71
Method : 4 Example : 1 (Continue)
𝟏
Step : 1 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟐 𝐤 𝟐+𝟐 𝐤 𝟑+ 𝐤 𝟒 ) ,i=0
𝟔
1
y 1 = y 0 + ( k 1+2 k 2 +2 k 3 +k 4 )
6
1
y 1 =1+ { 0+2 ( − 0. 04 ) +2 ( − 0. 0 384 )+ ( −0.074 ) }
6
y 1 =1− 0.0385 , 2=− 0.0
y 0 =1 ,k 1=0 k

⇒ y 1 = y ( x 1 )= y ( 0 . 2 )=0.9615 k 3=− 0.0384k, 4 =−0.074


x 1= 0.2
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 72
Method : 4 Example : 2
Exampl
e:2

Solution 2
: Here , f ( x , y ) =xy + y
x 0 =0 , y 0 =1
x n =0.2
h=0.1
y ( 0.1 ) =?∧¿
y ( 0.2 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 73
Method : 4 Example : 2 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 0 +0. 1=0 .1 x 0 =0 ,y 0 =1h=0.1
,
⇒ x 1 =0.1 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
k 1=h ⋅ f ( x 0 , y 0 ) f ( x , y ) = xy + y
2

k 1=0.1 ⋅ f ( 0 , 1 )
k 1=0.1 { 0 ( 1 ) + ( 1 ) 2
}
⇒k 1=0.1
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 74
Method : 4 Example : 2 (Continue)
Step : 1 (Continue)
𝐡
𝟐 (
𝐤 𝟐=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝐤𝟏
𝟐
, i= )
h
k 2=h⋅ f x 0 + , y 0 +
2
k1
2 ( )0.1 x 0 =0 ,h=0.1
0.1
k 2=0.1⋅ f 0+ , 1+
2 2 ( ) y 0 =1k ,1=0.1
f ( x , y ) =xy + y
k 2=0.1⋅ f ( 0.0 5 , 1.05 )
k 2=0.1 {0.05 ( 1.05 ) + ( 1.05 ) 2
}
⇒k 2= 0.1155
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 75
Method : 4 Example : 2 (Continue)
Step : 1 (Continue)
𝐡
𝐤 𝟑=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (
𝐤𝟐
𝟐
, i= )
h
k 3=h⋅ f x 0 + , y 0+
2
k2
2 ( ) x 0 =0 ,h=0.1

( )
0.1 0.1155 y 0 =1k,2=0.115
k 2=0.1⋅ f 0+ , 1+
2 2 f ( x , y ) = xy + y
2

k 2=0.1⋅ f ( 0.05 , 1.0578 )


k 2=0.1 {0.05 ( 1.0578 ) + ( 1.0578 ) 2
}
⇒k 3= 0.1172
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 76
Method : 4 Example : 2 (Continue)
Step : 1 (Continue) 𝐤 𝟒=𝐡 ⋅ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟑 ) ,i=0
x 0 =0 ,h=0.1
k 4 =h ⋅ f ( x 0 +h , y 0 + k 3 )
y 0 =1k ,3=0.1172
k 2=0.1⋅ f ( 0+ 0.1 ,1+ 0.1172 )
2
f ( x , y ) = xy + y
k 2=0.1⋅ f ( 0.1 ,1.1172 )
k 2=0.1 {0.1 ( 1.1172 ) + ( 1.1172 ) 2
}
⇒k 4 =0.136
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 77
Method : 4 Example : 2 (Continue)
𝟏
Step : 1 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟐 𝐤 𝟐+𝟐 𝐤 𝟑+ 𝐤 𝟒 ) ,i=0
𝟔
1
y 1 = y 0 + ( k 1+2 k 2 +2 k 3 +k 4 )
6
1
y 1 =1+ { 0 .1+2 ( 0.1155 ) +2 ( 0.1172 ) + 0.136 }
6
y 1 =1+0.1169 y 0 =1 ,k 1=0.1k, 2=0.115

⇒ y 1 = y ( x 1 )= y ( 0 .1 ) =1.1169 k 3 =0.1172,k 4 =0.136


x 1= 0.1
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 78
Method : 4 Example : 2 (Continue)
Step : 2 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=1
x 2= x1 + h¿ 0.1+ 0.1=0 . 2 x 1= 0.1y,1 =1.1169h=0.1
,
⇒ x 2 =0.2 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=1
k 1=h ⋅ f ( x 1 , y 1 ) f ( x , y ) = xy + y
2

k 1=0.1 ⋅ f ( 0.1 ,1.1169 )


k 1=0.1 { 0 .1 ( 1.1169 ) + ( 1.1169 ) 2
}
⇒k 1=0.1359
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 79
Method : 4 Example : 2 (Continue)
Step : 2 (Continue)
𝐡
𝐤 𝟐=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (𝐤𝟏
𝟐
, i= )
( 0.1 ) 0.1359
h
k 2=h⋅ f x 1+ , y 1 +
2
k1
2
x 1= 0.1h=0.1
,

k =0.1⋅ f ( 0.1+ ,1.1169+


2 )
y 1 =1.1169k, 1=0.1359
2
2 f ( x , y ) = xy + y
2

k 2=0.1⋅ f ( 0.15 , 1.1848 )


k 2=0.1 {0.15 ( 1.1848 ) + ( 1.1848 ) 2
}
⇒k 2= 0.1582
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 80
Method : 4 Example : 2 (Continue)
Step : 2 (Continue)
𝐡
𝐤 𝟑=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (𝐤𝟐
𝟐
, i= )
( 0.1 ) 0.1582
h
k 3=h⋅ f x 1+ , y 1 +
2
k2
2
x 1= 0.1h=0.1
,

k =0.1⋅ f ( 0.1+ ,1.1169+


2 )
y 1 =1.1169k, 2=0.1582
2
2 f ( x , y ) = xy + y
2

k 2=0.1⋅ f ( 0.15 , 1.196 )


k 2=0.1 {0.15 ( 1.196 ) + ( 1.196 ) 2
}
⇒k 3= 0.161
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 81
Method : 4 Example : 2 (Continue)
Step : 2 (Continue) 𝐤 𝟒=𝐡 ⋅ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟑 ) ,i=
x 1=0.1 h=0.1
,
k 4 =h ⋅ f ( x 1+ h , y 1 +k 3 )
y 1 =1.1169k, 3=0.161
k 2=0.1⋅ f ( 0.1+0.1 , 1.1169+0.161 ) 2
( )
f x , y = xy + y
k 2=0.1⋅ f ( 0.2 ,1.2779 )
k 2=0.1 {0 ( 1.2779 ) + ( 1.2779 ) 2
}
⇒k 4 =0.1888
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 82
Method : 4 Example : 2 (Continue)
𝟏
Step : 2 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟐 𝐤 𝟐+𝟐 𝐤 𝟑+ 𝐤 𝟒 ) ,i=1
𝟔
1
y 2 = y 1 + ( k 1 +2 k 2 +2 k 3+k 4 )
6
1
y 1 =1.1169+ { 0 .1359+2 ( 0.1582 ) +2 ( 0.1 61 ) +0.1888 }
6
k 1,=0.1359k, 2=0.158
y 1 =1.1169
y 1 =1.1169+0.1605
k 4,=0.1888
k 3=0.161
⇒ y 2 = y ( x 2 ) = y ( 0 . 2 )=1.2774 x 2= 0.2

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 83
Method : 4 Example : 3
Exampl
e:3

Solution x
: Here , f ( x , y ) =3 e + 2 y
x 0 =0 , y 0 =0
, =0.1
x n =0.1 h
y ( 0.1 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 84
Method : 4 Example : 3 (Continue)
Step : 1 𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i= 0
x 1= x 0 + h¿ 0 +0. 1=0 .1 x 0 =0 ,y 0 =0h=0.1
,
⇒ x 1 =0.1 𝐤 𝟏=𝐡 ⋅ 𝐟 ( 𝐱𝐢 , 𝐲 𝐢 ) ,i=0
k 1=h ⋅ f ( x 0 , y 0 ) x
f ( x , y ) =3 e + 2 y
k 1=0.1 ⋅ f ( 0 , 0 )
k 1=0.1 { 3 ( e ) +2 ( 0 ) }
0

⇒k 1=0.3
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 85
Method : 4 Example : 3 (Continue)
Step : 1 (Continue)
𝐡
𝐤 𝟐=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (
𝐤𝟏
𝟐
, i= )
h
k 2=h⋅ f x 0 + , y 0 +
2
k1
2 ( )0.3 x 0 =0 ,h=0.1
0.1
k 2=0.1⋅ f 0+ , 0 +
2 2 ( ) y 0 =0k ,1=0.3
x
f ( x , y ) =3 e + 2 y
k 2=0.1⋅ f ( 0.0 5 , 0.15 )
k 2=0.1 {3 ( e ) 0.05
+2 ( 0 .15 ) }
⇒k 2= 0.3454
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 86
Method : 4 Example : 3 (Continue)
Step : 1 (Continue)
𝐡
𝐤 𝟑=𝐡 ⋅ 𝐟 𝐱 𝐢 + , 𝐲 𝐢 +
𝟐 (𝐤𝟐
𝟐
, i= )
h
k 3=h⋅ f x 0 + , y 0+
2
k2
2 ( ) x 0 =0 ,h=0.1

( )
0.1 0.3454 y 0 =0k ,2=0.345
k 2=0.1⋅ f 0+ , 0 +
2 2 x
f ( x , y ) =3 e + 2 y
k 2=0.1⋅ f ( 0.05 , 0.1727 )
k 2=0.1 {3 ( e ) 0 .05
+2 ( 0.1727 ) }
⇒k 3= 0.3499
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 87
Method : 4 Example : 3 (Continue)
Step : 1 (Continue) 𝐤 𝟒=𝐡 ⋅ 𝐟 ( 𝐱 𝐢 + 𝐡 , 𝐲 𝐢 + 𝐤 𝟑 ) ,i=0
x 0 =0 ,h=0.1
k 4 =h ⋅ f ( x 0 +h , y 0 + k 3 )
y 0 =0k ,3=0.3499
k 2=0.1⋅ f ( 0+ 0.1 ,0 +0.3499 )
x
f ( x , y ) =3 e + 2 y
k 2=0.1⋅ f ( 0.1 , 0.3499 )
k 2= 0.1 {3 ( e ) 0 .1
+2 ( 0.3499 ) }
⇒k 4 =0.4015
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 88
Method : 4 Example : 3 (Continue)
𝟏
Step : 1 (Continue) 𝐲 𝐢+𝟏 = 𝐲 𝐢+ ( 𝐤 𝟏+𝟐 𝐤 𝟐+𝟐 𝐤 𝟑+ 𝐤 𝟒 ) ,i=0
𝟔
1
y 1 = y 0 + ( k 1+2 k 2 +2 k 3 +k 4 )
6
1
y 1 =0+ { 0 .3 +2 ( 0.3454 ) +2 ( 0.3499 ) +0.4015 }
6
y 1 =0+ 0.3487 y 0 =0 ,k 1=0.3k, 2=0.345

⇒ y 1 = y ( x 1 )= y ( 0 .1 ) =0.3487 k 3 =0.3499 k ,
4 =0.4015
x 1= 0.1
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 89
Method : 4 Example : 3 (Continue)
By exact
method
dy x
Here , =3 e +2 y , y ( 0 ) =0
dx
dy x
⇒ − 2 ∙ y =3 e
dx
pare the given differential equation with Leibnitz′s differential equation
dy
+ P ( x ) ∙ y=Q ( x )
dx
We get P ( x )=− a
2nd Q ( x )=3 e x

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 90
Method : 4 Example : 3 (Continue)

I.F. ¿ e∫ P ( x ) dx
¿e∫ −2 dx
¿e
−2x
I.F. ¿ e
−2x P ( x )=− 2
x
The solution of given differential equation is
Q ( x )=3 e

y ∙ ( I . F. ) =∫ {Q ( x ) ∙ ( I .F . ) } dx+c
⇒ y∙ ( e ) =∫ { 3e ∙ ( e ) } dx+c
− 2x x −2x

⇒ y∙e =∫ {3e } dx+c


−2 x −x
−2 x −x
⇒ y∙e =− 3 e + c
x 2x
⇒ y=− 3 e +c ∙ e
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 91
Method : 4 Example : 3 (Continue)

y =−3 e +c ∙e −− → ( 1 )
x 2x

Here ⇒ at x =0 , y =0
Substitutein equation we get
0 2(0)
0=− 3 e +c ∙ e
⇒ 0=−3+ c
⇒ c=3Substitute in equation we get
x 2x
y =−3 e +3 e
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 92
Method : 4 Example : 3 (Continue)
x 2x
y ( is
e solution of the given differential equation x )=− 3 e +3 e
L et , x =0.1
0.1 2 ( 0.1)
( )
⇒ y 0.1 =− 3 e +3 e
0.1 0.2
⇒ y ( 0.1 )=− 3 e +3 e
⇒ y ( 0.1 )=0.3487

nce, by numerical method and exact method we get same value of

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 93
Method – 5
Milne’s Method
Milne’s Method

Milne′s Predictor−Cor ector method is an iterative numerical method used to solve first order ordinary dif erential equations of the form:
dy
=f ( x , y ) with y ( x 0 )= y 0
dx

It is a two-step method that involves both a predictor and a

.corrector.

Once the predictor provides an estimate, the corrector refines


it using the method of implicit correction.
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 95
Milne’s Method
dy
Consider the differential equation =f ( x , y ) with y ( x 0 ) = y 0 ,
dx
𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=0 , 1 ,2 , 3 , … , n −1
If is not given, then calculate using Taylor’s
2 3
series ′ h ′ ′ h ′ ′′
y k = y k −1 +h y k −1 + y k − 1+ y k − 1+…;k ∈ { 1 ,2 , …. n }
2! 3!
𝐟 𝐧 =𝐟 ( 𝐱 𝐧 , 𝐲 𝐧 )

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 96
Milne’s Method
Milne’s Predictor formula given
by
4h
y ( n+ 1) p = y n −3 +
3
( 2 f n −2 − f n −1 +2 f n )

Milne’s Corrector formula given


by
h
y ( n+ 1) c = y n −1 + ( f n −1 +4 f n +f n+1 )
3
xn − x0
Where,h= is step size , where m is number of steps
m
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 97
Procedure to Solve First Order ODE by Milne’s Method

(1). Find from differential equation.

Identifyfrom initial condition

Identifyfrom instruction

Calculate if required by using

Findif required by using Taylor′s series,


2 3
′ h ′ ′ h ′ ′′
y k = y k −1 +h y k −1 + y k − 1+ y k − 1+…;k ∈ { 1 ,2 , …. n }
2! 3!
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 98
Procedure to Solve First Order ODE by Milne’s Method

Find by using
4h
( 7 ) . Find y ( n+ 1) p = y n − 3+
3
( 2 f n −2 − f n −1 +2 f n )

Above numerical solution is known as Milne’s Predictor

Findsolution.

h
( 9 ) . Find y ( n+ 1) c = y n −1 + ( f n −1 +4 f n +f n+1 )
3
Above numerical solution is known as Milne’s Corrector
solution.
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 99
Method : 5 Example : 1
Exampl
Evaluate using Milne’s Method.
e:1

Solution ( 1+ x ) y 2 2
Here , f ( x , y ) =
: 2

, ,

, ,

y ( 0. 4 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 100
Method : 5 Example : 1 (Continue)
𝐟 𝐧 =𝐟 ( 𝐱 𝐧 , 𝐲 𝐧 )
( 1+ x ) y 2 2
f ( x , y )=
2
1 1
[ 1+ ( 0.1 ) ] (1.06 ) = 0.5674
2 2

f 1=f ( x 1 , y 1) = ( 1+x 1 ) y 1 2
2 2¿
2
1 2 1
f 2=f ( x 2 , y 2 ) = ( 1+ x 2 ) y 2 ¿ 2 [ 1+ 0.2 ] 1.12 =0.6523
2 2 2
( ) ( )
2
1 2 1
f 3=f ( x 3 , y 3 ) = ( 1+ x 3 ) y 3¿ [ 1+ ( 0.3 ) ] ( 1. 21 ) =0.7979
2 2 2

2 2

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 101
Method : 5 Example : 1 (Continue)
By Milne′s Predictor method,
4h
y ( n+ 1) p = y n −3 +
3
( 2 f n −2 − f n −1 +2 f n )

We find the value of , Therefore we have to put in above


formula
4h
⇒ y4 p = y0 +
3
( 2 f 1 − f 2 +2 f 3 )
𝐲 𝟎=𝟏 , 𝐡 =𝟎 . 𝟏
4 ( 0.1 )
¿ 1+
3
[ 2 ( 0.5674 ) − ( 0.6523 )+ 2 ( 0.7979 ) ] 𝐟 𝟏=𝟎 . 𝟓𝟔𝟕𝟒
𝐟 𝟐=𝟎 . 𝟔𝟓𝟐𝟑
¿ 1 .2771
𝐟 𝟑=𝟎 . 𝟕𝟗𝟕𝟗
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 102
Method : 5 Example : 1 (Continue)
Now, we find the value of , 𝐟𝐱𝐧𝟒=
=𝟎𝐟 ( 𝐱. 𝟒
𝐧 ,𝐲𝐧)

1 (
𝐲 𝟒 𝐩=𝟏.𝟏+ 𝟐
𝟐𝟕𝟕𝟏
𝐱 𝐲) 𝟐

f 4 = f ( x 4 , y 4 ) = ( 1+ x 4 ) ( y 4 p ) 𝐟 (𝐱 , 𝐲)=
2 2
2 𝟐
1
¿ [ 1+ ( 0.4 ) ] ( 1. 2771 )
2 2
2

¿ 0.9460

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 103
Method : 5 Example : 1 (Continue)
By Milne′s Corrector method,
h
y ( n+ 1) c = y n −1 + ( f n −1 +4 f n +f n+1 )
3
We find the value of , Therefore we have to put in above
formula h
y 4 c = y 2+
3
( f 2+ 4 f 3+ f 4 )

0.1 𝐲 =𝟏 .𝟏𝟐 , 𝐡 =𝟎 .𝟏
¿ 1 .12+
3
[ 0.6523+ 4 ( 0.7979 ) +0.9460 ] 𝟐

𝐟 =𝟎 . 𝟔𝟓𝟐𝟑 𝟐
¿ 1 .2797 𝐟 𝟑=𝟎 . 𝟕𝟗𝟕𝟗
∴ y ( 0.4 )=1 .2797 𝐟 𝟒=𝟎 .𝟗𝟒𝟔𝟎
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 104
Method : 5 Example : 2
Exampl
e:2 Taylor’s series and Evaluate using Milne’s Method.

Solution Here
:
x 0 =0 , y 0 =1
, ,

We have to find the value of , and using Taylor’s series


method.
y ( 0. 4 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 105
Method : 5 Example : 2(Continue)
For
𝐱 𝟎=𝟎 , 𝐲 𝟎=𝟏
′ 2
y = xy + y
′ 2
⇒ y = x0 y0 + y
0 0
2
¿ 0 + ( 1 ) =𝟏
′′ ′ ′ ′′′ ′′ ′ ′′ 2
y =xy + y +2 y y y =xy +2 y +2 y y +2 ( y ′ )
′′ ′ ′′ ′ ′′ 2
⇒ y = x 0 y 0 +2 y 0 +2 y 0 y 0 + 2 ( y 0 ′ )
0

¿ 0 +1+2 ( 1 ) (1 )=𝟑 ¿ 0 +2 ( 1 ) +2 ( 1 ) ( 3 ) +2 ( 1 ) =𝟏𝟎


2

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 106
Method : 5 Example : 2(Continue)

By Taylor’s
series h ′′ h ′′′′
2 3
y 1 = y 0 +h y + y0 + y0 + …
0
2! 3!
( 0.1 )2 ( 0.1 )3
≈ 1+ ( 0.1 ) 1+ (3 )+ ( 10 )
2! 3!
¿ 1 .1167

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 107
Method : 5 Example : 2(Continue)
For

y = xy + y
2 𝐱𝟏 =𝟎 .𝟏 , 𝐲 𝟏=𝟏 . 𝟏𝟏𝟔
′ 2
⇒ y = x 1 y 1+ y
1 1
2
¿ 0.1 ( 1.1167 ) + ( 1 .1167 ) =𝟏 . 𝟑𝟓𝟖𝟕
′′ ′ ′ ′′′ ′′ ′ ′′ 2
y =xy + y +2 y y y =xy +2 y +2 y y +2 ( y ′ )
′′ ′ ′′ ′ ′′ 2
⇒ y 1 = x 1 y 1 +2 y 1 +2 y 1 y 1 +2 ( y 1 ′ )

¿0.1(1.3587)+1.1167+2(1.1167) (1.3587) ¿0.1 ( 4.2871)+2(1.3587)+2 (1.1167) (4.2871)+2 (1.3587


¿ 𝟒 . 𝟐𝟖𝟕𝟏 ¿𝟏𝟔.𝟒𝟏𝟑𝟏
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 108
Method : 5 Example : 2(Continue) For

By Taylor’s
series,
2 3
h ′′ h ′ ′′ ′
y 2 = y 1 +h y + y1 + y 1 +…
1
2! 3!
2 3
( 0.1 ) ( 0.1 )
≈ 1 .1167+ ( 0.1 ) 1.3587+ ( 4.2871 ) + ( 16.4131 )
2! 3!

¿ 1 .2767

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 109
Method : 5 Example : 2(Continue)
For
′ 2
y = xy + y
′ 2
⇒ y = x2 y2 + y
2 2
2
¿ 0. 2 ( 1. 2767 ) + ( 1 . 27 67 ) =𝟏 . 𝟖𝟖𝟓𝟑
′′ ′ ′ ′′′ ′′ ′ ′′ 2
y =xy + y +2 y y y =xy +2 y +2 y y +2 ( y ′ )
′′ ′ ′′ ′ ′′ 2
⇒ y2 = x2 y2 + 2 y2 + 2 y 2 y2 + 2 ( y2 ′ )

¿0.2(1.8853)+1.2767+2(1.2767) (1.8853) ¿0.2(6.4677)+2(1.8853)+2(1.2767) (6.4677)+2(1.8853


¿ 𝟔 . 𝟒𝟔𝟕𝟕 ¿𝟐𝟖.𝟔𝟖𝟕𝟓
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 110
Method : 5 Example : 2(Continue) For

By Taylor’s
series,
2 3
′ h ′′ h ′′′
y3 = y2 + h y2 + y2 + y2 + …
2! 3!

( 0.1 )2 ( 0.1 )3
≈ 1 . 2767+ ( 0.1 ) 1. 8853+ ( 6.4677 ) + ( 28.6875 )
2! 3!

¿ 1 .5023

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 111
Method : 5 Example : 2(Continue)

f ( x , y ) =xy + y
2 𝐱𝟑𝟏𝟐 =𝟎 .𝟑
.𝟐 , 𝐲 𝟑𝟏𝟐=𝟏
.𝟏 𝟐𝟕𝟔𝟕 𝐟 𝐧 =𝐟 ( 𝐱𝐧 , 𝐲 𝐧 )
=𝟏..𝟓𝟎𝟐𝟑
𝟏𝟏𝟔𝟕
2
f 1= f ( x 1 , y 1) = x 1 y 1¿+( 0.1
y 1 )( 1.1167 ) + ( 1. 1167 ) =1.3587 2

2
f 2=f ( x 2 , y 2 ) =x 2 y 2+ y 2¿ ( 0.2 )( 1.2767 ) + ( 1.2767 ) =1.8853 2

2
f 3=f ( x 3 , y 3 ) =x 3 y 3 + y 3¿ ( 0.3 ) (1.5023 ) + ( 1.5023 ) =2.7076 2

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 112
Method : 5 Example : 2(Continue)
By Milne′s Predictor method,
4h
y ( n+ 1) p = y n −3 +
3
( 2 f n −2 − f n −1 +2 f n )

We find the value of , Therefore we have to put in above


formula
4h
⇒ y4 p = y0 +
3
( 2 f 1 − f 2 +2 f 3 )
𝐲 𝟎=𝟏 , 𝐡 =𝟎 . 𝟏
4 ( 0.1 )
¿ 1+
3
[ 2 ( 1.3587 ) − (1.8853 ) +2 ( 2.7076 ) ] 𝐟 𝟏=𝟏 . 𝟑𝟓𝟖𝟕
𝐟 𝟐=𝟏 . 𝟖𝟖𝟓𝟑
¿ 1 . 833
𝐟 𝟑=𝟐 . 𝟕𝟎𝟕𝟔
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 113
Method : 5 Example : 2(Continue)
Now, we find the value of , 𝐟𝐱𝐧𝟒=
=𝟎𝐟 ( 𝐱. 𝟒
𝐧 ,𝐲𝐧)

f 4 =f ( x 4 , y 4 ) =x 4 y 4 + y 4 p
2
𝐲𝐟 𝟒( 𝐱
𝐩=𝟏 𝟖𝟑𝟑
, 𝐲 ).= 𝐱𝐲 + 𝐲
2
¿ ( 0.4 ) ( 1.833 ) + ( 1. 833 )
¿ 4.093

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 114
Method : 5 Example : 2(Continue)
By Milne′s Corrector method,
h
y ( n+ 1) c = y n −1 + ( f n −1 +4 f n +f n+1 )
3
We find the value of , Therefore we have to put in above
formula h
y 4 c = y 2+
3
( f 2+ 4 f 3+ f 4 )

¿ 1 . 2767+
( 0.1 )
[ 𝐲 =𝟏.𝟐𝟕𝟔𝟕
1.8853 +4 ( 2.7076 ) + 4.093 ]
𝟐 , 𝐡 =𝟎. 𝟏
3
𝐟 𝟐=𝟏 . 𝟖𝟖𝟓𝟑
¿ 1 . 8369 𝐟 𝟑=𝟐 . 𝟕𝟎𝟕𝟔
∴ y ( 0.4 )=1 . 8369 𝐟 𝟒=𝟒 . 𝟎𝟗𝟑
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 115
Method – 6
Adam’s-Bashforth
Method
Adam’s-Bashforth Method
dy
Consider the differential equation =f ( x , y ) with y ( x 0 ) = y 0 ,
dx
𝐱 𝐢+𝟏= 𝐱 𝐢 + 𝐡 , i=0 , 1 ,2 , 3 , … , n −1
If is not given, then calculate using Taylor’s
2 3
series ′ h ′ ′ h ′ ′′
y k = y k −1 +h y k −1 + y k − 1+ y k − 1+…;k ∈ { 1 ,2 , …. n }
2! 3!
𝐟 𝐧 =𝐟 ( 𝐱 𝐧 , 𝐲 𝐧 )

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 117
Adam’s-Bashforth Method
Adam’s-Bashforth Predictor formula
given by
h
y ( n+ 1) p = y n +
24
( 55 f n −59 f n −1 +37 f n − 2 − 9 f n − 3 )

Adam’s-Bashforth Corrector formula


given by
h
y ( n+ 1) c = y n +
24
( 9 f n+ 1+19 f n −5 f n −1 + f n − 2 )

xn − x0
Where,h= is step size , where m is number of steps
m
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 118
Procedure to Solve First Order ODE by Adam’s-Bashforth Method
dy
Consider the differential equation =f ( x , y ) with y ( x 0 ) = y 0 ,
dx
(1). Find from differential equation.

Identifyfrom initial condition

Identifyfrom instruction

Calculate if required by using

Findif required by using2 Taylor′s series,


3
′ h ′ ′ h ′ ′′
y k = y k −1 +h y k −1 + y k − 1+ y k − 1+…;k ∈ { 1 ,2 , …. n }
2! 3!
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 119
Procedure to Solve First Order ODE by Adam’s-Bashforth Method

Find by using
h
( 7 ) . Find y ( n+ 1) p = y n +
24
( 55 f n −59 f n −1 +37 f n − 2 − 9 f n − 3 )

Above numerical solution is known as Adam’s-Bashforth


Predictor solution.
Find
h
( 9 ) . Find y ( n+ 1) c = y n +
24
( 9 f n+ 1+19 f n − 5 f n −1 + f n − 2 )

Above numerical solution is known as Adam’s-Bashforth


Corrector solution.
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 120
Method : 6 Example : 1
Exampl
e:1 Evaluate
using Adam’s-Bashforth Method.

Solution
Here
:

, ,

, ,

y ( 1 . 4 )=?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 121
Method : 6 Example : 1 (Continue)
2 𝐱𝐱
𝐱𝟑𝟏𝟐=𝟏
=𝟏 .𝟑
=𝟏 ,,𝐲,𝐲,𝟏𝐲
.𝟏.𝟐 𝟏𝐲
=𝟏
=𝟏 .𝟗𝟕𝟗
𝟏 =𝟏
=𝟏 𝐟 𝐧 =𝐟 ( 𝐱 𝐧 , 𝐲 𝐧 )
.𝟓𝟒𝟖
.𝟐𝟑𝟑
f ( x , y ) =x ( 1+ y ) 𝟎 𝟎

2
f 0=f ( x 0 , y 0 ) =x 0 ( 1+ y 0¿) ( 1 )2 [ 1+1 ] = 2
2
f 1=f ( x 1 , y 1) =x 1 ( 1+ y 1¿) ( 1.1 ) [ 1+1.233 ] =2.70193
2

2
f 2=f ( x 2 , y 2 ) =x 2 ( 1+ y 2¿) ( 1. 2 )2 [ 1+ 1.548 ] =3.66912
2
f 3=f ( x 3 , y 3 ) =x 3 ( 1+ y 3¿) ( 1. 3 )2 [ 1+1.979 ] =5.03454

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 122
Method : 6 Example : 1 (Continue)
By Adam’s-Bashforth Predictor
method, h
y ( n+ 1) p = y n + ( 55 f n −59 f n −1 +37 f n − 2 − 9 f n − 3 ) 𝐟 𝟎 =𝟐
24
𝐟 𝟏=𝟐 . 𝟕𝟎𝟏𝟗
We find the value of , Therefore 𝐟 𝟐=𝟑 . 𝟔𝟔𝟗𝟏
we have to put in above
formula 𝐟 𝟑=𝟓 . 𝟎𝟑𝟒𝟓
h
⇒ y4 p = y3 +
24
( 55 f 3 − 59 f 2 +37 f 1 − 9 f 0 ) 𝐲 =𝟏 .𝟗𝟕𝟗 , 𝐡 =𝟎 .𝟏
𝟑

0.1
¿ 1.979+
24
[ 55 (5.0345 ) − 59 ( 3.66 91 ) +37 ( 2.7019 ) − 9 ( 2 ) ]

¿ 2 .57 23
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 123
Method : 6 Example : 1 (Continue)
Now, we find the value of , 𝐟𝐱𝐧 𝟒==𝟏
𝐟 ( 𝐱. 𝐧𝟒, 𝐲 𝐧 )
2
f 4 =f ( x 4 , y 4 ) =x 4 ( 1+ y 4 p )
𝐲 𝟒 𝐩=𝟐.𝟐 𝟓𝟕𝟐𝟐
2
𝐟 ( 𝐱 , 𝐲 ) =𝐱 (𝟏+ 𝐲 )
¿ ( 1.4 ) (1+ 2.5722 )

¿ 7.0017

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 124
Method : 6 Example : 1 (Continue)
𝐲 𝟑=𝟏 .𝟗𝟕𝟗 , 𝐡 =𝟎 .𝟏
By Adam’s-Bashforth Corrector
method, h 𝐟 𝟏=𝟐 . 𝟕𝟎𝟏𝟗
y ( n+ 1) c = y n +
24
( 9 f n+ 1+19 f n −5 f n −1 + f n − 2 )
𝐟 𝟐=𝟑 . 𝟔𝟔𝟗𝟏
We find the value of , Therefore we have to 𝐟 𝟑=𝟓 . 𝟎𝟑𝟒𝟓
put in above formula 𝐟 𝟒=𝟕. 𝟎𝟎𝟏𝟕
h
y 4 c= y3 +
24
( 9 f 4 +19 f 3 − 5 f 2 + f 1 )
0.1
¿ 1 .979+
24
[ 9 ( 7.001 7 ) +19 ( 5.034 5 ) − 5 ( 3. 66 91 ) + ( 2.7019 )

¿ 2 .57 49
∴ y ( 0.4 )=2 . 5749
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 125
Method : 6 Example : 2
Exampl
Taylor’s series method and Evaluate using Adam’s –
e:2
Bashforth Method.

Solution
Here
:
x 0 =0 , y 0 =1
, ,

We have to find the value of , and using Taylor’s series


method.
y ( 0. 4 ) =?
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 126
Method : 6 Example : 2(Continue)
For
𝐱 𝟎=𝟎 , 𝐲 𝟎=𝟏
′ 2
y = x+ y
′ 2
⇒ y = x0 + y
0 0
2
¿ 0 + ( 1 ) =𝟏
′′ ′ ′′′ ′′ 2
y =1+2 y y y =2 y y +2 ( y ′ )
′′ ′ ′′ 2
⇒ y 0 =2 y 0 y 0 +2 ( y 0 ′ )

¿ 1+2 ( 1 ) ( 1 )=𝟑 ¿ 2 ( 1 ) ( 3 ) +2 ( 1 ) = 𝟖
2

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 127
Method : 6 Example : 2(Continue)

By Taylor’s
series h ′′ h ′′′′
2 3
y 1 = y 0 +h y + y0 + y0 + …
0
2! 3!
( 0.1 )2 ( 0.1 )3
≈ 1+ ( 0.1 ) 1+ (3 )+ (8 )
2! 3!
¿ 1 .116 3

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 128
Method : 6 Example : 2(Continue)
For

y = x+ y
2 𝐱𝟏 =𝟎 .𝟏 , 𝐲 𝟏=𝟏 . 𝟏𝟏𝟔𝟑
′ 2
⇒ y = x1 + y
1 1
2
¿ 0.1 + ( 1 .116 3 ) =𝟏 . 𝟑 𝟒𝟔𝟏
′′ ′ ′′′ ′′ 2
y =1+ 2 y y y =2 y y +2 ( y ′ )
′′ ′ ′′ 2
⇒ y 1 =2 y 1 y 1 +2 ( y 1 ′ )

¿1+2 ( 1.116 3 ) ( 1.3 461 ) ¿ 2 ( 1.116 3 ) ( 4. 0064 ) +2 ( 1.3 46


¿ 𝟒 . 𝟎𝟎𝟔𝟒 ¿𝟏𝟐.𝟓𝟔𝟖𝟕

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 129
Method : 6 Example : 2(Continue) For

By Taylor’s
series,
2 3
h ′′ h ′ ′′ ′
y 2 = y 1 +h y + y1 + y 1 +…
1
2! 3!
2 3
( 0.1 ) ( 0.1 )
≈ 1 .116 3+ ( 0.1 ) 1.3 461+ ( 4. 0064 )+ ( 1 2.5687 )
2! 3!

¿ 1 .27 30

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 130
Method : 6 Example : 2(Continue)
For
′ 2
y = x+ y
′ 2
⇒ y = x2 + y 2 2
2
¿ 0. 2 + (1 . 2730 ) =𝟏 .𝟖 𝟐𝟎𝟓
′′ ′ ′′′ ′′ 2
y =1+ 2 y y y =2 y y +2 ( y ′ )
′′ ′ ′′ 2
⇒ y 2 =2 y 2 y 2 + 2 ( y 2 ′ )

¿1+2 ( 1.2730 ) ( 1.8205 ) ¿2 ( 1.2730 ) ( 5.6350 ) +2 ( 1.8205 )


¿ 𝟓 . 𝟔𝟑𝟓𝟎 ¿𝟐𝟎. 𝟗𝟕𝟓𝟐

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 131
Method : 6 Example : 2(Continue) For

By Taylor’s
series,
2 3
′ h ′′ h ′′′
y3= y2 + h y2 + y2 + y2 + …
2! 3!

( 0.1 )2 ( 0.1 )3
≈ 1 . 2730+ ( 0.1 ) 1. 8205+ ( 5.6350 ) + ( 20.9752 )
2! 3!

¿ 1 . 4867

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 132
Method : 6 Example : 2(Continue)

f ( x , y ) =x + y
2 𝐱𝟑𝟐𝟏=𝟎
𝐱 =𝟎
𝟎 =𝟎
.𝟑
.𝟐 ,𝟑𝟐𝟏𝐲
.𝟏,,𝐲𝐲 =𝟏
=𝟏𝟎.=𝟏
𝟒𝟖𝟔𝟕
𝟐𝟕𝟑𝟎 𝐟 𝐧 =𝐟 ( 𝐱 𝐧 , 𝐲 𝐧
. 𝟏𝟏𝟔𝟑

2
f 0=f ( x 0 , y 0 ) =x 0 + y¿
0 0 + ( 1 ) =1
2

2
f 1= f ( x 1 , y 1) = x ¿
1+ y 1 ( 1.1163 ) =1.3461
0 .1+
2

2
f 2=f ( x 2 , y 2 ) =x 2 + y¿ 20 .2+ ( 1.2730 ) =1.8205 2

2
f 3=f ( x 3 , y 3 ) =x 3 + y¿ 30 .3 + ( 1. 4867 )2=2.5103

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 133
Method : 6 Example : 2(Continue)
By Adam’s-Bashforth method 𝐲 𝟑=𝟏 . 𝟒𝟖𝟔𝟕 , 𝐡 =𝟎 . 𝟏
h 𝐟 𝟎 =𝟏
y ( n+ 1) p = y n +
24
( 55 f n − 59 f n −1 +37 f n − 2 − 9 f n − 3 )
𝐟 𝟏=𝟏 . 𝟑𝟒𝟔𝟏
We find the value of , Therefore we 𝐟 𝟐=𝟏 . 𝟖𝟐𝟎𝟓
have to
h
put in above formula
𝐟 𝟑=𝟐 . 𝟓𝟏𝟎𝟑
⇒ y4 p = y3 +
24
( 55 f 3 − 59 f 2 +37 f 1 − 9 f 0 )

0.1
¿ 1 . 4867 +
24
[ 55 ( 2.5103 ) −59 ( 1.8205 ) + 37 ( 1.3461 ) − 9 ( 1 )

¿ 1 .7845
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 134
Method : 6 Example : 2(Continue)
Now, we find the value of , 𝐟𝐱𝐧𝟒=
=𝟎𝐟 ( 𝐱. 𝟒
𝐧 ,𝐲𝐧)

f 4= x4+ y4 p
2
𝐟 𝐲( 𝐱 , 𝐲 )𝟕𝟖𝟒𝟓
𝟒 𝐩=𝟏. =𝐱 +

2
¿ ( 0.4 ) + ( 1 .7845 )
¿ 3.5844

#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of


Prof. Darshan Pipaliya 135
Method : 6 Example : 2(Continue)
𝐲 𝟑=𝟏. 𝟒𝟖𝟔𝟕, 𝐡 =𝟎. 𝟏
By Adam’s-Bashforth Corrector
method, h 𝐟 𝟏=𝟏 . 𝟑𝟒𝟔𝟏
y ( n+ 1) c = y n +
24
( 9 f n+ 1+19 f n −5 f n −1 + f n − 2 )
𝐟 𝟐=𝟏 . 𝟖𝟐𝟎𝟓
We find the value of , Therefore we have to put 𝐟 𝟑=𝟐 . 𝟓𝟏𝟎𝟑
in above formula 𝐟 𝟒=𝟑. 𝟓𝟖𝟒𝟒
h
y 4 c= y3 + ( 9 f 4 +19 f 3 − 5 f 2 + f 1 )
24
0.1
¿ 1 . 4867 +
24
[ 9 ( 3.5844 ) +19 ( 2.5103 ) −5 ( 1.8205 ) + (1.3461 ) ]

¿ 1.7875
∴ y ( 0.4 )=1.7875
#2301HS201 (Mathematics – II)  Unit 2 – Numerical Solutions of
Prof. Darshan Pipaliya 136
B.Tech. 2nd Semester
Mathematics – II (2301HS201)

THA
NK
YOU

Prof. Darshan Pipaliya


Department of Humanities &
Science
Darshan Institute of Engineering & Technology, Rajkot
darshan.pipaliya@darshan.ac.in
8160597689

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy