0% found this document useful (0 votes)
47 views71 pages

M-2-Unit-3 Complete Class Notes

This document discusses numerical integration and the solution of ordinary differential equations. It describes the Trapezoidal rule, Simpson's 1/3rd rule, and Simpson's 3/8th rule for numerical integration. These rules approximate the calculation of a definite integral using tabulated function values at regularly spaced intervals. The document also discusses Taylor's series method, Picard's method of successive approximations, Euler's method, and the Runge-Kutta method for solving ordinary differential equations numerically using iterative techniques. Examples are provided for applying the Trapezoidal rule to evaluate definite integrals.

Uploaded by

Vamsipriya G
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)
47 views71 pages

M-2-Unit-3 Complete Class Notes

This document discusses numerical integration and the solution of ordinary differential equations. It describes the Trapezoidal rule, Simpson's 1/3rd rule, and Simpson's 3/8th rule for numerical integration. These rules approximate the calculation of a definite integral using tabulated function values at regularly spaced intervals. The document also discusses Taylor's series method, Picard's method of successive approximations, Euler's method, and the Runge-Kutta method for solving ordinary differential equations numerically using iterative techniques. Examples are provided for applying the Trapezoidal rule to evaluate definite integrals.

Uploaded by

Vamsipriya G
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/ 71

UNIT –

3
Numerical Integration and Solution of Ordinary Differential Equations

Contents
 Numerical Integration

(a)Trapezoidal rule

(b)Simpson’s 1/3rd rule

( c) Simpson’s 3/8th rule

 Solution of Ordinary Differential Equations

(a)Taylor’s Series method

(b) Picard’s method of successive


approximations

(c)Euler’s method

(d) Modified Euler’s Method

(e) Runge – Kutta method (R-K Method).


Numerical Integration:

Suppose we are given the following values of 𝑦= (


𝑓𝑥)for a set of values of :
𝑥
𝑥: 𝑥0 𝑥1 𝑥2 𝑥3 ….. 𝑥𝑛

𝑦: 𝑦0 𝑦1 𝑦2 𝑦3 ….. 𝑦𝑛

𝑥𝑛
𝑏
The process of evaluating a definite integral ∫𝑥 (
𝑓) 𝑑 (
𝑥 (or) ∫𝑓 𝑎)
𝑥𝑑 (or)
𝑏 0
∫𝑎𝑥𝑦𝑑from a set of tabulated values of the integrand f(x) is called Numerical

Integration .

Note:

• Approximate computation of a definite integral using numerical


techniques.

• Tabulated at regularly spaced intervals.

• Gives the approximate calculation.

• Different from analytical integration.

Here we study the following three rules of numerical integration:

(a)Trapezoidal Rule

(b)Simpson’s 1/3rd Rule ( c)

Simpson’s 3/8th Rule


Trapezoidal Rule:

The Trapezoidal rule of integration is given


by
h
a f  x dx 2  y0  yn   2  y1  2  y3  y4  ......
b


y
ba
whereh  n , nisthenumber of subintervals.

h
Sum of the first and last ordinates 2 Sum of the remaining ordinates
b
 f x dx
a
 2
 
Note : The accuracy of the result can be improved by increasing the number of
intervals or by decreasing the value of h.

Simpson’s 1/3rd Rule

The Simpson’s 1/3rd rule of integration is given


by
h

b
 f  x dx  
a 3 y0  yn   4  y1  y3  y5  ......  2  y2  y4  y6  ......

ba
whereh  n , nisthenumber of subintervals.

h
Sumof the first and last ordinates  4 Sumof theodd ordinates 
b
 f  x dx 
a 3
 
2  Sumof the remaining evenordinates 

Note : For this Rule the number of subintervals must be even


number.
Simpson’s 3/8th Rule:

The Simpson’s 3/8th rule of integration is given


by
3h

b
 f  x dx 
a 8 y0  yn   3 y1  y2  y4  y5  ......  2  y3  y6  y9  ......

ba
whereh  n , nisthenumber of subintervals.

Note : For this rule, the no. of sub-intervals must be multiple of


‘3’.

Note: If we have to do the given problem in all the above three methods then
take the no. of sub-intervals as ‘6’.
Problems on Trapezoidal Rule
𝟔 𝟏
1. Evaluate ∫𝟎𝟏+
𝒙𝒙b
𝟐𝒅
y using Trapezoidal rule with 6 intervals.

Sol: Given that

1 and h  b  a  6  0 
a  0, b  6, f  x 1 x2 1
n they mentioned
 The no. of Intervals is denoted by ′𝑛′, and in the problem
(Note:
6
𝑛= 6)

We divide the given interval [0 6] in to 6 equal subintervals and the values of


′𝑥′ & ′𝑦′ are tabulated below.

𝑥 0 1 2 3 4 5 6
𝑦= (
𝑓 𝑥) 1 1 1 1 1 1 1
1 1 + 02 1 + 12 1 + 22 1 + 32 1 + 42 1 + 52 1 + 62
= =1 = 0.5 = 0.2 = 0.1 = 0.058 = 0.038 = 0.027
1
+
𝑥
weknowthat
2 by Trapezoidal
Rule, h

b
a f  x dx  y0  y6   2  y1  y2  y3  y4  y5
 2
6
∫ 1 𝑥𝑑=
18)}

{(1 + 0.027) + 2(0.5 + 0.2 + 0.1 + 0.058
+0 0.03
1 + 𝑥2 2
=
1.4095
𝟏 𝟏
2. Evaluate ∫𝒙b 𝒅y using Trapezoidal rule with 6 intervals.
𝟎𝟏+
𝒙

Sol:
1 𝑏−𝑎 1−0 1
Given 𝑎= 0, 𝑏= 1, 𝑦= (
𝑓 𝑥) = 𝑑ℎ𝑛𝑎= = =
1+𝑥 𝑛 6
6

We divide the given interval [0 1] in to 6 equal subintervals and the values of


′𝑥′ & ′𝑦′ are tabulated below

𝑥 0 1/6 2/6 3/6 4/6 5/6 6/6 =1


𝑦= (
𝑓 𝑥)
1 1 0.8571 0.75 0.6666 0.6 0.5454 0.5
=
1
+
𝑥
weknowthat by Trapezoidal
Rule, h
 y0  y6   2  y1  y2  y3  y4  y5
b
a 
f x dx
2


1

1 1

0 1 + 𝑥𝑥𝑑= 1 {(1 + 0.5) + 2(0.8571 + 0.75 + 0.6666 + 0.6
+ 0.52
454)}
=
0.69485
3. A rocket is launched from the ground. Its acceleration measured every 5
seconds is tabulated below. Find the velocity and the position of the
rocket at t = 40 seconds. Use trapezoidal rule.

𝑡 0 5 10 15 20 25 30 35 40
𝑎(
)𝑡 40 45.25 48.50 51.25 54.35 59.48 61.5 64.3 68.7
Sol
:
If ′𝑠′is the distance travelled in time ′′𝑡and ′𝑣′ is the velocity at time ′′𝑡then the
𝑣𝑑
acceleration is given by =𝑎
𝑑𝑡

40
Integrating the above equation, we get )=0
(𝑣 𝑡4
0 = ∫0 𝑡 𝑎𝑑
The given data is as
follows
𝑡 0 5 10 15 20 25 30 35 40
Y=𝑎𝑡
( ) 40 45.25 48.50 51.25 54.35 59.48 61.5 64.3 68.7

We know that by Trapezoidal


Rule
𝑏

∫ ( 𝑓 𝑥)
𝑑= {(𝑦0 + 𝑦8) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 + 𝑦6 +
𝑎
𝑦7)}2
Here ℎ = 5, 𝑦0 = 40, 𝑦1 = 45.25, 𝑦2 = 48.50, 𝑦3 = 51.25, 𝑦4 = 54.35,
𝑦5 = 59.48, 𝑦6 = 61.5, 𝑦7 = 64.3, 𝑦8 = 68.7.

By Trapezoidal Rule the required velocity


5
= {(40 + 68.7) + 2(45.25 + 48.50 + 51.25 + 54.35 + 59.48 +
2.
61 5 + 64.3)}
5 5
= {(108.7) + 2(384.63)} = (877.96) = 2194.9
2 2

Also the position of the rocket at ′′𝑡= 40 Seconds = (2194.9)(40)= 87796

(Note : Distance = Speed * Time)


𝟒
4. Evaluate ∫b𝒙𝒅𝒆𝒙y𝟎using Trapezoidal rule by taking h=1 and also
compare with exact value of the integral.

𝑓 𝑥) = 𝑒𝑥 𝑑𝑛𝑎ℎ = 1 = 𝑏𝑎−= 4−0= 4 ∴ 𝑛= 4


Sol: Given 𝑎= 0, 𝑏= 4, 𝑦= (
𝑛 𝑛 𝑛

We divide the given interval [0 4] in to 4 equal subintervals and the


values of
′𝑥′ & ′𝑦′ are tabulated below.
𝑥 0 1 2 3 4
𝑦= (
𝑓 𝑥) = 𝑒𝑥 1 2.7183 7.3890 20.0855 54.5981

weknowthat by Trapezoidal Rule


b
 a f  x dx 2
h
 0  y   2  y
4 1  y2  y3
y

1
1
∫0 𝑒𝑑𝑥𝑥= 2 {(1 + 54.5981) + 2(2.7183 + 7.3890 +
20.0855)}
=
57.992

Verification:

By actual Integration


4 4

x x 4
e dx  e e e
0 0
53.5981

Home Work Problems

Evaluate the following by using Trapezoidal


rule : 1
√1+ 𝑥3 𝑥𝑑by taking ℎ = 0.1
1. ∫0
21
2. ∫1 𝑥 𝑥𝑑
2
3. 𝑥𝑥𝑑 by taking ℎ = 0.2
∫0.
6

Problems on Simpson’s 1/3rd Rule


𝟐𝒅
𝒙
1. Evaluate ∫ by usingSimpson’s 1/3rd rule with 8 equal sub intervals.
𝟏 𝒙

Sol: Given 𝑎= 1, 𝑏= 2, = =
𝑓 𝑥) = 1 𝑥𝑑ℎ𝑛𝑎= 𝑏−𝑎 = 2−1𝑛
𝑦= ( 8
8 1 0.125
We divide the given interval [1 2] in to 8 equal subintervals and the values
of
′𝑥′ & ′𝑦′ are tabulated below.
𝑥 1 1.125 1.25 1.375 1.5 1.625 1.75 1.875 2
1 1 0.8888 0.8 0.7272 0.6666 0.6153 0.5714 0.5333 0.5
𝑦=
𝑥

weknowthat by simpson ' s 1 rule,


3rd
b
 f  x dx  3h  y  y   4  y  y  y  y   2  y  y  y 
a

0 n 1 3 5 7 2 4 6

2
𝑥𝑑 0.1
∫ 253 {(1 + 0.5) + 4(0.8888 + 0.7272 + 0.6153 + 0.5333) + 2(0.8 +
𝑥
=1
0.6666 + 0.5714)}
= 0.6931
𝟐𝒆𝒙
2. Evaluate ∫ 𝒙b𝒅y using Simpson’s 1/3rd rule with 4 intervals.
𝟏 𝒙

𝑥
Sol: Given 𝑎= 1, 𝑏= 2, 𝑦= (
𝑓 𝑥) = 𝑒
𝑥 𝑑ℎ𝑛𝑎=
𝑏−𝑎
= = =
2−1
𝑛 4
4 1 0.25
We divide the given interval [1 2] in to 4 equal subintervals and the values of
′𝑥′ & ′𝑦′ are tabulated below

𝑥 1 1.25 1.5 1.75 2


𝑒𝑥
𝑦= 2.7183 2.7922 2.9878 3.2883 3.6945
𝑥

We know that by Simpson’s 1/3rd Rule

𝑏

∫ (
𝑓 𝑥)
𝑑= {(𝑦0 + )
𝑦𝑛 + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ ) + 2(𝑦2 + 𝑦4 + 𝑦6 +
𝑎
⋯ )}3

∫ 𝑥𝑑=
2 𝑒𝑥 ℎ {(𝑦0 + 𝑦4) + 4(𝑦1 + 𝑦3) +
2(𝑦2)}
1
𝑥 3

= 0.253{(2.7183 + 3.6945) + 4(2.7922 + 3.2883) +


2(2.9878)}
=
3.0592
𝝅
𝒙 𝒔 𝒐⁄ 𝒄
3.Evaluate ∫ 𝟐 𝒙b𝒅y using Simpson’s 1/3rd rule
𝟎 𝟏+𝒙

Sol: Given
that

, and h b  a 2 
a  0, b  2 n   0 
 6 12
Note: In the given problem, if they did not mention the number of subintervals
take
the number of subintervals ‘n’=6 𝜋
We divide the given interval [0 2] in to 6 equal subintervals and the values of

′𝑥′ & ′𝑦′ are tabulated below.

𝑥 0 𝜋 2𝜋 3𝜋 4𝜋 5𝜋 6𝜋 𝜋
=
12 12 12 12 12 12 2
𝑥𝑠𝑜𝑐
𝑦= 1 0.7656 0.5684 0.396 0.2442 0.1121 0
1+𝑥

We know that by Simpson’s 1/3rd Rule

𝑏

∫ (
𝑓 𝑥)
𝑑= {(𝑦0 + )
𝑦𝑛 + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ ) + 2(𝑦2 + 𝑦4 + 𝑦6 +
𝑎
⋯ )}3
𝜋
𝑥𝑠⁄2𝑜𝑐 𝜋
∫ 𝑥𝑑= {(𝑦0 + 𝑦6) + 4(𝑦1 + 𝑦3 + 𝑦5) + 2(𝑦2 +
0
𝑦4)} 1 + 𝑥 36
𝜋
= 3 {(1 + 0) + 4(0.7656 + 0.396 + 0.1121) + 2(0.5684
6
+ 0.2442)}
=
0.6737
𝟐
𝟏
𝒅𝒙by using Simpson’s 1/3rd rule with h = 0.25
4.Evaluate ∫𝟎𝒙𝟑+𝒙+
𝟏
1
𝑑𝑛𝑎ℎ = 0.25
Sol: Given 𝑎= 0, 𝑏= 2, 𝑦= (
𝑓 𝑥) = 𝑥3++1
𝑥

Note: In the given problem, they did not mention the number of subintervals
but
they have given ‘h’ value directly.

We divide the given interval [0 2] in to equal subintervals with ‘h’=0.25 and the
values of ′𝑥′ & ′𝑦′ are tabulated below
𝑥 0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
1 1 0.7901 0.6154 0.4604 0.3333 0.2379 0.1702 0.1233 0.0909
𝑦=
𝑥3 + 𝑥+ 1

we knowthat by simpson ' s 1


3rd
rule, h
f x dx y  y  4 y  y  y  y  2 y  y 
b
 a 3 0 8  1 3 5 7  2 4

2
1
y6 

0 𝑥3 𝑥𝑑
+ 𝑥+ 1
0.
= 25 {(1 + 0.0909) + 4(0.7901 + 0.4604 + 0.2379 +
3
0
+ 2(0..
61
12
533+)0.3333 +
4
0.1702)}
= 0.8146
Home Work Problems
1. A solid of revolution is formed by rotating about the x-axis, the area between
the x-axis, the lines x = 0 and x = 1 and a curve thorough the points with the
following co-ordinates : Estimate the volume of the solid formed using
Simpson’s 1/3rd rule.

X 0.00 0.25 0.50 0.75 1.00

Y 1.0000 0.9896 0.9589 0.9089 0.8415

1
𝜋𝑦2 𝑥𝑑
Note: The volume of the solid generated is given by ∫0
𝜋
⁄2
)
𝑥𝑥using
𝑛2. 𝑖(𝑠𝑜 𝑥𝑙 𝑛∫ s𝑖 1/3
𝑑 Evaluate
𝑔Simpson’ 𝑠 rd rule.
0

3. The table below shows the velocities of a car at various intervals of time. Find
the distance covered by the car using Simpson's 1/3rd rule

Time 0 2 4 6 8 10 12
(min.)
Velocity 0 22 30 27 18 7 0
(km/hr)

𝑠𝑑
Note: If ‘s’ is the distance covered in ‘t’ minutes then𝑡𝑑 = 𝑣
12
∴ 𝑠= ∫ 𝑣𝑡𝑑
0
4
𝑒𝑥𝑥𝑑by Simpson’s 1/3 rule with 10 sub divisions.
4. Evaluate ∫0
Problems on Simpson’s 3/8th Rule
1 𝑑
𝑥
1. Evaluate ∫ by using Simpson’s 3/8th rule with 6
intervals 0 1+𝑥
1
𝑑𝑛𝑎ℎ = 𝑏𝑎−= 1−0 = 1
Sol: Given that 𝑎= 0, 𝑏= 1, 𝑦= (
𝑓 𝑥) = 1+𝑥 𝑛 6
6
We divide the given interval [0 1] in to 6 equal subintervals and the values of
′𝑥′ & ′𝑦′ are tabulated below.

𝑥 0 1/6 2/6 3/6 4/6 5/6 6/6 =1


𝑦= (
𝑓 𝑥)
1 1 0.8571 0.75 0.6666 0.6 0.5454 0.5
=
1
+
𝑥

w ekn ow that by Simpson ' s 3 rule,


8th
b
 a f  x d x  8
3h
 y0 6 1 2
 y   3 y  y  y  y   2  y
4 5 3


1
1 (1
3 
𝑥𝑑= )86 {(1 + 0.5) + 3(0.8571 + 0.75 + 0.6 + 0.5454)
0 1+𝑥
+ 2(0.6666)}
=
0.6932
𝜋

𝑑𝑥∫𝑛 using
2. Evaluate𝑥by 𝑖 𝑒
2 𝑠 Simpson’s 3/8th rule
0
−0 𝜋
𝜋
Sol: Given that 𝑎= 0, 𝑏= , 𝑦= ( 𝑑𝑛𝑛𝑎ℎ𝑖𝑒𝑠= 𝑏𝑎−= 2 =
𝑓 𝑥) 𝑥= 𝜋
2 1
𝑛 2

6
𝜋
We divide the given interval [0 2 ] in to 6 equal subintervals and the values of
′𝑥′ & ′𝑦′ are tabulated below.
𝑥 0 𝜋 2𝜋 3𝜋 4𝜋 5𝜋 6𝜋 𝜋
=
12 12 12 12 12 12 2

𝑦=𝑥𝑛𝑖𝑒𝑠 1 1.2954 1.6487 2.0281 2.3774 2.6272 2.7183

w ekn ow that by Simpson ' s 3 rule,


8th
b
 a f  x d x  8
3h
 y0  y6   3  y1  y 2  y4  y5   2  y3
1
3( 𝜋
∫𝑥𝑥𝑑0=
𝑛 𝑖𝑒𝑠 2 
)8 {(1 + 2.7183) + 3(1.2954 + 1.6487 + 2.3774 + 2.6272) +
1

2(2.0281)}
=3.1043.

3.Evaluate 6 𝑑𝑥 by using Simpson’s 3/8th rule


∫0 1+𝑥2

1
𝑑𝑛𝑎ℎ = 𝑏𝑎−= 6−0= 1
Sol: Given that 𝑎= 0
, 𝑏= 6, 𝑦= (
𝑓 𝑥) = 1+𝑥2 𝑛
6
We divide the given interval [0 6] in to 6 equal subintervals and the values of
′𝑥′ & ′𝑦′ are tabulated below.

𝑥 0 1 2 3 4 5 6
𝑦= (
𝑓 𝑥)
1 1 0.5 0.2 0.1 0.0588 0.0385 0.02703
=
1 + 𝑥2

w ekn ow that by Simpson ' s 3 rule,


8th
b
 a f  x d x  8
3h
 y0  y6   3  y1  y 2  y4  y5   2  y3


1
∫ 1 𝑥𝑑=
0
3(1)
1+ 𝑥2 {(1 + 0.02703) + 3(0.5 + 0.2 + 0.5888 + 0.0385) +

8 2(0.1)} = 1.3571
5 th
4.Evaluate 𝑥𝑑𝑔.using
∫𝑥4by 𝑜 𝑙 Simpson’s 3/8 Rule.
2
𝑏𝑎
− 5
.2−
4
Sol: Given that 𝑎= 4
, 𝑏= 5.2 𝑦= (
𝑓 𝑥) =
𝑥𝑔𝑑𝑜𝑛𝑎ℎ𝑙 = = = 0.2
𝑛 6

We divide the given interval [4 5.2] in to 6 equal subintervals


and the values of
′𝑥′ & ′𝑦′ are tabulated below.
𝑥 4 4.2 4.4 4.6 4.8 5 5.2
𝑦= (
𝑓 𝑥)
1.3863 1.4351 1.4816 1.5261 1.5686 1.6094 1.6487
=
𝑥𝑔𝑜𝑙

w ekn ow that by Simpson ' s 3 rule,


8th
b
 a f  x d x  8
3h
 y0  y6   3  y1  y 2  y4  y5   2  y3

5.2
3(0
∫ 𝑥𝑔𝑥𝑑𝑜=
𝑙 .2)
 8 {(1.3863 + 1.6487) + 3(1.4351 + 1.4816 + 1.5686 + 1.6094) +
4

= 2(1.5261)}
1.8278

Home Work
Problems 1.4
1. Compute the value of ∫ 𝑒𝑥𝑥using
𝑥+𝑔) 𝑥− (𝑠
𝑜𝑑 𝑛𝑙 𝑖Simpson’
s 3/8th rule.
0
.
6 2
𝑥𝑑 𝑐 ∫𝑒 Simpson’s
2. Evaluate
𝑥using 𝑥𝑠 3/8 rule by taking 9 intervals.
th
0

𝜋
⁄2
3. Evaluate ∫ 𝑥𝑠𝑥𝑑𝑜𝑐with 9 ordinates. (n=9)

0
Numerical Solution of Ordinary Differential Equations
A differential equation which involves one independent variable and ordinary
derivatives occurring in the given equation are with reference to this independent
variable is called an ordinary differential equation.

Ex : 𝑦 = 𝑓(𝑥) where 𝑥 is independent, and 𝑦 is dependent


𝑑𝑦
+ 𝑥𝑦 = 0
𝑑𝑥
𝑑2𝑦 𝑑𝑦
+ + 𝑥2𝑦 = 0
𝑑𝑥2 𝑑𝑥
Initial Value Problem :

A differential equation together with initial condition is called initial


value problem.

The general form of first order and first-degree differential


𝑑𝑦 equation is given by
𝑑𝑥 0 0
------------(1)
𝑑𝑦
[ 𝑑𝑥 = 𝑓(𝑥, 𝑦), 𝑦(𝑥0) = 𝑦0 or 𝑦 ′ = 𝑓(𝑥, 𝑦), 𝑦(𝑥0) = 𝑦0 ]

To find numerical solution of equation (1), here we study the following


numerical methods.
 Taylor’s series Method

 Picard’s method

 Euler’s Method

 Modified Euler’s Method

 Runge-Kutta Method (R-K Method)


Note
: 𝑑𝑦
The given equation is of the form = 𝑓(𝑥, 𝑦), given that 𝑦(𝑥 )0 = 𝑦 .
𝑑𝑥
0
 For finding of 𝑦1 = 𝑦(𝑥1) = 𝑦(𝑥0 + ℎ) the initial condition is 𝑦(𝑥0) = 𝑦0

 For finding of 𝑦2 = ( )
𝑦 𝑥2 = 𝑦(𝑥0 + 2ℎ) the initial condition is 𝑦(𝑥1) = 𝑦1.

 For finding of 𝑦3 = ( )
𝑦 𝑥3 = 𝑦(𝑥0 + 3ℎ) the initial condition is 𝑦(𝑥2) = 𝑦2

 For finding of 𝑦4 = ( )
𝑦 𝑥4 = 𝑦(𝑥0 + 4ℎ) the initial condition is 𝑦(𝑥3) = 𝑦3
Taylor’s Series Method:

The differential equation of first order and first degree is given


by
𝑑 𝑦 = f(𝑥, 𝑦) with initial condition 𝑦( 𝑥 )=𝑦 . ---------------------(1)
0 0
𝑑𝑥

We have to find 𝑦(𝑥1), 𝑦(𝑥2), 𝑦(𝑥3) 𝑒𝑡𝑐. , 𝑖.𝑒. , 𝑦1, 𝑦2, 𝑦3 𝑒𝑡𝑐.,

We know that 𝑦(𝑥) can be expressed about the point 𝑥0 in Taylor’s series in powers of
(𝑥 − 𝑥0) 𝑎𝑠 (𝒙−𝒙𝟎 ) (𝒙−𝒙 𝟎) 𝟐 (𝒙−𝒙 𝟎) 𝟑 (𝒙−𝒙 𝟎) 𝒏 (𝒏 )
𝟎 𝒚 ′𝟎 + 𝒚 ′′𝟎 + 𝒚 ′′′𝟎 + 𝒚𝟎 + − − − − ……………(2)
𝒚(𝒙) = 𝒚 + 𝟏! 𝟐! 𝟑!
𝒏! ⋯
Where 𝒚(𝒊𝟎) is the ‘i’ th derivative of 𝒚(𝒙)𝒂𝒕 𝒙 = 𝒙 , 𝒂𝒏𝒅
𝟎 𝒚 = 𝒚 𝟎

If we let (𝑥 − 𝑥0) = ℎ (𝑖. 𝑒. , 𝑥 = 𝑥0 + ℎ = 𝑥1 ), we can write the Taylors series in eq (2) as


𝒉 (𝒉 )𝟐 (𝒉 ) 𝟑
′ + 𝒚 ′′𝟎 + 𝒚 ′′′
𝟎 + − − − − − ………………………(3)
𝒚(𝒙𝟏 ) = 𝒚𝟏 = 𝒚𝟎 + 𝟏! 𝒚 𝟎 𝟐!
𝟑!
Similarly, expanding 𝒚(𝒙) in Taylor series about the point 𝒙𝟏, we will get

𝒉
(𝒉) 𝟐 ′′ ′(𝒉) 𝟑 ′′′
𝒚(𝒙𝟐) = 𝒚𝟐 = 𝒚𝟏 + 𝒚𝟏 + 𝒚 + 𝒚𝟏 + − − − − −
𝟏! 𝟐! 𝟏
𝟑!
Similarly, expanding 𝒚(𝒙) in Taylor series about the point 𝒙𝟐, we will get

𝒉 ′ (𝒉) 𝟐 ′′ (𝒉) 𝟑 ′′′


𝒚(𝒙𝟑) = 𝒚𝟑 = 𝒚𝟐 + 𝒚𝟐 + 𝒚 + 𝒚𝟐 + − − − − −
𝟏! 𝟐! 𝟐
𝟑!
Similarly expanding 𝒚(𝒙) at a general point 𝒙𝒏 , we will get

𝒉 ′ (𝒉) 𝟐 ′′ (𝒉) 𝟑 ′′′


𝒚(𝒙𝒏+𝟏) = 𝒚𝒏+𝟏 = 𝒚 𝒏 + 𝒚𝒏 + 𝒚 + 𝒚 +−−−− −
𝟏! 𝟐! 𝒏 𝟑! 𝒏

(𝒓) 𝒅 𝒓𝒚
where 𝒚 =( ) 𝒂𝒕 𝒙 = 𝒙 ,𝒏 𝒚 = 𝒚𝒏
𝒏 𝒅 𝒙𝒓
Problems on Taylor’s Series Method:

1. Find by Taylor’s Series method the value of 𝒚 𝒂𝒕 𝒙 = 𝟎. 𝟏 from


𝒅𝒚
𝒅𝒙= 𝒙𝟐𝒚 − 𝟏, 𝒚 (𝟎 ) = 𝟏
(or)
Find by Taylor’s Series method the value of 𝒚(𝟎. 𝟏) from 𝒚 ′ = 𝒙𝟐𝒚 − 𝟏,
𝒚(𝟎) = 𝟏.
Sol:

The given differential equation with initial condition is


𝒅𝒚
= 𝒙𝟐𝒚 − 𝟏, 𝒚 (𝟎 )
𝒅𝒙 = 𝟏

We have 𝒇(𝒙, 𝒚) = 𝒙𝟐𝒚 − 𝟏 and 𝒙𝟎 = 𝟎 , 𝒚𝟎 = 𝟏

Now 𝒚 ′ = 𝒙𝟐𝒚 − 𝟏 ….…(1)

Differentiating equation (1) successively with respect to ′𝒙′ we get

𝒚 ′′ = 𝟐𝒙𝒚 + 𝒙 𝒚 ---------------(2)
𝟐 ′

𝒚 ′′′ = 𝟐𝒚 + 𝟐𝒙𝒚′ + 𝟐𝒙𝒚′ + 𝒙 𝟐 𝒚 ′′ = 𝟐𝒚 + 𝟒𝒙𝒚′ + 𝒙 𝟐 𝒚 ′′ -----------(3)

𝒚𝒊𝒗 = 𝟐𝒚′ + 𝟒𝒚 ′ + 𝟒𝒙𝒚 ′′ + 𝟐𝒙𝒚 ′′ + 𝒙 𝟐 𝒚 ′′′ = 𝟔𝒚 ′ + 𝟔𝒙𝒚 ′′ + 𝒙 𝟐 𝒚 ′′′ -----(4)

𝒙𝟎 = 𝟎 𝒂𝒏𝒅 𝒚𝟎 = 𝟏
From the given initial condition 𝒚(𝟎) = 𝟏 we have

We were asked to find 𝒚(𝟎. 𝟏)𝒊. 𝒆. , 𝒚(𝒙𝟏), where 𝒙𝟏 = 𝟎. 𝟏

Here the step size 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟎. 𝟏 − 𝟎 = 𝟎. 𝟏

Now from equations (1), (2), (3) and (4) we have

𝒚 ′𝟎 = 𝒚 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎

= 𝒙 𝟐𝒚 𝟎 − 𝟏 = 𝟎−𝟏 = ∴ 𝒚 ′ 𝟎= −𝟏
−𝟏
𝟎
𝒚 ′′𝟎 = 𝒚 ′′ 𝒂𝒕 𝒙 = 𝒙 &𝟎 𝑦 = 𝒚 𝟎

= 𝟐𝒙 𝒚 + 𝒙 𝟐𝒚′ =𝟎 +𝟎 = 𝟎 ∴ 𝒚 ′′𝟎= 𝟎
𝟎 𝟎 𝟎 𝟎

𝒚 ′ ′ ′ = 𝒚′′′ 𝒂𝒕 𝒙 = 𝒙 & 𝑦 = 𝒚
𝟎 𝟎 𝟎

′ 𝟐 ′′
= 𝟐𝒚𝟎 + 𝟒𝒙𝟎𝒚 𝟎 + 𝒙𝟎 𝒚𝟎 = 𝟐(𝟏) + 𝟎 + 𝟎 = 𝟐 ∴ 𝒚 ′′′𝟎 = 𝟐

𝒚𝒊𝒗𝟎= 𝒚𝒗𝒊 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎

′ ′′ 𝟐 ′′′
= 𝟔𝒚 𝟎+ 𝟔𝒙 𝟎𝒚 𝟎+ 𝒙 𝒚𝟎 𝟎 = 𝟔(−𝟏) + 𝟎 + 𝟎 = −𝟔 ∴ 𝒚𝒊𝒗=
𝟎 −𝟔

By Taylor’s series we have

𝒉 𝟐 𝟑 𝟒

𝒚 𝟏 = 𝒚(𝒙 𝟏) = 𝒚(𝟎. 𝟏 ) = 𝒚𝟎 + 𝟏! 𝒚 𝟎 +
(𝒉 ) 𝒚 ′′𝟎 + (𝒉 ) 𝒚 ′′′
𝟎
(𝒉 ) 𝒚𝒗 𝒊𝟎 +
𝟐! 𝟑! + 𝟒! ⋯
𝟐
𝟑
𝟒
= 𝟏 + 𝟎𝟏. (−𝟏) + (𝟎.𝟏)
(𝟎.𝟏)
(𝟎 ) +
(𝟎.𝟏)
(𝟐 ) +
(−𝟔)
𝟏 𝟐 𝟔
𝟐𝟒

= 𝟏 − 𝟎. 𝟏 + 𝟎 + 𝟎. 𝟎𝟎𝟎𝟑𝟑 − 𝟎. 𝟎𝟎𝟎𝟎𝟐𝟓 + ⋯
2. Solve 𝒚 ′ = 𝟑𝒙 + 𝒚𝟐, 𝒈𝒊𝒗𝒆𝒏 𝒚(𝟎) = 𝟏. Find 𝒚(𝟎. 𝟏 ) 𝒂𝒏𝒅 𝒚(𝟎. 𝟐) by
= 𝟎. 𝟗𝟎𝟎𝟑
Taylor’s Series method .
Sol. The given differential equation with initial condition is

𝒚 ′ = 𝟑𝒙 + 𝒚𝟐, 𝒚( 𝟎 ) = 𝟏

We have 𝒇(𝒙, 𝒚) = 𝟑𝒙 + 𝒚𝟐 and 𝒙𝟎 = 𝟎 , 𝒚𝟎 = 𝟏

Now 𝒚 ′ = 𝟑𝒙 + 𝒚𝟐 ….…(1)

Differentiating equation (1) successively with respect to ′𝒙′ we get

𝒚 ′′ = 𝟑 + 𝟐𝒚𝒚′ ---------------(2)

𝒚 ′′′ = 𝟐𝒚𝒚 ′′ + 𝟐𝒚 ′ 𝒚 ′ = 𝟐[𝒚𝒚′′ + (𝒚′)𝟐]-----------(3)


𝒚𝒊𝒗 = 𝟐[ 𝒚𝒚 ′′′ + 𝒚 ′ 𝒚 ′′ + 𝟐 𝒚 ′ 𝒚 ′′ ] = 𝟐 [𝒚𝒚 ′′′ + 𝟑𝒚′𝒚′′]-----(4) and so on

We were asked to find 𝒚(𝟎. 𝟏) 𝒂𝒏𝒅 𝒚(𝟎. 𝟐) 𝒊. 𝒆. , 𝒚 ( 𝒙 𝟏 )𝒂𝒏𝒅 𝒚(𝒙𝟐 )

[ Here 𝒙𝟏 = 𝟎. 𝟏 & 𝒙𝟐 = 𝟎. 𝟐 ]

Now the step size 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟎. 𝟏 − 𝟎 = 𝟎. 𝟏

Step 1:

To find 𝒚(𝟎. 𝟏) 𝒊.𝒆, 𝒚(𝒙𝟏 ) = 𝒚𝟏

From the given initial condition 𝒚(𝟎) = 𝟏 we have 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏

Substituting these values in equations (1), (2), (3), and (4), we obtain
𝒚 ′𝟎 = 𝒚 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎

= 𝟑𝒙𝟎 + 𝒚𝟐 𝟎 = 𝟎 + 𝟏 ∴ 𝒚 ′ 𝟎= 𝟏
=𝟏
𝒚 ′′𝟎 = 𝒚 ′′ 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎

= 3+𝟐𝒚𝟎𝒚′ =
𝟎 𝟑 + 𝟐 ( 𝟏 ) (𝟏 ) = 𝟓 ∴ 𝒚 ′′𝟎= 𝟓

𝒚 ′′′𝟎 = 𝒚 ′′′ 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎


= 𝟐[𝒚𝟎 𝒚′′ + (𝒚 ′ )𝟐] = 𝟐[(𝟏)(𝟓) + 𝟏] = 𝟏𝟐
𝟎 𝟎 ∴ 𝒚 ′′′𝟎 = 𝟏𝟐

𝒚𝒊𝒗𝟎= 𝒚𝒊𝒗 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎


= 𝟐[ 𝒚 𝟎 𝒚 ′′′ + 𝟑𝒚 ′ 𝒚 ′′ ] = 𝟐[(𝟏)(𝟏𝟐) + 𝟑(𝟏)(𝟓)] = 𝟓𝟒
𝟎 𝟎 𝟎 ∴ 𝒚𝒊𝒗=
𝟎 𝟓𝟒

By Taylor’s series we have


𝒉 𝟐 𝟑 𝟒
′′ ′′′ ( 𝒉 ) 𝒚 𝒗𝒊 +
𝒚 ′𝟎 + 𝟐! 𝒚 𝟎 + 𝟑! 𝒚 𝟎 +
(𝒉 ) (𝒉 )
𝒚 𝟏 = 𝒚(𝟎. 𝟏) = 𝒚𝟎 𝟏! 𝟎
𝟒! ⋯
+ 𝟐 𝟑
𝟎.𝟏 (𝟎.𝟏) (𝟎.𝟏) (𝟎.𝟏) 𝟒
=𝟏 + (𝟏 ) + (𝟓 ) + (𝟏𝟐) + (𝟓𝟒) +…
𝟏 𝟐 𝟔 𝟐𝟒
= 𝟏 + 𝟎. 𝟏 + 𝟎. 𝟎𝟐𝟓 + 𝟎. 𝟎𝟎𝟐 + 𝟎. 𝟎𝟎𝟎𝟐𝟐𝟓 + ⋯

= 𝟏. 𝟏𝟐𝟕

Step 2:

To find 𝒚(𝟎. 𝟐) 𝒊. 𝒆, 𝒚(𝒙𝟐 ) = 𝒚𝟐

We start with (𝒙𝟏, 𝒚 𝟏 ) as the starting values.

Here 𝒙𝟏 = 𝟎. 𝟏 & 𝒚𝟏 = 𝟏. 𝟏𝟐𝟕 (𝑾𝒉𝒊𝒄𝒉 𝒔𝒊 𝒐𝒃𝒕𝒂𝒊𝒏𝒆𝒅 𝒊𝒏 𝑺𝒕𝒆𝒑 𝟏)

Putting these values of 𝒙𝟏 𝒂𝒏𝒅 𝒚𝟏 in equations (1), (2), (3) and (4)
𝒚 ′𝟏 = 𝒚 𝒂𝒕 𝒙 = 𝒙𝟏 & 𝑦 = 𝒚𝟏

= 𝟑𝒙𝟏 + 𝒚𝟐 𝟏= 𝟑(𝟎. 𝟏) + (𝟏. 𝟏𝟐𝟕)𝟐 = 𝟏. 𝟓𝟕 ∴ 𝒚 ′ 𝟏= 𝟏. 𝟓𝟕

𝒚 ′𝟏′ = 𝒚 ′′ 𝒂𝒕 𝒙 = 𝒙𝟏 & 𝑦 = 𝒚𝟏

= 𝟑 + 𝟐𝒚 𝟏 𝒚 ′ 𝟏= 𝟑 + 𝟐(𝟏. 𝟏𝟐𝟕)(𝟏. 𝟓𝟕) = 𝟔. 𝟓𝟑𝟖

∴ 𝒚 ′′𝟏= 𝟔. 𝟓𝟑𝟖

𝒚 𝟏′ ′ ′ = 𝒚 ′ ′ ′ 𝒂𝒕 𝒙 = 𝒙𝟏 & 𝑦 = 𝒚𝟏
= 𝟐 [ 𝒚 𝟏 𝒚 ′′ + ( 𝒚 ′ )𝟐] = 𝟐[(𝟏. 𝟏𝟐𝟕)(𝟔. 𝟓𝟑𝟖) + (𝟏. 𝟓𝟕)𝟐] = 𝟏𝟗. 𝟔𝟔𝟔
𝟏 𝟏

𝒚 ′′′𝟏 = 𝟏𝟗. 𝟔𝟔𝟔

𝒚𝒊𝒗𝟏= 𝒚𝒊𝒗 𝒂𝒕 𝒙 = 𝒙𝟏 & 𝑦 = 𝒚𝟏


= 𝟐 [ 𝒚 𝟏 𝒚 ′′′ + 𝟑𝒚 ′ 𝒚 ′ ′ ] = 𝟐[(𝟏. 𝟏𝟐𝟕)(𝟏𝟗. 𝟔𝟔𝟔) + 𝟑(𝟏. 𝟓𝟕)(𝟔. 𝟓𝟑𝟖)]
𝟏 𝟏 𝟏

= 𝟏𝟎𝟓. 𝟗𝟏𝟓

𝒚𝒊𝒗𝟏= 𝟏𝟎𝟓. 𝟗𝟏𝟓


By Taylor’s series expansion we have

𝒉 𝟐 𝟑 𝟒
′′ ′′′ (𝒉 ) 𝒚 𝒗𝒊 +
𝒚 ′𝟏 + 𝟐! 𝒚 𝟏 + 𝟑! 𝒚 𝟏 +
(𝒉 ) (𝒉 )
𝒚𝟐 = 𝒚(𝟎. 𝟐) = 𝒚𝟏 + 𝟏! 𝟏
𝟒! ⋯
𝟐 𝟑
𝟎.𝟏 (𝟎.𝟏) (𝟎.𝟏) (𝟎.𝟏) 𝟒
= 𝟏. 𝟏𝟐𝟕 + (𝟏. 𝟓𝟕) + (𝟔. 𝟓𝟑𝟖) + (𝟏𝟗. 𝟔𝟔𝟔) + (𝟏𝟎𝟓. 𝟗𝟏𝟓)
+…
𝟏 𝟐 𝟔 𝟐𝟒

= 𝟏. 𝟏𝟐𝟕 + 𝟎. 𝟏𝟓𝟕 + 𝟎. 𝟎𝟑𝟐𝟔 + 𝟎. 𝟎𝟎𝟑𝟐 + 𝟎. 𝟎𝟎𝟎𝟒

= 1.32

3. Find y(0.1), y(0.2),y(0.3) using Taylor’s series given that y’=𝒚𝟐+x,

y(0)=1.
Sol: Given y’=𝒚𝟐+x ----------------(1)

y’’=2yy’+1 ---------------(2)

y’’’=2yy’’+2y’y’=2yy’’+ 𝟐(𝒚′)𝟐 ---------------(3)

𝒚𝒊𝒗=2y’y’’+2yy’’’+4y’y’’ = 6y’y’’+2yy’’’ -------------(4)

From the given initial condition 𝒚(𝟎) = 𝟏 we have 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏

We were asked to find 𝒚(𝟎. 𝟏), 𝒚(𝟎. 𝟐) &𝒚(𝟎. 𝟑) 𝒊. 𝒆. , 𝒚(𝒙𝟏), 𝒚(𝒙𝟐 ) & 𝒚(𝒙𝟑 )

i.e. we have to find 𝒚𝟏, 𝒚𝟐 & 𝒚𝟑

[ Here 𝒙𝟏 = 𝟎. 𝟏, 𝒙𝟐 = 𝟎. 𝟐 & 𝒙𝟑 = 𝟎. 𝟑 ]

The step size 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟎. 𝟏 − 𝟎 = 𝟎. 𝟏


Step 1:

To find 𝒚(𝟎. 𝟏) 𝒊.𝒆, 𝒚(𝒙𝟏 ) = 𝒚𝟏

From the given initial condition 𝒚(𝟎) = 𝟏 we have 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏

Substituting these values in equations (1), (2), (3), and (4), we obtain
𝒚 ′𝟎 = (𝒚 𝟎 )𝟐 + 𝒙𝟎 = 𝟏 + 𝟎 = 𝟏

𝒚 ′′𝟎 = 𝟐𝒚 𝟎 𝒚 ′ 𝟎+ 𝟏 = 𝟐(𝟏)(𝟏) + 𝟏 = 𝟑
𝒚 ′ ′ ′ = 𝟐𝒚 𝟎 𝒚 ′′ + 𝟐 ( 𝒚 ′ )𝟐 = 𝟐(𝟏)(𝟑) + 𝟐(𝟐) = 𝟖
𝟎 𝟎 𝟎

𝒚𝒊𝒗= 𝟔𝒚 ′ 𝒚 ′ ′ + 𝟐𝒚 ′ 𝒚 ′ ′ ′ = 𝟔(𝟏)(𝟑) + 𝟐(𝟏)(𝟖) = 𝟑𝟒


𝟎 𝟎 𝟎 𝟎 𝟎

By Taylor’s series we have


𝒉 𝟐 𝟑 𝟒
′ + (𝒉 ) 𝒚 ′′𝟎 + (𝒉 ) 𝒚 ′′′𝟎 + (𝒉 ) 𝒚𝒗𝒊𝟎 +
𝒚𝟏 = 𝒚(𝟎. 𝟏) = 𝒚𝟎 𝟏! 𝒚 𝟎 𝟐! 𝟑!
𝟒! ⋯
+ = 1 + 0.1 + 0.015 + 0.00133 + 0.00014 = 1.11647

= 1.11647.

∴ 𝒚𝟏 = 𝟏. 𝟏𝟏𝟔𝟒𝟕

Step 2:

To find 𝒚(𝟎. 𝟐) 𝒊. 𝒆, 𝒚(𝒙𝟐 ) = 𝒚𝟐

We start with (𝒙𝟏, 𝒚 𝟏 ) as the starting values.

Here 𝒙𝟏 = 𝟎. 𝟏 & 𝒚𝟏 = 𝟏. 𝟏𝟏𝟔𝟒𝟕 (𝑾𝒉𝒊𝒄𝒉 𝒔𝒊 𝒐𝒃𝒕𝒂𝒊𝒏𝒆𝒅 𝒊𝒏 𝑺𝒕𝒆𝒑 𝟏)

Putting these values of 𝒙𝟏 𝒂𝒏𝒅 𝒚𝟏 in equations (1), (2), (3) and (4)
𝒚 ′𝟏 = (𝒚 𝟏 )𝟐 + 𝒙𝟏 = 𝟏. 𝟑𝟒𝟔𝟓𝟎
𝒚 ′′ = 𝟐𝒚𝟏 𝒚 ′ + 𝟏 = 𝟒. 𝟎𝟎𝟔𝟔𝟓
𝟏 𝟏

𝟐
𝒚𝟏′′′= 𝟐𝒚𝟏𝒚𝟏 +
′′
𝟐( 𝒚 𝟏 ) ′ = 𝟏𝟐. 𝟓𝟕𝟐𝟕𝟑

𝒚𝒊𝒗 = 𝟔𝒚′ 𝒚 ′′ + 𝟐𝒚 ′ 𝒚 ′′′ = 𝟔𝟎. 𝟒𝟒𝟑𝟖𝟕


𝟏 𝟏 𝟏 𝟏 𝟏

By Taylor’s expansion we have

𝒉 ′ 𝒉𝟐 ′′ 𝒉
𝟑
′′′ 𝒉
𝟒
𝒗𝒊
𝒚 𝟐 = 𝒚(𝒙 𝟐) = 𝒚(𝟎. 𝟐) = 𝒚 +
𝟏 𝟏! 𝒚 𝟏+ 𝟐! 𝒚 𝟏+ 𝟑! 𝒚𝟏 + 𝒚𝟏 +
𝟒!
………. 𝟐
𝟑
𝟒
= 1.11647 + (0.1)(1.34650) + (𝟎.𝟏) (4.00665) + (𝟎.𝟏) (12.57273) + (𝟎.𝟏) (60.44387)
𝟐
𝟔
𝟐𝟒

= 1.11647 + 0.13465 + 0.02003 + 0.00209 + 0.00025

=1.27344

∴ 𝒚𝟐 = 𝟏. 𝟐𝟕𝟑𝟒𝟒

Step 3:

To find 𝒚(𝟎. 𝟑) 𝒊. 𝒆, 𝒚(𝒙𝟑 ) = 𝒚𝟑

We start with (𝒙𝟐, 𝒚 𝟐 ) as the starting values.

Here 𝒙𝟐 = 𝟎. 𝟐 & 𝒚𝟐 = 𝟏. 𝟐𝟕𝟑𝟒𝟒 (𝑾𝒉𝒊𝒄𝒉 𝒔𝒊 𝒐𝒃𝒕𝒂𝒊𝒏𝒆𝒅 𝒊𝒏 𝑺𝒕𝒆𝒑 𝟐)


𝒚 ′𝟐 = (𝒚 𝟐 )𝟐 + 𝒙𝟐 = 𝟏. 𝟖𝟐𝟏𝟔𝟒
Putting
𝒚 ′′ these
= 𝟐𝒚 𝟐 𝒚values

+𝟏 =of𝟓𝒙. 𝟏𝟔𝟑𝟗𝟒𝟗
𝒂𝒏𝒅 𝒚𝟏 in equations (1), (2), (3) and (4)
𝟐 𝟐

𝟐
𝒚𝟐′′′= 𝟐𝒚𝟐𝒚𝟐 +
′′
𝟐( 𝒚 𝟐 ) ′ = 𝟐𝟎. 𝟗𝟗𝟗𝟖𝟒

𝒚𝒊𝒗= 𝟔𝒚 ′ 𝒚 ′′ + 𝟐𝒚 ′ 𝒚 ′′′ = 𝟏𝟏𝟓. 𝟏𝟐𝟐𝟕𝟗


𝟐 𝟐 𝟐 𝟐 𝟐
By Taylor’s expansion we
have
′ 𝒉𝟐 ′′ 𝒉
𝟑
′′′ 𝒉
𝟒
𝒗𝒊
𝒚 𝟑 = 𝒚(𝒙 𝟑) = 𝒚(𝟎. 𝟑) = 𝒚 𝟐+h𝒚 𝟐 + 𝟐 𝒚 𝟐+𝟔 𝒚 𝟐 + 𝟐𝟒 𝒚𝟐 +
… 𝟐
𝟑
𝟒
= 1.27344 + (0.1)(1.82164) + (𝟎.𝟏) (5.63949) + (𝟎.𝟏) (20.99984) + (𝟎.𝟏) (115.12279)
𝟐 𝟔
𝟐𝟒

= 1.48785
∴ y(0.2)=1.27344 and
∴ 𝒚𝟑 = 𝟏. 𝟒𝟖𝟕𝟕𝟐
y(0.1)=1.11647, y(0.3)=1.48772

Home work problemson Taylor’s Series


Method
𝒅𝒚
1) Using Taylor’s series, solve the equation
𝒅𝒙
= 𝒙𝟐 + 𝒚𝟐, for x = 0.4given
that,
y(0)=
1.
𝒅𝒚
2) Using Taylor’s series, solve the equation
𝒅𝒙
= 𝒙 − 𝒚𝟐, for x = 0.1 and 0.2
given
that,
y(0)=1.
𝒅𝒚
3) Using Taylor’s series, solve the equation
𝒅𝒙
= −𝒙y, for x = 0.1 and 0.2 given
that,
𝒚 𝟎= 1 and 𝒙𝟎 = 0. [ i.e.,
y(0)=1]
PICARDS METHOD FOR SOLVING FIRST ORDER ORDINARY DIFFERENTIAL
EQUATION 𝑑𝑦
The given differential equation is = 𝑓(𝑥, 𝑦) …………….(1) 𝑦(𝑥0) =
𝑦0……….…(2) 𝑑𝑥

From (1) 𝑑𝑦 = 𝑓(𝑥, 𝑦)𝑑𝑥

Integrating the above


equation in the interval
(𝑥0, 𝑥), we get
𝒙 𝒙
𝒙
i.e.,∫ (𝒚𝒅𝒚
)𝒙𝒙=𝒙 ∫ ∫𝒇(𝒙𝒙, 𝒇(𝒚𝒙),𝒅𝒙
=𝟎 = 𝒚)𝒅𝒙
𝟎

𝒙=𝒙𝟎 𝒙𝟎
𝟎 ∫ 𝒙 𝒇(𝒙, 𝒚)𝒅𝒙
or 𝒚(𝒙) − 𝒚(𝒙 ) = i.e., 𝒚(𝒙) = 𝒚 𝟎 𝒙
+ ∫ 𝒙𝟎𝒇(𝒙, 𝒚)𝒅𝒙…………(3)
𝒙𝟎

We find the RHS of eq (3) contains the unknown 𝒚 under the integral sign.

Picards method gives a sequence of functions 𝒚(𝟏), 𝒚(𝟐), 𝒚(𝟑), … . . 𝒐𝒇 ′𝒚′ which
forms a sequence of approximations of 𝒚 converging to 𝒚(𝒙)

To get the first approximation 𝒚(𝟏), put 𝒚 = 𝒚𝟎 in the integrand of eq(3), we get
𝒙
+ ∫ 𝒇(𝒙𝟎, 𝒚 )𝒅𝒙 ………….(4)
𝒚 (𝟏 ) = 𝒚 𝟎 𝒙𝟎

Since 𝒇(𝒙, 𝒚 𝟎 ) is a function of 𝒙, it is possible to evaluate the


integral. 𝒚(𝟏) for 𝒚, we use 𝒚 (𝟏) instead of 𝒚
After getting the first
approximation this in 𝒚(𝟐) for 𝒚 as
𝒇(𝒙, 𝒚) of eq(3) and then integrate to get the second
𝒙
approximation
+ ∫ 𝒇(𝒙, 𝒚(𝟏))𝒅𝒙……….(5)
𝒚 (𝟐 ) = 𝒚 𝟎 𝒙𝟎

Similarly the third 𝒚(𝟑) for 𝒚


approximation𝒙 is
𝒚 (𝟑 ) = 𝒚 𝟎
+ ∫ 𝒇(𝒙, 𝒚(𝟐))𝒅𝒙…..…..(6)
𝒙𝟎
(𝒏 )
Proceeding in this way, we get the 𝒏𝒕𝒉 approximation 𝒚 for 𝒚 as
𝒙
( 𝒏 ) 𝟎 + ∫ 𝒇(𝒙, 𝒚(𝒏−𝟏))𝒅𝒙---------------(7) 𝒇𝒐𝒓 𝒏 = 𝟐,𝟑, 𝟒, …

𝒚 =𝒚 𝒙𝟎
Equation (7) is known as Picard’s iteration formula and it gives the general
iterative
formula for 𝒚.

Problems
𝒅𝒚 on Picard’s Method:
1.Solve = 𝒙𝒚 + 𝟏, 𝒚(𝟎) = 𝟏 by Picard’s method to find 𝒚 when 𝒙 =
𝒅𝒙
𝟎. 𝟏
𝒅𝒚
Sol:- Given differential equation is = 𝒙𝒚 + 𝟏, 𝒚(𝟎) = 𝟏. ……….(1)
𝒅𝒙

Here 𝒇(𝒙, 𝒚) = 𝒙𝒚 + 𝟏, 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏
By Picard’s method

First approximation for 𝒚(𝒙) is given by

𝒚(𝟏 ) = 𝒚𝟎 + ∫
𝒇(𝒙, 𝒚𝟎 )𝒅𝒙 𝒙
= 𝟏 + ∫ (𝒙. 𝒚 𝟎 +
𝟏) 𝒅𝒙 𝟎 𝒙𝟎
𝒙
= 𝟏 + ∫ (𝒙 +
𝟏 ) 𝒅𝒙 𝟎
𝒙
=𝟏 + (𝒙𝟐 + = 𝟏 + {(𝒙𝟐 + 𝒙 ) −
𝟐 𝟎 𝟐
𝒙) 𝟎}
𝟐
𝒙
=𝟏 + + 𝒙
𝟐

𝟐
𝒙
∴ 𝒚 (𝟏 ) =𝟏 +𝒙+
𝟐

The second approximation for 𝒚(𝒙) is given by


𝒙
+ ∫ 𝒇(𝐱, 𝒚 (𝟏) )𝒅𝒙
𝒚 (𝟐 ) = 𝒚 𝟎 𝒙𝟎

𝒙
𝟎 ∫
=𝒚 + (𝒙. 𝒚(𝟏) + 𝟏 ) 𝒅𝒙
𝟎
𝒙 𝒙𝟐
= 𝟏 + ∫ ( 𝒙 (𝟏 + 𝒙 + ) + 𝟏 ) 𝒅𝒙
𝟎 𝟐
𝒙 𝒙𝟑
= 𝟏 + ∫ (𝒙 + 𝒙𝟐 + + 𝟏 ) 𝒅𝒙
𝟎 𝟐
𝒙
=𝟏 + (𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 +
𝟐 𝟑 𝟖 𝟎
𝒙)
𝟐 𝟑
𝟒
= 𝟏 + 𝒙𝟐+ 𝒙 + 𝒙
𝟑 +𝟖 𝒙

𝟐 𝟑 𝒙𝟒
∴ 𝒚(𝟐 ) = 𝟏 + 𝒙 + 𝒙 + 𝒙
𝟐 𝟑
+ 𝟖
Third approximation for 𝒚(𝒙) is given by
𝒙
+ ∫ 𝒇(𝐱, 𝒚 (𝟐) )𝒅𝒙
𝒚 (𝟑 ) = 𝒚 𝟎 𝒙𝟎
𝒙 (𝟐)
𝟎 + 𝟏 ) 𝒅𝒙
=𝒚 + ∫𝟎(𝒙. 𝒚
𝒙 𝒙𝟐 𝒙𝟑 𝒙𝟒
= 𝟏 + ∫ (𝒙 ( 𝟏 + 𝒙 + + + ) + 𝟏 ) 𝒅𝒙
𝟎 𝟐 𝟑 𝟖
𝒙 𝒙𝟑 𝒙𝟒 𝒙𝟓
= 𝟏 + ∫ (𝒙 + 𝒙𝟐 + + + + 𝟏 ) 𝒅𝒙
𝟎 𝟐 𝟑 𝟖
𝒙
=𝟏 + (𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 + 𝒙𝟓 + +
𝟐 𝟑 𝟖 𝟏𝟓 𝟒𝟖 𝟎
𝒙) 𝒙𝟔
𝟐 𝟑 𝟒 𝟓
𝒙 𝒙 𝒙 𝒙𝟔 𝒙
=𝟏 + + + + +
+𝒙
𝟐 𝟑 𝟖 𝟏𝟓
𝟒𝟖
∴ 𝒚(𝟑 ) =𝟏 + 𝒙 + + + +
𝟐 𝟑 𝟖 𝟏𝟓 𝟒𝟖
+ 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓

𝒙𝟔
Thus ′𝒚′ is found as a power series in ′𝒙′. It is clear that the resulting
expressions are too big, as we proceed to higher approximations. Hence we
take the approximate value of 𝒚 = 𝒚(𝟑)
𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 + 𝒙𝟔
∴ 𝒚(𝒙 ) = 𝒚(𝟑 )
=𝟏 + 𝒙+ 𝟐 +𝟑 +𝟖 𝟏𝟓 𝟒𝟖
+
When 𝒙 = 𝟎. 𝟏,

𝒚(𝟎. 𝟏) = 𝟏 + 𝟎. 𝟏 (𝟎. 𝟏) + (𝟎. 𝟏) + (𝟎. 𝟏) (𝟎. 𝟏)𝟓 + (𝟎. 𝟏)𝟔 = 𝟏. 𝟏𝟎𝟓𝟑𝟒


𝟐 𝟑 𝟒
𝟐 𝟑 𝟖 𝟏𝟓 𝟒𝟖
+ +
The value of 𝒚 when 𝒙 = 𝟎. 𝟏 is given by 𝐲 = 𝟏. 𝟏𝟎𝟓𝟑𝟒.

2. Using Picard’s method find 𝒚 at 𝒙 = 𝟎. 𝟏, 𝟎. 𝟐, given


that

𝒚 ′ = 𝒙 + 𝒚, 𝒚(𝟎) = 𝟏.

Sol : Given that 𝒇(𝒙, 𝒚) = 𝒙 + 𝒚, 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏,

𝒙𝟏 = 𝟎. 𝟏

𝒙𝟐 = 𝟎. 𝟐

[Note:- 𝒉 = 𝒙𝟐 − 𝒙𝟏 = 𝟎. 𝟐 − 𝟎. 𝟏 = 𝟎. 𝟏]

By Picard’s method

First approximation for 𝒚(𝒙) is given by

𝒚(𝟏) = 𝒚𝟎 + ∫ 𝒙
= 𝒚 + ∫𝟎 (𝒙 + 𝒚 )𝟎 𝒅𝒙
𝟎
𝒇(𝒙, 𝒚𝟎 )𝒅𝒙 𝒙
= 𝟏 + ∫ (𝒙 + 𝟏)𝒅𝒙
𝟎 𝒙𝟎
𝒙
= 𝟏 + ∫ (𝒙 + 𝟏)𝒅𝒙
𝟎
𝟐
𝒙
=𝟏 + + 𝒙
𝟐
𝟐
∴ 𝒚(𝟏 ) = 𝟏 + 𝒙 + 𝒙
𝟐
The second approximation for 𝒚(𝒙) is given by
𝒙
( 𝟐 ) 𝟎 + ∫ 𝒇(𝐱, 𝒚 (𝟏) )𝒅𝒙
𝒚 =𝒚 𝒙𝟎
𝒙
= 𝒚 + ∫ (𝒙 + 𝒚 ( 𝟏 ) ) 𝒅𝒙
𝟎 𝟎
𝒙
𝟎𝒙𝟐 𝟐
= 𝟏 + ∫ 𝒙 + (𝟏 + 𝒙 + )𝒅𝒙
𝒙
𝟐
= 𝟏 + ∫ (𝟏 + 𝟐𝒙 +𝒙 )𝒅 𝒙
𝟎 𝟐
𝟑
=𝟏 +𝒙+ 𝒙𝟐 + 𝒙
𝟔

𝟑
∴ 𝒚(𝟐) = 𝟏 + 𝒙 + 𝒙𝟐 + 𝒙
𝟔

Third approximation for 𝒚(𝒙) is given by


𝒙
( 𝟑 ) 𝟎 + ∫ 𝒇(𝐱, 𝒚 (𝟐) )𝒅𝒙
𝒚 =𝒚 𝒙𝟎
𝒙 (𝟐)
𝟎 ) 𝒅𝒙
=𝒚 + ∫𝟎(𝒙 + 𝒚
𝒙
𝟎𝒙𝟑 𝟔
= 𝟏 + ∫ (𝒙 + 𝟏 + 𝒙 + 𝒙𝟐 + )𝒅𝒙
𝒙
𝟎𝒙𝟑 𝟔
= 𝟏 + ∫ ( 𝟏 + 𝟐𝒙 + 𝒙𝟐 + 𝟒 ) 𝒅𝒙
𝟑 𝒙
𝒙 +
=𝟏 +𝒙+𝒙 + 𝟐
𝟑 𝟐𝟒

𝟑 𝟒
∴ 𝒚(𝟑) = 𝟏 + 𝒙 + 𝒙𝟐 + 𝒙 + 𝒙
𝟑
𝟐𝟒
Thus ′𝒚′ is found as a power series in ′𝒙′. It is clear that the resulting
expressions are too big, as we proceed to higher approximations. Hence we
take the approximate value of 𝒚 = 𝒚(𝟑)

𝒙𝟑 + 𝒙
𝟒
∴ 𝒚(𝒙) = 𝒚(𝟑) = 𝟏 + 𝒙 + 𝒙𝟐 +
𝟑 𝟑 𝟒
𝑨𝒕 𝒙 = 𝟎. 𝟏, 𝒚(𝟎. 𝟏) = 𝒚 𝟏 𝟐𝟒
= 𝟏 + 𝟎. 𝟏 + (𝟎. 𝟏) +
𝟐 (𝟎.𝟏)
+ (𝟎.𝟏)
𝟑 𝟐𝟒
= 𝟏. 𝟏𝟏𝟎𝟑
(𝟎. 𝟐)𝟑 (𝟎. 𝟐)𝟒
+ = 𝟏. 𝟐𝟒𝟐𝟕
𝑨𝒕 𝒙 = 𝟎. 𝟐, 𝒚(𝟎. 𝟐) = 𝒚𝟐 = 𝟏 + 𝟎. 𝟐 + (𝟎. 𝟐)𝟐 + 𝟑 𝟐𝟒

3.Find the value of 𝒚 at 𝒙 = 𝟎. 𝟒 by Picard’s Method, given that 𝒅𝒅𝒚𝒙 = 𝒙𝟐 + 𝒚𝟐,

𝒚(𝟎) = 𝟎.
𝒅𝒚
Sol. Given differential equation with initial condition is
𝒅𝒙
= 𝒙𝟐 +
Here 𝒇(𝒙𝒚, ,𝒚)𝒚(=
𝟐 𝟎)𝒙=
𝟐+𝟎 𝒚𝟐, 𝒙 = 𝟎, 𝒚 = 𝟎 and we were asked
𝟎 𝟎
to find 𝒚(𝟎. 𝟒)
Let 𝒙𝟏 = 𝟎. 𝟒
i.e., we have to find 𝒚𝟏
By Picard’s method
The First approximation
𝒙 for 𝒚(𝒙) is given
by + ∫ 𝒇(𝒙, 𝒚 )𝒅𝒙
𝒚 (𝟏 ) = 𝒚 𝟎 𝒙𝟎
𝟎
𝒙
= 𝟎 + ∫ (𝒙𝟐 + 𝒚 𝟐 ) 𝟎
𝟎
𝒅𝒙
𝒙 𝟐 + 𝟎)𝒅𝒙 = ( 𝒙𝟑 )𝒙𝟎 = ( 𝒙𝟑 ) − 𝟎 𝒙𝟑
= ∫𝟎 (𝒙 = 𝟑
𝟑
𝒙𝟑 𝟑
∴ 𝒚 ( 𝟏) =
𝟑
The second approximation for 𝒚(𝒙) is given by
𝒙
+ ∫ 𝒇(𝒙, 𝒚 ( 𝟏 ) )𝒅𝒙 =
𝒚 (𝟐 ) = 𝒚 𝟎 𝒙𝟎
𝒙
=𝟎 𝟐 + (𝒚 (𝟏) )𝟐 ]𝒅𝒙
∫𝟎 [𝒙
+
𝒙 𝒙
𝟐 + (𝒙𝟑 )𝟐 ] 𝒅𝒙 𝟐 + 𝒙𝟔 ] 𝒅𝒙 = 𝒙𝟑 𝒙𝟕
= ∫𝟎 [𝒙 𝟑 = ∫𝟎 [𝒙 𝟗 +
𝟑
𝟔𝟑

𝒙𝟑 + 𝒙𝟕
∴ 𝒚 ( 𝟐) = 𝟑 𝟔𝟑

Calculation of 𝒚(𝟑) is tedious and hence we take Hence we take the

approximate value of 𝒚 = 𝒚(𝟐)

𝒙𝟑 𝒙𝟕
∴ 𝒚(𝒙) = 𝟑 𝟔𝟑
+
Now put 𝒙 = 𝟎. 𝟒 in the above equation, we get
𝟑 𝟕
𝒚 (𝟎. 𝟒) = (𝟎.𝟒) + (𝟎.𝟒) = 𝟎. 𝟎𝟐𝟏𝟑𝟑𝟑
+ 𝟎. 𝟎𝟎𝟎𝟎𝟐𝟔 = 𝟎. 𝟎𝟐𝟏𝟑𝟓𝟗
𝟑 𝟔𝟑

4.Solve 𝒚 ′ = 𝒚 − 𝒙𝟐, 𝒚(𝟎) = 𝟏, by


Picard’s method upto the fourth
approximation.
Hence
Sol:- find
The the differential
given value of 𝒚(𝟎equation
. 𝟏), 𝒚(𝟎. is𝟐)𝒚. ′ = 𝒚 − 𝒙𝟐, 𝒚(𝟎) = 𝟏

Here 𝒇(𝒙, 𝒚) = 𝒚 − 𝒙𝟐, 𝒙𝟎 = 𝟎 𝒂𝒏𝒅 𝒚𝟎 = 𝟏

By Picard’s Method

First Approximation
𝒙 :
𝒚 (𝟏 ) = 𝒚 𝟎 𝟎 𝟎 − 𝒙𝟐 )𝒅𝒙
𝒙𝒙𝟎 𝟎
+ ∫ 𝒇(𝒙, 𝒚 )𝒅𝒙 =𝟏 +∫
(𝒚
𝒙
= 𝟏 + ∫ (𝟏 −
𝒙 𝟐 )𝒅𝒙 𝟎
𝒙𝟑 𝒙
= 𝟏 + (𝒙 − )𝟎
𝟑
𝟑
𝒙
=𝟏 +𝒙−
𝟑

Second
𝒙 𝒙
Approximation:
(𝟐 ) + ∫ 𝒇(𝒙, 𝒚 (𝟏 ) )𝒅𝒙 = 𝟏 + ∫ (𝒚 (𝟏) −
𝒚 =𝒚𝟎 𝟎
𝒙𝟎 𝒙 𝟐 )𝒅𝒙 𝒙 𝒙𝟑
= 𝟏 + ∫ [(𝟏 + 𝒙 − ) − 𝒙𝟐 ] 𝒅𝒙
𝟎 𝟑
𝒙𝟐 𝒙𝟒 𝒙𝟑
= 𝟏 + (𝒙 + − − )𝒙𝟎
𝟐 𝟏𝟐 𝟑

= 𝟏 + 𝒙 +𝒙𝟐 − 𝒙𝟒 𝒙𝟑
𝟐 𝟏𝟐 𝟑
Third −
𝒙 𝒙
Approximation:
+ ∫ 𝒇(𝒙, 𝒚 (𝟐 ) )𝒅𝒙 = 𝟏 + ∫ (𝒚 (𝟐) − 𝒙 𝟐 )𝒅𝒙
𝒚 (𝟑 ) = 𝒚 𝟎 𝒙𝟎 𝟎
𝒙 𝒙𝟐 𝒙𝟒 𝒙𝟑
= 𝟏 + ∫ [( 𝟏 + 𝒙 + − − ) − 𝒙𝟐 ] 𝒅𝒙
𝟎 𝟐 𝟏𝟐 𝟑
𝒙 𝒙𝟐 𝒙𝟒 𝒙𝟑
= 1 +∫𝟎[𝟏 + 𝒙 − 𝟐 − 𝟏𝟐 − 𝟑 ] 𝒅𝒙
𝟐
𝟑
𝟐 𝟔 𝟔𝟎 𝟏𝟐 𝟎
𝟓
= 1 + 𝒙 + −𝟒 − 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓
𝟐 𝟔 𝟏𝟐 𝟔𝟎
Fourth − 𝒙
= 1 + (𝒙 + − − 𝒙 𝒙
− 𝒙 )𝒙
𝒙 𝒙
Approximation:
(𝟒 ) + ∫ 𝒇(𝒙, 𝒚 (𝟑 ) )𝒅𝒙 = 𝟏 + ∫ (𝒚 (𝟑) −
𝒚 =𝒚 𝟎 𝒙𝟎 𝒙 𝟐 )𝒅𝒙 𝒙 𝟎 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓
= 1 + ∫ [(𝟏 + 𝒙 + − − − ) − 𝒙𝟐] 𝒅𝒙
𝟎 𝟐 𝟔 𝟏𝟐 𝟔𝟎
𝒙 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓)]
= 1 + ∫𝟎[ ( 𝟏 + 𝒙 − 𝟐 − 𝟔 − 𝟏𝟐 − 𝟔𝟎
𝒅𝒙
𝟐 𝟑
𝟒 𝒙𝟔 𝒙
𝟓 )
= 1+ (𝒙 + 𝟐𝟐𝒙 − 𝒙𝟑𝟔 − 𝒙𝟒𝟐𝟒 − 𝟓𝟔𝟎
𝒙 𝟑𝟔𝟎 𝟎
= 𝒙𝟔
− 1 + 𝒙 +𝒙𝟐 − 𝒙𝟔 − 𝒙𝟐𝟒 − 𝒙𝟔𝟎 𝟑𝟔𝟎

We stop the process here since we were asked to do up to fourth
approximation.

Hence we take 𝒚(𝟒) as the approximate value of 𝒚(𝒙).


𝒙𝟐 𝒙𝟑 𝒙𝟒 − 𝒙𝟓 𝒙𝟔
∴ 𝒚(𝒙) = 𝟏 + 𝒙 + 𝟐 − 𝟔 𝟐𝟒 𝟔𝟎 𝟑𝟔𝟎


Put 𝒙 = 𝟎. 𝟏 𝒊𝒏 𝒚(𝒙)
𝟐 𝟑𝟔 𝟒 𝟓
(𝟎.𝟏) (𝟎.𝟏) (𝟎.𝟏) (𝟎.𝟏) (𝟎.𝟏)
𝒚(𝟎. 𝟏 ) = 𝟏 + 𝟎. 𝟏 + − − − −
𝟐 𝟔 𝟐𝟒 𝟔𝟎 𝟑𝟔𝟎

= 1 + 0.1 + 0.005 - 0.0001666 - 0.00000416 - 0.000000166-


0.00000000277

=1.104829

Put 𝒙 = 𝟎. 𝟐 in 𝒚(𝒙)
(𝟎. 𝟐)𝟐 (𝟎. 𝟐)𝟑 (𝟎. 𝟐)𝟒 (𝟎. 𝟐)𝟓 (𝟎. 𝟐)𝟔
− − −
𝒚(𝟎. 𝟐) = 𝟏 + 𝟎. 𝟐 + 𝟐 𝟔 𝟐𝟒 𝟔𝟎 𝟑𝟔𝟎

= 1 + 0.2 + 0.02 – 0.0013333 – 0.00006666 - 0.000005333 –
0.0000001777

= 1.21859

Home Work Problems


𝒅𝒚
𝒚−𝒙
1) Using Picard’s method, solve the equation = , 𝒚(𝟎) = 𝟏. Find y for
x= 𝒅𝒚
𝒅𝒙
2) Using Picard’s method, solve the equation = 𝒙 + 𝒚𝟐, y(0)=0. Find y for x
𝒅 𝒙
= 𝒚+𝒙
0.1
0.1.
.
EULER’S METHOD FOR SOLVING FIRST ORDER ORDINARY DIFFERENTIAL EQUATION
𝑑𝑦
The given differential equation is 𝑑𝑥 0 0 ……….…(1)

By Euler’s Algorithm we can find 𝒚𝟏, 𝒚𝟐, 𝒚𝟑, … . 𝒊. 𝒆, 𝒚(𝒙𝟏), 𝒚(𝒙𝟐), 𝒚(𝒙𝟑 ) …., starting from

the initial condition 𝒚(𝒙𝟎 ) = 𝒚𝟎


By Euler 𝒚𝟏 = 𝒚𝟎 + 𝒉. 𝒇(𝒙𝟎, 𝒚 𝟎 )
Algorithm
𝒚𝟐 = 𝒚𝟏 + 𝒉. 𝒇(𝒙𝟏, 𝒚 𝟏 )

𝒚𝟑 = 𝒚𝟐 + 𝒉. 𝒇(𝒙𝟐, 𝒚 𝟐 )

𝒚𝟒 = 𝒚𝟑 + 𝒉. 𝒇(𝒙𝟑, 𝒚 𝟑 ) and so
on.
where ′ 𝒉′ is the step size of ′𝒙′. i.e., 𝒉 = 𝒙𝟏
− 𝒙𝟎

In general, we obtain a recursive relation


as
𝒚 𝒏 = 𝒚𝒏−𝟏 + 𝒉. 𝒇(𝒙𝒏−𝟏, 𝒚𝒏−𝟏) 𝒇𝒐𝒓 𝒏 = 𝟏, 𝟐, 𝟑, ….

Problems on Euler’s
Method:
𝒅𝒚
1) Use Euler’s method to find approximate solution of
𝒅𝒙
= 𝒚 − 𝒙 atthe
points
2.1 and 2.2 with initial condition 𝒚(𝟐)
= 𝟏.

(or)
𝒅𝒚
Use Euler’s method to find 𝒚(𝟐. 𝟏 ) 𝒂𝒏𝒅 𝒚(𝟐. 𝟐) from
𝒅𝒙 = 𝒚 − 𝒙, 𝒚(𝟐)
= 𝟏.
𝒅𝒚
Sol : Given differential equation with initial condition is
𝒅 𝒙 = 𝒚 − 𝒙, 𝒚(𝟐) = 𝟏

Here 𝒇(𝒙, 𝒚) = 𝒚 − 𝒙 , 𝒙𝟎 = 𝟐, 𝒚𝟎 = 𝟏

Here we were asked to find 𝒚(𝟐. 𝟏) 𝒂𝒏𝒅 𝒚(𝟐. 𝟐)

Let 𝒙𝟏 = 𝟐. 𝟏

∴ 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟐. 𝟏 − 𝟐. 𝟎 = 𝟎. 𝟏

and 𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟐. 𝟏 + 𝟎. 𝟏 = 𝟐. 𝟐

∴ We have to find 𝒚(𝒙𝟏 ) = 𝒚(𝟐. 𝟏) = 𝒚𝟏 and 𝒚(𝒙𝟐 ) = 𝒚(𝟐. 𝟐) = 𝒚𝟐

Given that 𝒇(𝒙, 𝒚) = 𝒚 − 𝒙

By Euler’s formula, 𝒚𝒏+𝟏 = 𝒚 𝒏 + 𝒉𝒇(𝒙𝒏, 𝒚 𝒏 ) for n = 0,1, 2, 3,

…. For n =0, we have 𝒚(𝒙𝟏 ) = 𝒚𝟏 = 𝒚𝟎 + 𝒉𝒇(𝒙𝟎, 𝒚 𝟎 )

= 𝟏 + (𝟎. 𝟏)(𝒚𝟎 − 𝒙𝟎 )

= 𝟏 + (𝟎. 𝟏)(𝟏 − 𝟐)
= 𝟏 − 𝟎. 𝟏 = 𝟎. 𝟗

𝒚(𝟐. 𝟏) = 𝒚𝟏 = 𝟎. 𝟗

For n =1, we have 𝒚(𝒙𝟐 ) = 𝒚𝟐 = 𝒚𝟏 + 𝒉𝒇(𝒙𝟏, 𝒚 𝟏 )

𝒚(𝟐. 𝟐) = 𝟎. 𝟗 + (𝟎. 𝟏)(𝒚𝟏 − 𝒙𝟏 )

= 𝟎. 𝟗 + (𝟎. 𝟏)(𝒚𝟏 − 𝒙𝟏 )

= 𝟎. 𝟗 + (𝟎. 𝟏)(𝟎. 𝟗 − 𝟐. 𝟏)
2. Apply Euler’s method to solve 𝒚 ′ = 𝒙 + 𝒚, 𝒚(𝟎) = 𝟎 𝒕𝒐 find y(1.2) by

taking the step size 𝒉 = 𝟎. 𝟐

Sol : Given that𝒇(𝒙, 𝒚) = 𝒙 + 𝒚, 𝒚(𝟎) =0 i.e 𝒙𝟎 = 𝟎, 𝒚𝟎 =0 & 𝒉 = 𝟎. 𝟐

We know that , 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟎 + 𝟎. 𝟐 =0.2

𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟐 + 𝟎. 𝟐 = 𝟎. 𝟒

𝒙𝟑 = 𝒙𝟐 + 𝒉 = 𝟎. 𝟒 + 𝟎. 𝟐 = 𝟎. 𝟔

𝒙𝟒 = 𝒙𝟑 + 𝒉 = 𝟎. 𝟔 + 𝟎. 𝟐 = 𝟎.8

𝒙𝟓 = 𝒙𝟒 + 𝒉 = 𝟎. 𝟖 + 𝟎. 𝟐 = 𝟏. 𝟎

𝒙𝟔 = 𝒙𝟓 + 𝒉 = 𝟏. 𝟎 + 𝟎. 𝟐 = 𝟏.2

Here we were asked to find 𝒚(𝟏. 𝟐) = 𝒚(𝒙𝟔 ) = 𝒚𝟔

For this we have to find 𝒚𝟏, 𝒚𝟐, 𝒚𝟑, 𝒚𝟒, 𝒚𝟓

Now By Euler’s method 𝒚(𝒙𝟏)= 𝒚𝟏 = 𝒚𝟎 + 𝒉𝒇(𝒙𝟎, 𝒚 𝟎 )


𝒚𝟏 = 𝒚(𝟎. 𝟐) = 𝟎
= 𝟎 + (𝟎. 𝟐)(𝟎 + 𝟎) = 𝟎

𝒚(𝒙𝟐 ) = 𝒚𝟐 = 𝒚𝟏 + 𝒉𝒇(𝒙𝟏, =
𝒚 𝟏 )𝟎

= 𝟎 + 𝟎. 𝟐(𝟎. 𝟐 +
𝟎)
𝒚𝟐 = 𝒚(𝟎. 𝟒) = 𝟎. 𝟎𝟒
= 𝟎. 𝟎𝟒
𝒚(𝒙𝟑 ) = 𝒚𝟑 = 𝒚𝟐 + 𝒉𝒇(𝒙𝟐, 𝒚 𝟐 )

= 𝟎. 𝟎𝟒 + (𝟎. 𝟐)[𝟎. 𝟒 + 𝟎. 𝟎𝟒]

𝒚𝟑 = 𝒚(𝟎. 𝟔) ==
𝟎.𝟎𝟏𝟐𝟖
. 𝟏𝟐𝟖

𝒚(𝒙𝟒 ) = 𝒚𝟒 = 𝒚𝟑 + 𝒉𝒇(𝒙𝟑, 𝒚 𝟑 )

= 𝟎. 𝟏𝟐𝟖 + (𝟎. 𝟐)[𝟎. 𝟔 + 𝟎. 𝟏𝟐𝟖] = 𝟎. 𝟐𝟕𝟑𝟔


𝒚𝟒 = 𝒚(𝟎. 𝟖) = 𝟎. 𝟐𝟕𝟑𝟔

𝒚(𝒙𝟓 ) = 𝒚𝟓 = 𝒚𝟒 + 𝒉𝒇(𝒙𝟒, 𝒚 𝟒 )

= 𝟎. 𝟐𝟕𝟑𝟔 + 𝟎. 𝟐(𝟎. 𝟖 + 𝟎. 𝟐𝟕𝟑𝟔) = 𝟎. 𝟒𝟖𝟖𝟑𝟐


𝒚𝟓 = 𝒚(𝟏) = 𝟎. 𝟒𝟖𝟖𝟑𝟐

𝒚(𝒙𝟔 ) = 𝒚𝟔 = 𝒚𝟓 + 𝒉𝒇(𝒙𝟓, 𝒚 𝟓 )

= 𝟎. 𝟒𝟖𝟖𝟑𝟐 + 𝟎. 𝟐[𝟏. 𝟎 + 𝟎. 𝟒𝟖𝟖𝟑𝟐]


𝒚𝟔 = 𝒚(𝟏. 𝟐) = 𝟎. 𝟕𝟖𝟓𝟗𝟖

3.Using Euler’s method, Find 𝒚(𝟐) from 𝒅𝒅𝒚𝒙 = 𝟑𝒙𝟐 + 𝟏, 𝒚(𝟏) = 𝟐, taking step
size (𝒊) 𝒉 = 𝟎. 𝟓 (𝒊𝒊)𝒉 = 𝟎. 𝟐𝟓

𝒅𝒚
Sol. Given differential equation is = 𝟑𝒙𝟐 + 𝟏, 𝒚(𝟏) = 𝟐 ……….(1)
𝒅𝒙

Here 𝒇(𝒙, 𝒚) = 𝟑𝒙𝟐 + 𝟏, 𝒙𝟎 = 𝟏, 𝒚𝟎 = 𝟐


By Euler’s Algorithm 𝒚 𝒏 = 𝒚𝒏−𝟏 + 𝒉. 𝒇(𝒙𝒏−𝟏, 𝒚𝒏−𝟏)----------(2)

(i Let the step size 𝒉 = 𝟎. 𝟓


)
Then 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟏 + 𝟎. 𝟓 =
𝟏. 𝟓
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟏. 𝟓 + 𝟎. 𝟓 = 𝟐
We were asked to find 𝒚 for 𝒙 = 𝟐, i.e., 𝒚(𝟐) = 𝒚(𝒙𝟐 ) = 𝒚𝟐

Now by taking 𝒏 = 𝟏 in equation (2), we have


𝒚𝟏 = 𝒚𝟎 + 𝒉. 𝒇(𝒙𝟎, 𝒚 𝟎 )

= 𝒚𝟎 + 𝒉(𝟑𝒙𝟐 𝟎+ 𝟏 )

=𝟐 + 𝟎. 𝟓 [𝟑(𝟏)𝟐 + 𝟏] = 𝟐 + 𝟎. 𝟓 (𝟒) = 𝟒

∴ 𝒚𝟏 = 𝒚(𝒙𝟏 ) = 𝒚(𝟏. 𝟓) = 𝟒

Now by taking 𝒏 = 𝟐 in equation (2), we have


𝒚𝟐 = 𝒚𝟏 + 𝒉. 𝒇(𝒙𝟏, 𝒚 𝟏 )

= 𝒚𝟏 + 𝒉(𝟑𝒙𝟐 𝟏+ 𝟏 )

= 𝟒 + 𝟎. 𝟓 [𝟑(𝟏. 𝟓)𝟐 + 𝟏] = 𝟒 + 𝟎. 𝟓 (𝟕. 𝟕𝟓) = 𝟕. 𝟖𝟕𝟓


∴ 𝒚𝟐 = 𝒚(𝒙 𝟐 ) = 𝒚(𝟐) = 𝟕. 𝟖𝟕𝟓

(ii Let the step size 𝒉 = 𝟎. 𝟐𝟓


)
Then 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟏 + 𝟎. 𝟐𝟓 = 𝟏. 𝟐𝟓
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟏. 𝟐𝟓 + 𝟎. 𝟐𝟓 = 𝟏. 𝟓
𝒙𝟑 = 𝒙𝟐 + 𝒉 = 𝟏. 𝟓 + 𝟎. 𝟐𝟓 =
𝟏. 𝟕𝟓
𝒙𝟒 = 𝒙𝟑 + 𝒉 = 𝟏. 𝟕𝟓 + 𝟎. 𝟐𝟓 =
𝟐
We were asked to find 𝒚 for 𝒙 = 𝟐, i.e., 𝒚(𝟐) = 𝒚(𝒙𝟒 ) = 𝒚𝟒

Now by taking 𝒏 = 𝟏 in equation (2), we have


𝒚𝟏 = 𝒚𝟎 + 𝒉. 𝒇(𝒙𝟎, 𝒚 𝟎 )

= 𝒚𝟎 + 𝒉(𝟑𝒙𝟐 𝟎+ 𝟏 )

=𝟐 + 𝟎. 𝟐𝟓 [𝟑(𝟏)𝟐 + 𝟏] = 𝟑

∴ 𝒚𝟏 = 𝒚(𝒙𝟏 ) = 𝒚(𝟏. 𝟐𝟓) = 𝟑

Now by taking 𝒏 = 𝟐 in equation (2), we


𝒚𝟐 = 𝒚𝟏 + 𝒉. 𝒇(𝒙𝟏, have
𝒚𝟏 )

= 𝒚𝟏 + 𝒉(𝟑𝒙𝟐 𝟏+ 𝟏 )
= 𝟑 + 𝟎. 𝟐𝟓 [𝟑(𝟏. 𝟐𝟓)𝟐 + 𝟏] = 𝟒. 𝟒𝟐𝟏𝟖𝟖

∴ 𝒚𝟐 = 𝒚(𝒙𝟐 ) = 𝒚(𝟏. 𝟓) = 𝟒. 𝟒𝟐𝟏𝟖𝟖


Now by taking 𝒏 = 𝟑 in equation (2), we
have
𝒚 = 𝒚 + 𝒉. 𝒇(𝒙 , 𝒚 )
𝟑 𝟐 𝟐 𝟐

= 𝒚𝟐 + 𝒉(𝟑𝒙𝟐 𝟐+ 𝟏 )
= 𝟒. 𝟒𝟐𝟏𝟖𝟖 + 𝟎. 𝟐𝟓 [𝟑(𝟏. 𝟓)𝟐 + 𝟏] = 𝟔. 𝟑𝟓𝟗𝟑𝟖

∴ 𝒚𝟑 = 𝒚(𝒙𝟑 ) = 𝒚(𝟏. 𝟕𝟓) = 𝟔. 𝟑𝟓𝟗𝟑𝟖


Now by taking 𝒏 = 𝟒 in equation (2), we have
𝒚𝟒 = 𝒚𝟑 + 𝒉. 𝒇(𝒙𝟑, 𝒚 𝟑 )

= 𝒚𝟑 + 𝒉(𝟑𝒙𝟐 𝟑+ 𝟏 )
= 𝟔. 𝟑𝟓𝟗𝟑𝟖 + 𝟎. 𝟐𝟓 [𝟑(𝟏. 𝟕𝟓)𝟐 + 𝟏] = 𝟖. 𝟗𝟎𝟔𝟐𝟔
∴ 𝒚𝟒 = 𝒚(𝒙 𝟒 ) = 𝒚(𝟐) = 𝟖. 𝟗𝟎𝟔𝟐𝟔
Note: Observe the difference in the value of 𝒚(𝟐) in both cases i.e., when 𝒉 = 𝟎. 𝟓
and when 𝒉 = 𝟎. 𝟐𝟓.

The Accuracy of the solution is improved when the step size ′ 𝒉′ is

small. 4.Use Euler’s method to find 𝒚(𝟎. 𝟑) by taking step size 𝒉 = 𝟎.

given that 𝒚 ′ = 𝒙 + 𝒚, 𝒚(𝟎) = 𝟏. Compare the result obtained by this method


with the result obtained by analytical method.

Solution: Here 𝒇(𝒙, 𝒚) = 𝒙 + 𝒚, 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏, 𝒉 = 𝟎. 𝟏

We know that 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟎 + 𝟎. 𝟏 = 𝟎. 𝟏

𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟏 + 𝟎. 𝟏 = 𝟎. 𝟐

𝒙𝟑 = 𝒙𝟐 + 𝒉 = 𝟎. 𝟐 + 𝟎. 𝟏 = 𝟎. 𝟑

Here we have to find 𝒚(𝟎. 𝟑) = 𝒚(𝒙𝟑 ) = 𝒚𝟑


By
𝒚𝟏 =Euler’s
𝒚(𝟎. 𝟏)method,
= 𝟏. 𝟏
𝒚𝒚((𝒙𝒙𝟏 )) = 𝒚𝟏 = 𝒚𝟎 + 𝒉𝒇(𝒙𝟎, 𝒚 𝟎 )
𝟐 = 𝒚𝟐 = 𝒚𝟏 + 𝒉𝒇(𝒙𝟏, 𝒚 𝟏 )

=
= 𝟏𝟏.+ 𝟎.𝟎𝟏.)𝟏[𝟎[𝟎+
𝟏 (+ . 𝟏𝟏+
]=𝟏.𝟏𝟏. ] = 𝟏. 𝟐𝟐
𝒚𝟐 = 𝒚 𝟎. 𝟐 = 𝟏. 𝟐𝟐
( )

𝒚(𝒙𝟑 ) = 𝒚𝟑 = 𝒚𝟐 + 𝒉𝒇(𝒙𝟐, 𝒚 𝟐 )

= 𝟏. 𝟐𝟐 + (𝟎. 𝟏)[𝟎. 𝟐 + 𝟏. 𝟐𝟐] = 𝟏. 𝟑𝟔𝟐


𝒚𝟑 = 𝒚(𝟎. 𝟑) = 𝟏. 𝟑𝟔𝟐
Analytical
method:
Given differential equation is 𝒅𝒅𝒚𝒙 = 𝒙 + 𝒚
𝒅𝒚
𝒅𝒙
−𝒚 = 𝒙

𝒅𝒚 which is
The above equation is of the form
𝒅 𝒙 + 𝑷(𝒙). 𝒚 =
linear
𝑸 ( 𝒙)
equation in ′𝒚′

Here 𝑷 = −𝟏, 𝑸 = 𝒙 𝑰. 𝑭 = 𝒆∫ −𝟏𝒅𝒙 = 𝒆−𝒙

Solution is 𝒚(𝑰. 𝑭 ) = ∫ 𝑸(𝑰. 𝑭 ) 𝒅𝒙 + 𝒄

𝒚(𝒆−𝒙)= ∫ 𝒙𝒆
𝒙𝒆
−𝒙
−𝒙𝒅𝒙 + 𝒄
= + ∫ 𝒆−𝒙𝒅𝒙 + 𝒄
−𝟏
−𝒙
𝒆
= −𝒙𝒆−𝒙 +
−𝟏

𝒚(𝒆−𝒙) =+𝒆−𝒙𝒄[−𝒙 − 𝟏] + 𝒄

𝒚 = (−𝒙 − 𝟏) + 𝒄𝒆𝒙− − − − − (𝟏)

Here , the given condition is 𝒚(𝟎) = 𝟏, that is 𝒚 = 𝟏 at 𝒙


=𝟎

From (𝟏 ) 𝟏 = −𝟏 + 𝒄
𝒄= 𝟐 𝒚(𝒙) = −(𝒙 + 𝟏) + 𝟐𝒆𝒙

∴ The
𝒚(𝟎. 𝟑solution
) = −(𝟎of
. 𝟑 given
+ 𝟏) D.E.
+ 𝟐𝒆is
𝟎.𝟑
𝒚 = −(𝒙 + 𝟏) + 𝟐𝒆𝒙
= 𝟏. 𝟑𝟗𝟗𝟕𝟏

In Numerical Method we get 𝒚𝟑 = 𝟏. 𝟑𝟔𝟐 where as in analytic method


we get 𝒚𝟑 = 𝟏. 𝟑𝟗𝟗𝟕𝟏
Home work
problems.
1. Find y(0.1) and y(0.2) using Euler’s method, given that
𝒅𝒙
𝒅𝒚
= 𝒙𝟐 − 𝒚, 𝒚(𝟎) = 𝟏.

𝒅𝒚
2. Find y(2) using Euler’s method, given that
𝒅 𝒙 = 𝟑𝒙𝟐 + 𝟏, 𝒚(𝟏 ) = 𝟐 with

h = 0.2.

3. Find y(0.25) and y(0.5) using Euler’s method, given


that
𝒅𝒚
𝒅𝒙= 𝟐𝒙𝒚, 𝒚(𝟎) = 𝟏.

4. Use Eulers method to find 𝑦(0.1), 𝑦(0.2) given 𝑦 ′ = (𝑥3 + 𝑥𝑦2)𝑒−𝑥, 𝑦(0) = 1
MODIFIED EULER’S METHOD FOR SOLVING FIRST ORDER ORDINARY DIFFERENTIAL
EQUATION

Euler’s method is a single step method and it gives approximate solutions and
no improvement is possible in the method.

Here we study Modified Euler’s method which improves the solution of Euler’s
method.
𝑑𝑦
𝑑𝑥 0 0
The given differential equation is ……….…(1)

Procedure for finding 𝒚𝟏:

To find 𝒚(𝒙𝟏 ) = 𝒚𝒚𝟏(𝟎(),where


approximations (𝟏) (𝟐𝒙) 𝟏 =(𝟑𝒙
) 𝟎 + 𝒉), first we find the successive
𝟏 𝒚 𝟏 , 𝒚 𝟏, 𝒚 ,𝟏 … .. of 𝒚 𝟏 using the following
formula.
𝒚(𝟎)
𝟏 = 𝒚 𝟎 + 𝒉. 𝒇(𝒙 𝟎, 𝒚 𝟎)

𝒉 (𝟎)
𝒚(𝟏)
𝟏 = 𝒚 𝟎 𝟎 𝟎 𝟏
𝟐 [𝒇( 𝒙 , 𝒚 ) + 𝒇 (𝒙 , 𝒚 𝟏
+
)]
𝒉 (𝟏)
𝒚(𝟏𝟐 ) = 𝒚 𝟎 𝟎 𝟎 𝟏
+𝟐 [𝒇(𝒙 , 𝒚 ) + 𝒇 (𝒙 , 𝒚 𝟏 )]

𝒚(𝟏𝟑 ) = 𝒚 𝟎 +𝟐𝒉 [𝒇(𝒙 𝟎 , 𝒚 𝟎) + 𝒇 (𝒙 ,𝟏 𝒚 ( 𝟐𝟏) )] and so


on
for 𝒏 = 𝟏, 𝟐, 𝟑,
In general 𝒚 (𝟏𝒏 ) = 𝒚 𝟎 +𝟐𝒉 [𝒇(𝒙 𝟎, 𝒚 𝟎) + 𝒇 (𝒙 ,𝟏 𝒚(𝒏𝟏− 𝟏))]
….
We stop the iteration if two successive approximations of 𝒚𝟏 are sufficiently close

to one another and we take the common value as 𝒚𝟏.

Procedure for finding 𝒚𝟐:

To find 𝒚(𝒙𝟐 ) = 𝒚𝟐 (where 𝒙𝟐 = 𝒙𝟏 + 𝒉) first we find the successive


approximations 𝒚(𝟐𝟎), 𝒚(𝟏𝟐), 𝒚(𝟐)𝟐, 𝒚(𝟑),𝟐 … .. of 𝒚 𝟐 using the following
formula.
𝒚(𝟐𝟎 ) = 𝒚 𝟏 + 𝒉. 𝒇(𝒙 𝟏, 𝒚 𝟏)

𝒉 (𝟎)
(𝟐𝟏 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]

𝒉 (𝟏)
(𝟐𝟐 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]

𝒚(𝟐𝟑 ) = 𝒚 𝟏 +𝟐𝒉 [𝒇(𝒙 𝟏 , 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 ( 𝟐𝟐) )] and so


on
for 𝒏 = 𝟏, 𝟐, 𝟑,
In general 𝒚 (𝟐𝒏 ) = 𝒚 𝟏 +𝟐𝒉 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚(𝒏𝟐− 𝟏))]
….
We stop the iteration if two successive approximations of 𝒚𝟐 are sufficiently close

to one another and we take the common value as 𝒚𝟐.

Similarly for finding 𝒚𝟑, 𝒚𝟒, 𝒆𝒕𝒄., we use same procedure by finding successive
approximations for each value.

Problems on Modified Euler’s Method

1. Find 𝒚(𝟎. 𝟏) 𝒂𝒏𝒅 𝒚(𝟎. 𝟐) using Modifed Euler’s Method given that
𝒅𝒚
𝒅 𝒙 = 𝒙𝟐 − 𝒚, 𝒚(𝟎) = 𝟏.

𝑺𝒐𝒍: The given D.E is 𝒅𝒚𝒅𝒙= 𝒙𝟐 − 𝒚, 𝒚(𝟎) = 𝟏

Here 𝒇(𝒙, 𝒚) = 𝒙𝟐 − 𝒚, 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏.

We were asked to find 𝒚(𝟎. 𝟏), 𝒚(𝟎. 𝟐)


Since the value of ′ 𝒉′ is not given, we take the least value among 0.1 and 0.2
as 𝒙𝟏
∴ 𝒙𝟏 = 𝟎. 𝟏 (Least value of 0.1 and 0.2)
Now 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟎. 𝟏 − 𝟎 = 𝟎. 𝟏 and 𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟏 + 𝟎. 𝟏 = 𝟎. 𝟐
To find 𝒚(𝟎. 𝟏) = 𝒚(𝒙𝟏 ) = 𝒚𝟏, we find the successive approximations for 𝒚𝟏

By Modified Eulers Formula

𝒚(𝟎)
𝟏 = 𝒚 𝟎 + 𝒉. 𝒇(𝒙 𝟎, 𝒚 𝟎)

= 𝒚𝟎 + 𝒉(𝒙𝟐 𝟎− 𝒚 𝟎 )

𝟎. 𝟗
= 𝟏 + 𝟎. 𝟏(𝟎 − 𝟏)
= 𝒉
(𝟏 ) (𝟎)
𝒚𝟏 = 𝒚 𝟎 𝟎 𝟎 𝟏
𝟐 [𝒇( 𝒙 , 𝒚 ) + 𝒇 (𝒙 , 𝒚 𝟏
+
)]
𝒉
= 𝒚𝟎 + 𝟐 [ (𝒙𝟎 𝟐− 𝒚 𝟎 ) + (𝒙 𝟏 𝟐− 𝒚𝟏 (𝟎) )]

𝟎.𝟏
=𝟏+ 𝟐 [(𝟎 − 𝟏) + ((𝟎. 𝟏)𝟐 − 𝟎. 𝟗)]

= 𝟏 + 𝟎𝟐.𝟏 [−𝟏 − 𝟎. 𝟖𝟗] = 𝟎. 𝟗𝟎𝟓

𝒉 (𝟏)
(𝟏𝟐 ) 𝟎
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟎, 𝒚 𝟎) + 𝒇 (𝒙 ,𝟏 𝒚 𝟏 )]

𝒉
= 𝒚𝟎 + 𝟐 [ (𝒙𝟎 𝟐− 𝒚 𝟎 ) + (𝒙 𝟏 𝟐− 𝒚𝟏 (𝟏) )]

𝟎.𝟏
=𝟏+ 𝟐 [(𝟎 − 𝟏) + ((𝟎. 𝟏)𝟐 − 𝟎. 𝟗𝟎𝟓)]

= 𝟏 + 𝟎𝟐.𝟏 [−𝟏 − 𝟎. 𝟖𝟗𝟓] = 𝟎. 𝟗𝟎𝟓

Since 𝒚(𝟏), 𝒚(𝟐 ) coincide with each other we stop the iteration process here and we
𝟏 𝟏

take 𝒚 𝟏 = 𝒚(𝟏𝟐 ) = 𝟎. 𝟗𝟎𝟓

∴ 𝒚𝟏 = 𝒚(𝟎. 𝟏) = 𝟎. 𝟗𝟎𝟓
To find 𝒚(𝟎. 𝟐) = 𝒚(𝒙𝟐 ) = 𝒚𝟐 we find the successive approximations for 𝒚𝟐

(Note:𝒙𝟏 = 𝟎. 𝟏, 𝒚𝟏 = 𝟎. 𝟗𝟎𝟓, 𝒙𝟐 = 𝟎. 𝟐, 𝒉 = 𝟎. 𝟏)

By Modified Eulers Formula


𝒚(𝟎)
𝟐 = 𝒚 𝟏 + 𝒉. 𝒇(𝒙 𝟏, 𝒚 𝟏)

= 𝒚𝟏 + 𝒉(𝒙𝟐 𝟏− 𝒚 𝟏 )

= 𝟎. 𝟗𝟎𝟓 + 𝟎. 𝟏[(𝟎. 𝟏)𝟐 − 𝟎. 𝟗𝟎𝟓]

𝟎. 𝟖𝟏𝟓𝟓
= 𝟎. 𝟗𝟎𝟓 + 𝟎. 𝟏[𝟎. 𝟎𝟏 − 𝟎. 𝟗𝟎𝟓] =
𝒉 (𝟎)
(𝟐𝟏 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]

𝒉
= 𝒚𝟏 + 𝟐 [(𝒙𝟏 𝟐− 𝒚 𝟏 ) + (𝒙 𝟐 −
𝟐
𝒚𝟐 (𝟎) )

𝟎.𝟏
= 𝟎. 𝟗𝟎𝟓 + 𝟐 [((𝟎. 𝟏)𝟐 − 𝟎. 𝟗𝟎𝟓) + ((𝟎. 𝟐)𝟐 − 𝟎. 𝟖𝟏𝟓𝟓)]

𝟎.𝟏
= 𝟎. 𝟗𝟎𝟓 + 𝟐 [−𝟎. 𝟖𝟗𝟓 − 𝟎. 𝟕𝟕𝟓] = 𝟎. 𝟖𝟐𝟏𝟒

𝒉 (𝟏)
(𝟐𝟐 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]

𝒉
= 𝒚𝟏 + 𝟐 [(𝒙𝟏 𝟐− 𝒚 𝟏 ) + (𝒙 𝟐 −
𝟐
𝒚𝟐 (𝟏) )

𝟎.𝟏
= 𝟎. 𝟗𝟎𝟓 + 𝟐 [((𝟎. 𝟏)𝟐 − 𝟎. 𝟗𝟎𝟓) + ((𝟎. 𝟐)𝟐 − 𝟎. 𝟖𝟐𝟏𝟒)]

𝟎.𝟏
= 𝟎. 𝟗𝟎𝟓 + 𝟐 [−𝟎. 𝟖𝟗𝟓 − 𝟎. 𝟕𝟖𝟏] = 𝟎. 𝟖𝟐𝟏𝟏

Since 𝒚(𝟏), 𝒚(𝟐) coincide with each other we stop the iteration process here and we
𝟐 𝟐

take 𝒚 𝟐 = 𝒚(𝟐𝟐 ) = 𝟎. 𝟖𝟐𝟏𝟏


∴ 𝒚𝟐 = 𝒚(𝟎. 𝟐) = 𝟎. 𝟖𝟐𝟏

2. Given 𝒚 ′ = −𝒙𝒚𝟐, 𝒚(𝟎) = 𝟐. Compute 𝒚(𝟎. 𝟐) in steps of 0.1 using Modified


Eulers method.

Sol:- The given problem is 𝒚 ′ = −𝒙𝒚𝟐, 𝒚 (𝟎 ) = 𝟐

Here 𝒇(𝒙, 𝒚) = −𝒙𝒚𝟐, 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟐. Given that the step size 𝒉 = 𝟎. 𝟏

Now 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟎 + 𝟎. 𝟏 = 𝟎. 𝟏 𝒂𝒏𝒅 𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟏 + 𝟎. 𝟏 =

𝟎. 𝟐 We were asked to find 𝒚(𝟎. 𝟐) 𝒊. 𝒆. , 𝒚(𝒙 𝟐 ) = 𝒚𝟐

To find 𝒚𝟐, we have to first find 𝒚𝟏

To
𝒚(𝟏𝟎 )find
= 𝒚 𝒚𝟎𝟏 =
+𝒚𝒉(.𝒙𝒇𝟏()𝒙= 𝒚(𝟎. 𝟏) we find the successive approximations for 𝒚𝟏
𝟎, 𝒚 𝟎)

By Modified
= 𝒚𝟎 + 𝒉Eulers
(−𝒙𝟎𝒚𝟐Formula
)𝟎

= 𝟐 + 𝟎. 𝟏[(−𝟎)(𝟐)𝟐] = 𝟐 + 𝟎 = 𝟐

𝒉 (𝟎)
𝒚(𝟏𝟏 ) = 𝒚 + [𝒇 ( 𝒙 𝟎, 𝒚 𝟎 ) + 𝒇 (𝒙𝟏 , 𝒚𝟏
𝟎
𝟐
)]
𝒉
= 𝒚𝟎 + 𝟐 [ (−𝒙𝟎 𝒚𝟎 )𝟐 + ((−𝒙𝟏(𝒚𝟏 (𝟎) )𝟐 )]

= 𝟐 + 𝟎𝟐.𝟏 [(𝟎) + (−𝟎. 𝟏)(𝟐)𝟐]

= 𝟐 + 𝟎𝟐.𝟏 [𝟎 − 𝟎. 𝟒] = 𝟏. 𝟗𝟖𝟎

𝒚(𝟏𝟐 ) = 𝒚 𝟎 +𝟐𝒉 [𝒇(𝒙 𝟎, 𝒚 )𝟎 + 𝒇 ( 𝒙 ,𝟏𝒚 ( 𝟏 )𝟏)]


𝒉
= 𝒚𝟎 + 𝟐 [ (−𝒙𝟎 𝒚𝟎 )𝟐 + ((−𝒙𝟏(𝒚𝟏 (𝟏 ) )𝟐 )]
= 𝟐 + 𝟎𝟐.𝟏 [(𝟎) + (−𝟎. 𝟏)(𝟏. 𝟗𝟖)𝟐]

= 𝟐 + 𝟎𝟐.𝟏 [𝟎 − 𝟎. 𝟑𝟗𝟐] = 𝟏. 𝟗𝟖𝟎𝟑

Since 𝒚(𝟏), 𝒚(𝟐 ) coincide with each other we stop the iteration process here and we
𝟏 𝟏

take 𝒚 𝟏 = 𝒚𝟏(𝟐 ) = 𝟏. 𝟗𝟖𝟎𝟑 𝒚𝟏 = 𝒚(𝟎. 𝟏) = 𝟏. 𝟗𝟖𝟎𝟑



To find 𝒚(𝟎. 𝟐) = 𝒚(𝒙𝟐 ) = 𝒚𝟐 we find the successive approximations for 𝒚𝟐

(Note:𝒙𝟏 = 𝟎. 𝟏, 𝒚𝟏 = 𝟏. 𝟗𝟖𝟎𝟑, 𝒙𝟐 = 𝟎. 𝟐, 𝒉 = 𝟎. 𝟏)

By Modified Eulers Formula


𝒚(𝟎)
𝟐 = 𝒚 𝟏 + 𝒉. 𝒇(𝒙 𝟏, 𝒚 𝟏)

= 𝒚𝟏 + 𝒉(−𝒙𝟏𝒚𝟐)𝟏

= 𝟏. 𝟗𝟖𝟎𝟑 + 𝟎. 𝟏[[(−𝟎. 𝟏)(𝟏. 𝟗𝟖𝟎𝟑)𝟐]

= 𝟏. 𝟗𝟖𝟎𝟑 + 𝟎. 𝟏[−𝟎. 𝟑𝟗𝟐] = 𝟏. 𝟗𝟒𝟏𝟎


𝒉 (𝟎)
(𝟐𝟏 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]

𝒉
= 𝒚𝟏 + 𝟐 [ (−𝒙𝟏 𝒚𝟏 )𝟐 + ((−𝒙𝟐(𝒚𝟐 (𝟎 ) )𝟐 )]

𝟎.𝟏
= 𝟏. 𝟗𝟖𝟎𝟑 + 𝟐 [(−𝟎. 𝟑𝟗𝟐𝟏) + (−𝟎. 𝟐)(𝟏. 𝟗𝟒𝟏𝟎)𝟐]

𝟎.𝟏
= 𝟏. 𝟗𝟖𝟎𝟑 + 𝟐 [−𝟎. 𝟑𝟗𝟐𝟏 − 𝟎. 𝟕𝟓𝟑𝟒] = 𝟏. 𝟗𝟐𝟑𝟎

𝒉 (𝟏)
𝒚(𝟐𝟐 ) = 𝒚 𝟏 𝟏 𝟏 𝟐
𝟐 [𝒇( 𝒙 , 𝒚 ) + 𝒇 (𝒙 , 𝒚 𝟐
+
)]
𝒉
= 𝒚𝟏 + 𝟐 [ (−𝒙𝟏 𝒚𝟏 )𝟐 + ((−𝒙𝟐(𝒚𝟐 (𝟏) )𝟐 )]
𝟎.𝟏
= 𝟏. 𝟗𝟖𝟎𝟑 + 𝟐 [(−𝟎. 𝟑𝟗𝟐𝟏) + (−𝟎. 𝟐)(𝟏. 𝟗𝟐𝟑𝟎)𝟐]

𝟎.𝟏
= 𝟏. 𝟗𝟖 + 𝟐 [−𝟎. 𝟑𝟗𝟐𝟏 − 𝟎. 𝟕𝟑𝟕] = 𝟏. 𝟗𝟐37

Since 𝒚(𝟏), 𝒚(𝟐 ) coincide with each other we stop the iteration process here and we
𝟐 𝟐

take 𝒚 𝟐 = 𝒚(𝟐𝟐 ) = 𝟏. 𝟗𝟐37

∴ 𝒚𝟐 = 𝒚(𝟎. 𝟐 ) = 𝟏. 𝟗𝟐𝟑𝟕

3. Using Euler’s modified method find 𝒚(𝟎. 𝟐) and 𝒚(𝟎. 𝟒).

Given that 𝒚 ′ = 𝒙 + 𝐬𝐢𝐧 𝒚 , 𝒚(𝟎) = 𝟏.

Solution:

Given 𝒇(𝒙, 𝒚) = 𝒙 + 𝐬𝐢𝐧 𝒚 , 𝒚(𝟎) = 𝟏

𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏

𝒙𝟏 = 𝟎. 𝟐 and 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟎. 𝟐 − 𝟎 =
𝟎. 𝟐

𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟐 + 𝟎. 𝟐 = 𝟎. 𝟒

We were asked to find 𝒚(𝟎. 𝟐) and 𝒚(𝟎. 𝟒) 𝒊. 𝒆. , 𝒚(𝒙𝟏 ) and 𝒚(𝒙𝟐 )

To find 𝒚(𝒙𝟏 ) = 𝒚𝟏

(𝟎 )
𝒙𝒚 𝟎𝟏==𝟎 𝒚𝒚𝟎𝟎=+𝟏𝒉𝒇(𝒙 ,𝟎 𝒚 )𝟎= 𝟏 + (𝟎. 𝟐)(𝟎. 𝟖𝟒𝟏𝟓)
= 𝟏 + 𝟎. 𝟏𝟔𝟖𝟐 = 𝟏. 𝟏𝟔𝟖𝟐
𝒇(𝒙𝟎, 𝒚 𝟎 ) = 𝟎. 𝟖𝟒𝟏𝟓 𝒉 ( 𝟎)
=𝒚
(𝟏 ) 𝟎 + 𝟐 {𝒇(𝒙𝟎, 𝒚 𝟎 ) + 𝒇 (𝒙𝟏, 𝒚𝟏
𝒚𝟏
)}
= 𝟏 + (𝟎𝟐.𝟐 ) {𝟎. 𝟖𝟒𝟏𝟒 + 𝟎. 𝟐 + 𝐬𝐢𝐧(𝟏. 𝟏𝟔𝟖𝟑)}

𝟎.𝟐
= 𝟏 + ( 𝟐 ){𝟎. 𝟖𝟒𝟏𝟒 + 𝟏. 𝟏𝟐𝟎𝟎}

= 𝟏. 𝟏𝟗𝟔𝟏𝟒

𝐡 (𝟏)
(𝟐 )
𝐲𝟏 =𝐲 𝟎 𝟎 𝟎 𝟏
+ 𝟐 {𝐟( 𝐱 , 𝐲 ) + 𝐟( 𝐱 , 𝐲𝟏

)}
= 𝟏 + (𝟎. 𝟏){𝟎. 𝟖𝟒𝟏𝟒 + 𝟎. 𝟐 + 𝐬𝐢𝐧(𝟏. 𝟏𝟗𝟔𝟏𝟒)}

=1.1972
𝐡 (𝟐)
𝐲(𝟏𝟑) =𝐲 𝟎 𝟎 𝟎 𝟏
+ 𝟐 {𝐟( 𝐱 , 𝐲 ) + 𝐟( 𝐱 , 𝐲𝟏
)}
= 𝟏 + (𝟎. 𝟏){𝟎. 𝟖𝟒𝟏𝟒 + 𝟎. 𝟐 + 𝐬𝐢𝐧(𝟏. 𝟏𝟗𝟕𝟐)}

= 𝟏. 𝟏𝟗𝟕𝟐

Since 𝒚(𝟐), 𝒚(𝟑 ) coincide with each other we stop the iteration process here and we
𝟏 𝟏
(𝟑)
take 𝒚 𝟏 = 𝒚 𝟏 = 𝟏. 𝟏𝟗𝟕𝟐

To find 𝒚𝟐:

Here, 𝒙𝟏 = 𝟎. 𝟐, 𝒚𝟏 = 𝟏. 𝟏𝟗𝟕𝟐, 𝒙𝟐 = 𝟎. 𝟒, 𝒉 = 𝟎. 𝟐

𝒇(𝒙𝟏, 𝒚 𝟏 ) = 𝒙𝟏 + 𝐬𝐢𝐧 𝒚𝟏 = 𝟏. 𝟏𝟑𝟏𝟎

𝒚 (𝟐𝟎) = 𝒚 𝟏 + 𝒉𝒇(𝒙 𝟏, 𝒚 𝟏) = 𝟏. 𝟏𝟗𝟕𝟐 + (𝟎. 𝟐)(𝟏. 𝟏𝟑𝟏𝟎) = 𝟏. 𝟒𝟐𝟑𝟒

𝒚(𝟐𝟎) = 𝟏. 𝟒𝟐𝟑𝟒
𝒉 (𝟎)
=𝒚
(𝟏 ) 𝟏 + 𝟐 {𝒇(𝒙𝟏, 𝒚 𝟏 ) + 𝒇(𝒙𝟐, 𝒚𝟐
𝒚𝟐
)}
= 𝟏. 𝟏𝟗𝟕𝟐 + (𝟎. 𝟏){𝟏. 𝟏𝟑𝟏𝟎 + 𝒙 𝟐 + 𝐬𝐢𝐧 𝒚(𝟎)𝟐}

= 𝟏. 𝟏𝟗𝟕𝟐 + (𝟎. 𝟏){𝟏. 𝟏𝟑𝟏𝟎 + 𝟎. 𝟒 + 𝟎. 𝟗𝟖𝟗𝟏}

= 𝟏. 𝟒𝟒𝟗𝟐
𝒉 ( 𝟏)
=𝒚
𝟏 + 𝟐 {𝒇(𝒙𝟏, 𝒚 𝟏 ) + 𝒇 (𝒙𝟐, 𝒚𝟐
𝒚 (𝟐𝟐)
)}
= 𝟏. 𝟏𝟗𝟕𝟐 + (𝟎. 𝟏) {𝟏. 𝟏𝟑𝟏𝟎 + 𝒙 𝟐 + 𝐬𝐢𝐧 𝒚(𝟏)𝟐}

= 𝟏. 𝟒𝟒𝟗𝟔

Since 𝒚(𝟏), 𝒚(𝟐 ) coincide with each other we stop the iteration process here and we
𝟐 𝟐

take 𝒚 𝟐 = 𝒚(𝟐𝟐 ) = 𝟏. 𝟒𝟒𝟗𝟔

∴ 𝒚𝟐 = 𝒚(𝒙𝟐 ) = 𝒚(𝟎. 𝟒) = 𝟏. 𝟒𝟒𝟗𝟔.

4) Using Euler’s modified method find 𝒚(𝟎. 𝟐) and 𝒚(𝟎.

𝟒). Given that 𝒚 ′ = 𝒚 + 𝒆𝒙, 𝒚(𝟎) = 𝟎.

Sol : Given that 𝒚 ′ = 𝒚 + 𝒆𝒙, 𝒚(𝟎) = 𝟎

Here 𝒇(𝒙, 𝒚) = 𝒚 + 𝒆𝒙, 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟎

Let 𝒙𝟏 = 𝟎. 𝟐 and 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟎. 𝟐 − 𝟎 = 𝟎. 𝟐

𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟒

To find 𝐲𝟏:

𝐱𝟎 = 𝟎, 𝐲𝟎 = 𝟎
𝐲(𝟏𝟎) =𝐲 𝟏 = 𝐲𝟎 + 𝐡𝐟(𝐱𝟎, 𝐲𝟎) = 𝟎. 𝟐
𝐟(𝐱 , 𝐲 ) = 𝐞𝐱𝟎 + 𝐲 = 𝐞𝟎 + 𝟎 = 𝟏
𝒉 (𝟎)
(𝟏 ) 𝟎 𝟎 𝟎 𝟏
𝒚𝟏 = 𝒚 + 𝟐 {𝒇( 𝒙 , 𝒚 ) + 𝒇 ( 𝒙 , 𝒚𝟏
)}
= 𝟎 + (𝟎.𝟐 ){𝟏 + 𝒆𝒙𝟏 + 𝒚(𝟎)
𝟏 }
𝟐

= (𝟎. 𝟏){𝟏 + 𝒆𝟎𝟐. + 𝟎. 𝟐𝟎𝟎𝟎}


= 𝟎. 𝟐𝟒𝟐𝟏

𝒉 (𝟏)
(𝟐 )
𝒚𝟏 = 𝒚 𝟎 + 𝟐 {𝒇( 𝒙 𝟎, 𝒚 𝟎 ) + 𝒇 ( 𝒙𝟏 , 𝒚𝟏
)}
= 𝟎 + (𝟎.𝟐 ){𝟏 + 𝒆𝒙𝟏 + 𝒚(𝟏) 𝟏 }
𝟐

= (𝟎. 𝟏){𝟏 + 𝒆𝟎𝟐. + 𝟎. 𝟐𝟒𝟐𝟏}


= 𝟎. 𝟐𝟒𝟔𝟒

𝒉 (𝟐)
(𝟑 ) 𝟎 𝟎 𝟎 𝟏
𝒚𝟏 = 𝒚 + 𝟐 {𝒇( 𝒙 , 𝒚 ) + 𝒇 ( 𝒙 , 𝒚𝟏
)}
= 𝟎 + (𝟎.𝟐 ){𝟏 + 𝒆𝒙𝟏 + 𝒚(𝟐)
𝟏 }
𝟐

= (𝟎. 𝟏){𝟏 + 𝒆𝟎𝟐. + 𝟎. 𝟐𝟒𝟔𝟒}


= 𝟎. 𝟐𝟒𝟔𝟖

𝒉 (𝟑)
(𝟒 ) 𝟎 𝟎 𝟎 𝟏
𝒚𝟏 = 𝒚 + 𝟐 {𝒇( 𝒙 , 𝒚 ) + 𝒇 ( 𝒙 , 𝒚𝟏
)}
= 𝟎 + (𝟎.𝟐 ){𝟏 + 𝒆𝒙𝟏 + 𝒚(𝟑)
𝟏 }
𝟐

= (𝟎. 𝟏){𝟏 + 𝒆𝟎𝟐. + 𝟎. 𝟐𝟒𝟔𝟖}


= 𝟎. 𝟐𝟒𝟔𝟖
Since 𝒚(𝟑), 𝒚(𝟒) coincide with each other we stop the iteration process here and we
𝟏 𝟏

take 𝒚 𝟏 = 𝒚(𝟏𝟒 ) = 𝟎. 𝟐𝟒𝟔𝟖

To find 𝒚𝟐:

Here 𝒙𝟏 = 𝟎. 𝟐, 𝒚𝟏 = 𝟎. 𝟐𝟒𝟔𝟖

𝒇(𝒙𝟏, 𝒚 𝟏 ) = 𝒆𝒙𝟏 + 𝒚𝟏 = 𝒆𝟎𝟐. + 𝟎. 𝟐𝟒𝟔𝟖 = 𝟏. 𝟒𝟔𝟖𝟐


(𝟎 )
𝒚 𝟐 = 𝒚 𝟏 + 𝒉𝒇(𝒙 ,𝟏𝒚 )𝟏

= 𝟎. 𝟐𝟒𝟔𝟖 + (𝟎. 𝟐)(𝟏. 𝟒𝟔𝟖𝟐) = 𝟎. 𝟓𝟒𝟎𝟒


𝒉 ( 𝟎)
=𝒚
𝟏 + 𝟐 {𝒇(𝒙𝟏, 𝒚 𝟏 ) + 𝒇 (𝒙𝟐, 𝒚𝟐
𝒚 (𝟐𝟏)
)}
= 𝟎. 𝟐𝟒𝟔𝟖 + ( 𝟎.𝟐 ) {𝟏. 𝟒𝟔𝟖𝟐 + 𝒆𝒙𝟐 + 𝒚(𝟎)
𝟐 }
𝟐

= 𝟎. 𝟐𝟒𝟔𝟖 + (𝟎. 𝟏){𝟏. 𝟒𝟔𝟖𝟐 + 𝒆𝟎𝟒. + 𝟎. 𝟓𝟒𝟎𝟒}


= 𝟎. 𝟓𝟗𝟔𝟖

𝒉 (𝟏)
(𝟐 )
𝒚𝟐 = 𝒚 + 𝟐 {𝒇( 𝒙 𝟏, 𝒚 𝟏 ) + 𝒇 ( 𝒙𝟐 , 𝒚𝟐
𝟏

)}
= 𝟎. 𝟐𝟒𝟔𝟖 + ( 𝟎.𝟐 ){𝟏. 𝟒𝟔𝟖𝟐 + 𝒆 𝒙𝟐 + 𝒚(𝟏)
𝟐 }
𝟐

= 𝟎. 𝟐𝟒𝟔𝟖 + (𝟎. 𝟏){𝟏. 𝟒𝟔𝟖𝟐 + 𝒆𝟎𝟒. + 𝟎. 𝟓𝟗𝟔𝟖}


= 𝟎. 𝟔𝟎𝟐𝟓
𝒉 ( 𝟐)
=𝒚
(𝟑 ) 𝟏 + 𝟐 {𝒇(𝒙𝟏, 𝒚 𝟏 ) + 𝒇 (𝒙𝟐, 𝒚𝟐
𝒚𝟐
= 𝟎.)}
𝟐𝟒𝟔𝟖 + ( 𝟎.𝟐 ){𝟏. 𝟒𝟔𝟖𝟐 + 𝒆 𝒙𝟐 + 𝒚(𝟐)
𝟐
}
𝟐
= 𝟎. 𝟐𝟒𝟔𝟖 + (𝟎. 𝟏){𝟏. 𝟒𝟔𝟖𝟐 + 𝒆𝟎𝟒. + 𝟎. 𝟔𝟎𝟐𝟓}

= 𝟎. 𝟔𝟎𝟑𝟏
𝒉 ( 𝟑)
=𝒚
(𝟒 ) 𝟏 + 𝟐 {𝒇(𝒙𝟏, 𝒚 𝟏 ) + 𝒇 (𝒙𝟐, 𝒚𝟐
𝒚𝟐
)}
= 𝟎. 𝟐𝟒𝟔𝟖 + ( 𝟎.𝟐 ) {𝟏. 𝟒𝟔𝟖𝟐 + 𝒆𝒙𝟐 + 𝒚(𝟑)
𝟐 }
𝟐

= 𝟎. 𝟐𝟒𝟔𝟖 + (𝟎. 𝟏){𝟏. 𝟒𝟔𝟖𝟐 + 𝒆𝟎𝟒. + 𝟎. 𝟔𝟎𝟑𝟏}


= 𝟎. 𝟔𝟎𝟑𝟏

Since 𝒚(𝟑), 𝒚(𝟒 ) coincide with each other we stop the iteration process here and we
𝟐 𝟐

take 𝒚 𝟐 = 𝒚(𝟐𝟒 ) = 𝟎. 𝟔𝟎𝟑𝟏

Home work Problems

1. Find y(0.1) and y(0.2) using Euler’s modified method, given


that
𝒅𝒚
𝒅 𝒙 = 𝒙 − 𝒚, 𝒚(𝟎) = 𝟏.

2. Find y(0.02) and y(0.04) using Euler’s modified method, given


that
𝒅𝒚 𝒚−𝒙
𝒅 𝒙 = 𝒚+𝒙, 𝒚(𝟎) = 𝟏.

3. Find y(0.1) and y(0.2) using Euler’s modified method, given


that
𝒅𝒚
𝒅 𝒙 = 𝟏 − 𝒚, 𝒚(𝟎 ) = 𝟎.
SECOND ORDER RUNGE-KUTTA
METHOD

The given first order differential equation is


𝒅𝒚
= 𝒇(𝒙, 𝒚),
𝒅𝒙 𝒚(𝒙𝟎 ) = 𝒚𝟎

We find 𝒚(𝒙𝟏), 𝒚(𝒙𝟐), 𝒚(𝒙𝟑), … … i.e., 𝒚𝟏, 𝒚𝟐, 𝒚𝟑, … etc, by using

Runge-Kutta Method of Second order as

follows. Finding 𝒚𝟏:

The second order Runge-Kutta formula to find


𝒚𝟏 is as follows:

𝒚𝟏 = 𝒚𝟎 + [𝟏𝒌𝟏 + 𝒌𝟐]
𝟐

𝒘𝒉𝒆𝒓𝒆 𝒌𝟏 = 𝒉 𝒇(𝒙𝟎, 𝒚 𝟎 ) 𝒂𝒏𝒅 𝒌𝟐 = 𝒉 𝒇(𝒙𝟏, 𝒚𝟎 + 𝒌 𝟏 )

Finding 𝒚𝟐:

The second order Runge-Kutta formula to find


𝒚𝟐 is as follows:

𝒚𝟐 = 𝒚𝟏 + [𝟏𝒌𝟏 + 𝒌𝟐]
𝟐

𝒘𝒉𝒆𝒓𝒆 𝒌𝟏 = 𝒉 𝒇(𝒙𝟏, 𝒚 𝟏 ) 𝒂𝒏𝒅 𝒌𝟐 = 𝒉 𝒇(𝒙𝟐, 𝒚𝟏 + 𝒌 𝟏 )

Finding 𝒚𝟑:

The second order Runge-Kutta formula to find


𝒚𝟑 is as follows:

𝒚𝟑 = 𝒚𝟐 + [𝟏𝒌𝟏 + 𝒌𝟐]
𝟐
Finding 𝒚𝒏:

The second order Runge-Kutta formula to find 𝒚𝒏 is as follows:

+ 𝒌𝟏 )
𝒚 𝒏 = 𝒚𝒏 −𝟏 +𝟐 𝟏 [𝒌𝟏 + 𝒌𝟐 ] 𝒘𝒉𝒆𝒓𝒆 𝒌 𝟏 = 𝒉 𝒇(𝒙𝒏 −𝟏 𝒏 −𝟏) 𝒂𝒏𝒅 𝒌𝟐 = 𝒉 𝒇(𝒙𝒏, 𝒚𝒏−𝟏
,𝒚
Problems on R-K Method of 2nd Order

𝒅𝒚 𝒙+𝒚
1. Using Runge-Kutta method of second order, compute 𝒚(𝟐. 𝟓) from
𝒅𝒙 𝒙
,
=
𝒚(𝟐) = 𝟐, taking 𝒉 = 𝟎. 𝟐𝟓
𝒅𝒚
Sol: The given differential equation𝒅 𝒙 𝒙+𝒚
𝒙 , 𝒚( 𝟐 ) = 𝟐
is
𝒙+𝒚 = 𝟐, 𝒚 𝟎 = 𝟐
= 𝒇(𝒙, 𝒚) = 𝒙 , 𝒙 𝟎
Here
Given the step size 𝒉 = 𝟎. 𝟐𝟓
Now 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟐 + 𝟎. 𝟐𝟓 = 𝟐. 𝟐𝟓
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟐. 𝟐𝟓 + 𝟎. 𝟐𝟓 = 𝟐. 𝟓

We were asked to find 𝒚(𝟐. 𝟓), 𝒊. 𝒆. ,


Step Finding 𝒚𝟏:
1: 𝒚(𝒙𝟐 ) = 𝒚𝟐
By R-K Method of second
order

𝒚 𝟏 = 𝒚𝟎 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]-----------(1)

Where 𝒌𝟏 = 𝒉 𝒇(𝒙𝟎, 𝒚 𝟎 ) = 𝒉 𝒇(𝟐, 𝟐)


𝟐+𝟐
= 𝟎. 𝟐𝟓 ( ) = (𝟎. 𝟐𝟓)(𝟐) = 𝟎. 𝟓
𝟐

𝒌𝟐 = 𝒉 𝒇(𝒙𝟏, 𝒚𝟎 + 𝒌 𝟏 ) = 𝒉 𝒇(𝟐. 𝟐𝟓, 𝟐. 𝟓)

(Note:- 𝒙𝟏 = 𝟐. 𝟐𝟓 𝒂𝒏𝒅 𝒚𝟎 + 𝒌𝟏 = 𝟐 + 𝟎. 𝟓 = 𝟐. 𝟓)
𝟐.𝟐𝟓+𝟐.𝟓
= 𝟎. 𝟐𝟓 ( ) = 𝟎. 𝟓𝟐𝟕𝟕
𝟐.𝟐𝟓
∴ 𝑭 𝒓 𝒐 𝒎 (𝟏 ) 𝒚𝟏 = 𝒚(𝟐. 𝟐𝟓) = 𝒚 𝟎 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]
𝟏
= 𝟐 + (𝟎. 𝟓 + 𝟎. 𝟓𝟐𝟕𝟕) 𝟐. 𝟓𝟏𝟑𝟖
𝟐
=
Step 2: Finding 𝒚𝟐:
By R-K Method of second
order
𝒚 𝟐 = 𝒚𝟏 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]-----------(2)

Where 𝒌𝟏 = 𝒉 𝒇(𝒙𝟏, 𝒚 𝟏 ) = 𝒉 𝒇(𝟐. 𝟐𝟓, 𝟐. 𝟓𝟏𝟑𝟖)


𝟐.𝟐𝟓+𝟐.𝟓𝟏𝟑𝟖
= 𝟎. 𝟐𝟓 ( 𝟐.𝟐𝟓
) = 𝟎. 𝟓𝟐𝟗𝟑

𝒌𝟐 = 𝒉 𝒇(𝒙𝟐, 𝒚𝟏 + 𝒌 𝟏 ) = 𝒉 𝒇(𝟐. 𝟓, 𝟑. 𝟎𝟒𝟑𝟏)

(Note:- 𝒙𝟐 = 𝟐. 𝟓 𝒂𝒏𝒅 𝒚𝟏 + 𝒌𝟏 = 𝟐. 𝟓𝟏𝟑𝟖 + 𝟎. 𝟓𝟐𝟗𝟑 = 𝟑. 𝟎𝟒𝟑𝟏)


𝟐.𝟓+𝟑.𝟎𝟒𝟑𝟏
= 𝟎. 𝟐𝟓 ( ) = 𝟎. 𝟓𝟓𝟒𝟑
𝟐.𝟓

∴ 𝑭 𝒓 𝒐 𝒎 (𝟐 ) 𝒚𝟐 = 𝒚(𝟐. 𝟓) = 𝒚 𝟏 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]


𝟏
= 𝟐. 𝟓𝟏𝟑𝟖 + 𝟐
[𝟎. 𝟓𝟐𝟗𝟑 + 𝟎. 𝟓𝟓𝟒𝟑]

= 𝟑. 𝟎𝟓𝟓𝟔

2. Given that 𝒚 ′ = 𝒚 − 𝒙, 𝒚(𝟎) = 𝟐. Find 𝒚(𝟎. 𝟐) using R-K method of

second order by taking 𝒉 = 𝟎. 𝟏.

Sol: : The given differential equation is 𝒚 ′ = 𝒚 − 𝒙, 𝒚(𝟎) = 𝟐


Here 𝒇(𝒙, 𝒚) = 𝒚 − 𝒙, 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟐
Given the step size 𝒉 = 𝟎. 𝟏
Now 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟎 + 𝟎. 𝟏 = 𝟎. 𝟏
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟏 + 𝟎. 𝟏 = 𝟎. 𝟐
We were asked to 𝒚(𝟎. 𝟐), 𝒊. 𝒆. , 𝒚(𝒙𝟐 ) = 𝒚𝟐
find
Step 1: Finding 𝒚𝟏:
By R-K Method of second
order
𝒚 𝟏 = 𝒚𝟎 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]-----------(1)

Where 𝒌𝟏 = 𝒉 𝒇(𝒙𝟎, 𝒚 𝟎 ) = 𝒉 𝒇(𝟎, 𝟐)

= (𝟎. 𝟏) (𝟐 − 𝟎) = (𝟎. 𝟏)(𝟐 ) = 𝟎. 𝟐

𝒌𝟐 = 𝒉 𝒇(𝒙𝟏, 𝒚𝟎 + 𝒌 𝟏 ) = 𝒉 𝒇(𝟎. 𝟏, 𝟐. 𝟐)

(Note:- 𝒙𝟏 = 𝟎. 𝟏 𝒂𝒏𝒅 𝒚𝟎 + 𝒌𝟏 = 𝟐 + 𝟎. 𝟐 = 𝟐. 𝟐)

= (𝟎. 𝟏)(𝟐. 𝟐 − 𝟎. 𝟏) = 𝟎. 𝟐𝟏
∴ 𝑭 𝒓 𝒐 𝒎 (𝟏 ) 𝒚𝟏 = 𝒚(𝟎. 𝟏) = 𝒚 𝟎+𝟐𝟏 [𝒌 𝟏+ 𝒌 ]
𝟐
𝟏
= 𝟐 + (𝟎. 𝟐 + 𝟎. 𝟐𝟏) 𝟐. 𝟐𝟎𝟓
𝟐
=
Step 2: Finding 𝒚𝟐:
By R-K Method of second
order
𝒚 𝟐 = 𝒚𝟏 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]-----------(2)

Where 𝒌𝟏 = 𝒉 𝒇(𝒙𝟏, 𝒚 𝟏 ) = 𝒉 𝒇(𝟎. 𝟏, 𝟐. 𝟐𝟎𝟓)

= (𝟎. 𝟏)(𝟐. 𝟐𝟎𝟓 − 𝟎. 𝟏) = 𝟎. 𝟐𝟏𝟎𝟓

𝒌𝟐 = 𝒉 𝒇(𝒙𝟐, 𝒚𝟏 + 𝒌 𝟏 ) = 𝒉 𝒇(𝟎. 𝟐, 𝟐.
𝟒𝟏𝟓𝟓)

𝟎. 𝟐𝟐𝟏𝟓𝟓
= (𝟎. 𝟏(Note:- 𝒙𝟐 =
)(𝟐. 𝟒𝟏𝟓𝟓 − 𝟎𝟎..𝟐𝟐)𝒂𝒏𝒅
= 𝒚𝟏 + 𝒌𝟏 = 𝟐.
𝟐𝟎𝟓 + 𝟎. 𝟐𝟏𝟎𝟓 = 𝟐. 𝟒𝟏𝟓𝟓)
∴ 𝑭 𝒓 𝒐 𝒎 (𝟐 ) 𝒚𝟐 = 𝒚(𝟐. 𝟓) = 𝒚 𝟏 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]
𝟏
= 𝟐. 𝟐𝟎𝟓 + [𝟎. 𝟐𝟏𝟎𝟓 + 𝟎. 𝟐𝟐𝟏𝟓𝟓]
𝟐

= 𝟐. 𝟒𝟐𝟏𝟎𝟐𝟓

FOURTH ORDER RUNGE-KUTTA METHOD

The given first order differential equation


is
𝒅𝒚
= 𝒇(𝒙, 𝒚),
𝒅𝒙 𝒚(𝒙𝟎 ) = 𝒚𝟎

We find 𝒚(𝒙𝟏), 𝒚(𝒙𝟐), 𝒚(𝒙𝟑), … … i.e., 𝒚𝟏, 𝒚𝟐, 𝒚𝟑, … etc, by using

Runge-Kutta Method of fourth order as

follows. Finding 𝒚𝟏:

The fourth order Runge-Kutta formula to find


𝒚𝟏 is as follows:

𝒚𝟏 = 𝒚𝟎 + [𝟏𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒]


𝟔
𝒉
𝒘𝒉𝒆𝒓𝒆 𝟐 𝟎 𝟎
𝒌𝟏 = 𝒉 𝒇(𝒙𝟎, 𝒚𝟎), 𝒌𝟐𝟏 𝟐
𝒌
𝒉 𝒌𝟐 𝒌 = 𝒉 𝒇(𝒙 + , 𝒚 + )
𝟑 = 𝒉 𝒇(𝒙𝟎 + 𝟐 , 𝒚𝟎 + 𝟐 ) 𝒌𝟒 = 𝒉 𝒇(𝒙𝟏, 𝒚𝟎 + 𝒌 𝟑 )

Finding 𝒚𝟐:

The fourth order Runge-Kutta formula to find 𝒚𝟐 is as follows:

𝒚𝟐 = 𝒚𝟏 + [𝟏𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒]


𝟔
𝒉
𝒘𝒉𝒆𝒓𝒆 𝟐 𝟏
𝟏
𝒌𝟏 = 𝒉 𝒇(𝒙𝟏, 𝒚𝟏), 𝒌𝟐𝟏 𝟐
𝒌
𝒉 𝒌𝟐 𝒌 = 𝒉 𝒇(𝒙 + , 𝒚 + )
𝟑 = 𝒉 𝒇(𝒙𝟏 + 𝟐 , 𝒚𝟏 + 𝟐 ) 𝒌𝟒 = 𝒉 𝒇(𝒙𝟐, 𝒚𝟏 + 𝒌 𝟑 )

In general for

Finding 𝒚𝒏:

The fourth order Runge-Kutta formula to find 𝒚 𝒏 is as follows:

𝟏
𝒚 𝒏 = 𝒚𝒏−𝟏 + [𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒]
𝟔
𝒉 𝒌𝟏
𝒘𝒉𝒆𝒓𝒆 𝒌 𝟐 = 𝒉 𝒇(𝒙 + )
𝒌𝟏 =𝒉 𝒇(𝒙 𝒏 −𝟏 , 𝒚 𝒏−𝟏 + 𝟐 , 𝒚𝒏−𝟏 𝟐
𝒏 −𝟏
), 𝒉 𝒌𝟐
𝒌 𝟑 = 𝒉 𝒇(𝒙 + ) 𝒌𝟒 = 𝒉 𝒇(𝒙𝒏, 𝒚𝒏−𝟏 + 𝒌 𝟑 )
𝒏−𝟏 + 𝟐 , 𝒚𝒏−𝟏 𝟐

Problems on R-K Method of 4th Order

1. Using Runge-Kutta method of fourth order find the value of 𝒚


(𝟏. 𝟐)

in steps of 0.1 given that 𝒚 ′ = 𝒙𝟐 + 𝒚𝟐, 𝒚(𝟏) = 𝟏. 𝟓


Sol: The given differential equation is

𝒚 ′ = 𝒙𝟐 + 𝒚𝟐, 𝒚(𝟏) = 𝟏. 𝟓

Here 𝒇(𝒙, 𝒚) = 𝒙𝟐 + 𝒚𝟐, 𝒙𝟎 = 𝟏, 𝒚𝟎 = 𝟏. 𝟓


Given the step size 𝒉 = 𝟎. 𝟏
Now 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟏 + 𝟎. 𝟏 = 𝟏. 𝟏
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟏. 𝟏 + 𝟎. 𝟏 = 𝟏. 𝟐

We were asked to find 𝒚(𝟏. 𝟐), 𝒊. 𝒆. , 𝒚(𝒙𝟐 ) = 𝒚𝟐


𝒚 𝟏 = 𝒚𝟎 +𝟔𝟏 [𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒 ]----------(1)

𝒘𝒉𝒆𝒓𝒆 𝒌𝟏 = 𝒉 𝒇(𝒙𝟎, 𝒚 𝟎 ) = 𝒉 𝒇(𝟏, 𝟏. 𝟓)

𝟎. 𝟑𝟐𝟓
= (𝟎. 𝟏)(𝟏𝟐 + 𝟏. 𝟓 𝟐 ) =

𝒌 𝟐 = 𝒉 𝒇 (𝒙𝟎 +𝟐𝒉 , 𝒚𝟎 + 𝟐𝒌 𝟏 ) = 𝒉 𝒇(𝟏. 𝟎𝟓, 𝟏. 𝟔𝟔𝟐𝟓)

𝒉 𝟎.𝟏 𝟎.𝟑𝟐𝟓
(Note: 𝒙𝟎 + 𝟐 = 𝟏 + 𝟐
= 𝟏. 𝟎𝟓, 𝒚𝟎 + 𝟐𝒌=
𝟏
𝟏. 𝟓 + 𝟐
= 𝟏. 𝟔𝟔𝟐𝟓)

= (𝟎. 𝟏)[ (𝟏. 𝟎𝟓)𝟐 + (𝟏. 𝟔𝟔𝟐𝟓)𝟐] = 𝟎. 𝟑𝟖𝟔𝟔


𝒉 𝒌𝟐
𝒌 𝟑 = 𝒉 𝒇 ( 𝒙𝟎 + 𝒚𝟎 + ) = 𝒉 𝒇(𝟏. 𝟎𝟓, 𝟏. 𝟔𝟗𝟑𝟑)
, 𝟐 𝟐
𝒉 𝟎.𝟏 𝟎.𝟑𝟖𝟔𝟔
(Note: 𝒙𝟎 + 𝟐 = 𝟏 + 𝟐
= 𝟏. 𝟎𝟓, 𝒚𝟎 + 𝟐𝒌=
𝟐
𝟏. 𝟓 + 𝟐
= 𝟏. 𝟔𝟗𝟑𝟑)

= (𝟎. 𝟏) [ (𝟏. 𝟎𝟓)𝟐 + (𝟏. 𝟔𝟗𝟑𝟑)𝟐] = 𝟎. 𝟑𝟗𝟔𝟗𝟖


𝒌𝟒 = 𝒉 𝒇(𝒙𝟏, 𝒚𝟎 + 𝒌 𝟑 ) = 𝒉 𝒇(𝟏. 𝟏, 𝟏. 𝟖𝟗𝟔𝟗)

(Note: 𝒙𝟏 = 𝟏. 𝟏, 𝒚𝟎 + 𝒌𝟑 = 𝟏. 𝟓 + 𝟎. 𝟑𝟗𝟔𝟗𝟖 = 𝟏. 𝟖𝟗𝟔𝟗)

= (𝟎. 𝟏) [ (𝟏. 𝟏)𝟐 + (𝟏. 𝟖𝟗𝟔𝟗)𝟐] = 𝟎. 𝟒𝟖𝟎𝟖


Now from (1) 𝒚𝟏 = 𝒚(𝟎. 𝟏) = 𝒚 𝟎 +𝟔𝟏 [𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒 ]
𝟏
= 𝟏. 𝟓 + (𝟎. 𝟑𝟐𝟓 + 𝟎. 𝟕𝟕𝟑𝟐 + 𝟎. 𝟕𝟗𝟑𝟗 + 𝟎. 𝟒𝟖𝟎𝟖)
𝟔

= 𝟏. 𝟖𝟗𝟓𝟓

Step 2:-Finding 𝒚𝟐:

The fourth order Runge-Kutta formula to find 𝒚𝟐 is as follows:

𝒚 𝟐 = 𝒚𝟏 +𝟔𝟏 [𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒 ]----------(2)


𝒘𝒉𝒆𝒓𝒆 𝒌𝟏 = 𝒉 𝒇(𝒙𝟏, 𝒚 𝟏 ) = 𝒉 𝒇(𝟏. 𝟏, 𝟏. 𝟖𝟗𝟓𝟓)

= (𝟎. 𝟏)[(𝟏. 𝟏)𝟐 + (𝟏. 𝟖𝟗𝟓𝟓)𝟐] = 𝟎. 𝟒𝟖𝟎𝟑

𝒌 𝟐 = 𝒉 𝒇 (𝒙𝟏 +𝟐𝒉 , 𝒚𝟏 + 𝟐𝒌 𝟏 ) = 𝒉 𝒇(𝟏. 𝟏𝟓, 𝟐. 𝟏𝟑𝟓𝟔𝟓)

𝒉 𝟎.𝟏 𝟎.𝟒𝟖𝟎𝟑
(Note: 𝒙𝟏 + 𝟐 = 𝟏. 𝟏 + 𝟐
= 𝟏. 𝟏𝟓, 𝒚𝟏 + 𝟐𝒌=
𝟏
𝟏. 𝟖𝟗𝟓𝟓 + 𝟐
= 𝟐. 𝟏𝟑𝟓𝟔𝟓)

= (𝟎. 𝟏)[ (𝟏. 𝟏𝟓)𝟐 + (𝟐. 𝟏𝟑𝟓𝟔𝟓)𝟐] = 𝟎. 𝟓𝟖𝟖𝟑𝟓


𝒉 𝒌
𝒌𝟑 = 𝒉 𝒇 (𝒙 𝟏 + , 𝒚𝟏 + ) 𝟐 = 𝒉 𝒇(𝟏. 𝟏𝟓, 𝟐.
𝟐 𝟐
𝟏𝟖𝟗𝟔𝟕𝟓)
𝒉 𝟎.𝟏 𝟎.𝟓𝟖𝟖𝟑𝟓
(Note: 𝒙𝟏 + 𝟐 = 𝟏 + 𝟐
= 𝟏. 𝟏𝟓, 𝒚𝟏 + 𝟐𝒌=
𝟐
𝟏. 𝟖𝟗𝟓𝟓 + 𝟐
= 𝟐. 𝟏𝟖𝟗𝟔𝟕𝟓)

= (𝟎. 𝟏) [ (𝟏. 𝟏𝟓)𝟐 + (𝟐. 𝟏𝟖𝟗𝟔𝟕𝟓)𝟐] = 𝟎. 𝟔𝟏𝟏𝟕

𝒌𝟒 = 𝒉 𝒇(𝒙𝟐, 𝒚𝟏 + 𝒌 𝟑 ) = 𝒉 𝒇(𝟏. 𝟐, 𝟐. 𝟓𝟎𝟕𝟐)

(Note: 𝒙𝟐 = 𝟏. 𝟐, 𝒚𝟏 + 𝒌𝟑 = 𝟏. 𝟖𝟗𝟓𝟓 + 𝟎. 𝟔𝟏𝟏𝟕 = 𝟐. 𝟓𝟎𝟕𝟐)

= (𝟎. 𝟏) [ (𝟏. 𝟐)𝟐 + (𝟐. 𝟓𝟎𝟕𝟐)𝟐] = 𝟎. 𝟕𝟕𝟐𝟔


Now from (2) 𝒚𝟐 = 𝒚(𝟎. 𝟐) = 𝒚 𝟏 +𝟔𝟏 [𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒 ]

=𝟏. 𝟖𝟗𝟓𝟓 + 𝟏𝟔 (𝟎. 𝟒𝟖𝟎𝟑 + 𝟏. 𝟏𝟕𝟔𝟕 + 𝟏. 𝟐𝟐𝟑𝟒 + 𝟎. 𝟕𝟕𝟐𝟔)

= 𝟐. 𝟓𝟎𝟒𝟑

2. Using Runge-Kutta method of fourth order find the value of 𝒚


(𝟏. 𝟐)

in steps of 0.2 given that 𝒚 ′ = 𝒙𝒚, 𝒚(𝟏) = 𝟐


Here 𝒇(𝒙, 𝒚) = 𝒙𝒚, 𝒙𝟎 = 𝟏, 𝒚𝟎 = 𝟐
Given the step size 𝒉 = 𝟎. 𝟐
Now 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟏 + 𝟎. 𝟐 = 𝟏. 𝟐

We were asked to find 𝒚(𝟏. 𝟐), 𝒊. 𝒆. , 𝒚(𝒙𝟏 ) = 𝒚𝟏

Finding 𝒚𝟏:

The fourth order Runge-Kutta formula to find 𝒚𝟏 is as follows:


𝒚 𝟏 = 𝒚𝟎 +𝟔𝟏 [𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒 ]----------(1)

𝒘𝒉𝒆𝒓𝒆 𝒌𝟏 = 𝒉 𝒇(𝒙𝟎, 𝒚 𝟎 ) = 𝒉 𝒇(𝟏, 𝟐)

𝟎. 𝟒
= (𝟎. 𝟐)(𝟏 × 𝟐) =

𝒌 𝟐 = 𝒉 𝒇 (𝒙𝟎 +𝟐𝒉 , 𝒚𝟎 + 𝟐𝒌 𝟏 ) = 𝒉 𝒇(𝟏. 𝟏, 𝟐. 𝟐)

𝒉 𝟎.𝟐 𝒌𝟏 𝟎.𝟒
(Note: 𝒙𝟎 + 𝟐 = 𝟏 + 𝟐
= 𝟏. 𝟏, 𝒚𝟎 + 𝟐
=𝟐+ 𝟐
= 𝟐.
𝟐)
= (𝟎. 𝟐)(𝟏. 𝟏 × 𝟐. 𝟐) = 𝟎. 𝟒𝟖𝟒
𝒉 𝒌𝟐
𝒌 𝟑 = 𝒉 𝒇 ( 𝒙𝟎 + 𝒚 𝟎 + ) = 𝒉 𝒇(𝟏. 𝟏, 𝟐. 𝟐𝟒𝟐)
, 𝟐 𝟐
𝒉 𝟎.𝟐 𝟎.𝟒𝟖𝟒
(Note: 𝒙𝟎 + 𝟐 = 𝟏 + 𝟐
= 𝟏. 𝟏, 𝒚𝟎 + 𝟐𝒌=
𝟐
𝟐+ 𝟐
= 𝟐. 𝟐𝟒𝟐)

= (𝟎. 𝟐)(𝟏. 𝟏 × 𝟐. 𝟐𝟒𝟐) = 𝟎. 𝟒𝟗𝟑𝟐𝟒

𝒌𝟒 = 𝒉 𝒇(𝒙𝟏, 𝒚𝟎 + 𝒌 𝟑 ) = 𝒉 𝒇(𝟏. 𝟐, 𝟐. 𝟒𝟗𝟑𝟐𝟒)

(Note: 𝒙𝟏 = 𝟏. 𝟐, 𝒚𝟎 + 𝒌𝟑 = 𝟐 + 𝟎. 𝟒𝟗𝟑𝟐𝟒 = 𝟐. 𝟒𝟗𝟑𝟐𝟒)

= 𝟎. 𝟓𝟗𝟖𝟒
= (𝟎. 𝟐)[𝟏. 𝟐 × 𝟐. 𝟐𝟒𝟗𝟑𝟐𝟒]
Now from (1) 𝒚𝟏 = 𝒚(𝟏. 𝟐) = 𝒚 𝟎 +𝟔𝟏 [𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒 ]
𝟏
= 𝟐 + (𝟎. 𝟒 + 𝟎. 𝟗𝟔𝟖 + 𝟎. 𝟗𝟖𝟔𝟒𝟖 + 𝟎. 𝟓𝟗𝟖𝟒)
𝟔

= 𝟑. 𝟏𝟓𝟖𝟖

3. Apply R-K method of 2nd and 4th order to find y at x = 0.2 given
that
𝒚 ′ = 𝒚𝒚+𝒙
−𝒙
, 𝒚(𝟎) = 𝟏.
𝒚−𝒙
Sol : Given that 𝒚 ′ = 𝒚+𝒙 = 𝒇(𝒙, 𝒚)

𝒚(𝟎) = 𝟏 𝒊.𝒆 𝒚(𝒙𝟎 ) = 𝒚𝟎 where 𝒙𝟎 =0 and 𝒚𝟎 = 𝟏, h = 0.2

𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟎 + 𝟎. 𝟐 = 𝟎. 𝟐

𝒚𝟏 = 𝒚(𝒙𝟏)= 𝒚(𝟎. 𝟐)

To find 𝒚𝟏 for 2nd order of R-K method : 𝒙𝟎 = 𝟎 and 𝒚𝟎 =1


By 2nd order of R-K method, we have, 𝒚𝟏 = 𝒚𝟎 +𝟐 𝟏 {𝒌𝟏 + 𝟐

𝒌 }where 𝒌𝟏 = 𝒉𝒇(𝒙𝟎, 𝒚 𝟎 )
= 𝒉 (𝒚𝟎−𝒙𝟎 )
𝒚𝟎+𝒙𝟎
= 𝟎. 𝟐 (𝟏− 𝟎
𝟏+𝟎
)

𝒌𝟏 = 𝟎. 𝟐

𝒌𝟐 = 𝒉𝒇(𝒙𝟎 + 𝒉, 𝒚𝟎 + 𝒌 𝟏 )

= 𝒉𝒇(𝟎 + 𝟎. 𝟐, 𝟏 + 𝟎. 𝟐)
𝟏.𝟐−𝟎.𝟐
=
= 𝒉𝒇
(𝟎(.𝟎𝟐. )𝟐, 𝟏. 𝟐) )
𝟏.𝟐+𝟎.𝟐
(
𝒌𝟐 = 𝟎. 𝟏𝟒𝟐9

We know that by 2nd order of R-K method we 𝟏 = 𝒚 𝟎 +𝟐𝟏 {𝒌𝟏 + 𝟐


have, 𝒚
𝒌 }
𝒚𝟏 = 𝟏 + 𝟏{𝟎. 𝟐 + 𝟎. 𝟏𝟒𝟐𝟖}
𝟐

𝒚𝟏 = 𝟏. 𝟏𝟕𝟏5
To find 𝒚𝟏 for 4th order of R-K method: 𝒙𝟎 = 𝟎 and 𝒚𝟎 =1

By fourth order of R-K method, 𝒚𝟏 = 𝒚𝟎 +𝟔𝟏 {𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝟒

𝒌 }Where 𝒌𝟏 = 𝒉𝒇(𝒙𝟎, 𝒚 𝟎 )
= 𝒉 (𝒚𝟎−𝒙𝟎 )
𝒚𝟎+𝒙𝟎
𝟏−𝟎
= 𝟎. 𝟐 ( =
0.2
𝟏+𝟎 )

𝒌𝟐 = 𝒉𝒇 (𝒙 𝟎 + 𝟐 ,𝒉 𝒚𝟎 + 𝟐 ) 𝒌=
𝟏
𝒉𝒇 (𝟎 + 𝟎.𝟐
𝟐
,𝟏 + 𝟐𝟎.𝟐)

𝒌𝟐 = 𝒉𝒇(𝟎. 𝟏, 𝟏. 𝟏)
𝟏.𝟏−𝟎.𝟏
= (𝟎. 𝟐) )
𝟏.𝟏+𝟎.𝟏
(
𝒌𝟐 = 𝟎. 𝟏𝟔𝟔𝟕
𝒉 𝒌𝟐
𝒌
𝟑 = 𝒉𝒇 (𝒙 𝟎 + 𝟐 , 𝒚𝟎 + 𝟐 )

= 𝒉𝒇 (𝟎 +
𝟎.𝟐
𝟐, 𝟏 +
𝟎.𝟏𝟔𝟔𝟔 )

𝟐
𝟏.𝟎𝟖𝟑𝟑−𝟎.𝟏
= 𝒉𝒇(𝟎=. 𝟏(,𝟎𝟏. .𝟐𝟎𝟖𝟑𝟒
) )
𝟏.𝟎𝟖𝟑𝟑+𝟎.𝟏
)
(
𝒌𝟑 = 𝟎. 𝟏𝟔𝟔𝟐

𝒌𝟒 = 𝒉𝒇(𝒙𝟎 + 𝒉, 𝒚𝟎 + 𝒌 𝟑 )

= 𝒉𝒇(𝟎 + 𝟎. 𝟐, 𝟏 + 𝟎. 𝟏𝟔𝟔𝟐)

= 𝒉𝒇(𝟎. 𝟐, 𝟏. 𝟏𝟔𝟔𝟐)

𝟏.𝟏𝟔𝟔𝟐−𝟎.𝟐
= (𝟎. 𝟐) ( )
𝟏.𝟏𝟔𝟔𝟐+𝟎.𝟐

𝒌𝟒 = 𝟎. 𝟏𝟒𝟏𝟒
Substitute all values in 𝒚 then we have,
𝒚𝟏 = 𝟏 + 𝟏{𝟎. 𝟐 + 𝟐(𝟎. 𝟏𝟔𝟔𝟔) + 𝟐(𝟎. 𝟏𝟔𝟔𝟏) + 𝟎. 𝟏𝟒𝟏𝟒}
𝟔

𝒚𝟏 = 𝟏. 𝟏𝟔𝟕9

H
o
m
e

w
o
r
k

P
r
o
b
l
e
m
s

1. Apply R-K method of


2nd and 4th order to
find y at x = 0.1 and
0.2, given that 𝒚 ′ +

𝒚 , 𝒚(𝟎) = 𝟏

2. Apply R-K method of


2nd and 4th order to
find y at x = 0.2,
given that
𝒚 ′ = 𝒙𝒚 +
Assignment Problems in Unit-3

2
1
1. a) Evaluate 1  2
dx
by taking h= 0.1 by
0
x
(i) Trapezoidal rule. (ii) Simpson’s 1/3 rd Rule. (iii) Simpson’s 3/8th rule.

1
b)
Evaluate
 1  x 4 dx by taking h = 0.125 by
0

(i) Simpson’s 1/3rd rule (ii) Simpson’s 3/8th rule (iii) Trapezoidal rule.

dy
2. a) Obtain Taylor’s series expansion for  x 2  y , y(0) =1, hence evaluate y(0.1).
dx
b) Find by Taylor’s series method the value of y at x = 0.1 up to 3 decimal places,
given that y/ = x2 y -1 , y(0)  1.

3. a) Solve y  y - x2 , y (0)  1 using Picard’s method up to 4th approx.

dy
x y
b) Evaluate y (0.1), y (0.2) using Picard’s method for dx , y (0) =1.

4. a) Given y   x y2  y (0)  2. Compute y(0.2) in steps of 0.1 using Euler’s method.


dy
 x 2  y 2 , y (0) =1.
b) Evaluate y (0.1) Euler’s method dx

5. a) Given y  x  sin y, y (0)  1, compute y (0.2) and y (0.4) using Euler’s modified method take
h=0.2.

dy
b)  x 2  y 2 , y (0) =1.
Evaluate y (0.1) modified Euler’s method dx

dy
6. a) By RK method of fourth order find y (0.2), y (0.4) given that  y 2  x , y (0) =1.
dx

b) Find y (0.1) and y (0.2) using Runge-Kutta 4th order formula,


given that y  x2  y,
y (0) =1.

You might also like