M-2-Unit-3 Complete Class Notes
M-2-Unit-3 Complete Class Notes
3
Numerical Integration and Solution of Ordinary Differential Equations
Contents
Numerical Integration
(a)Trapezoidal rule
(c)Euler’s method
𝑦: 𝑦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:
(a)Trapezoidal Rule
y
ba
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.
h
Sumof the first and last ordinates 4 Sumof theodd ordinates
b
f x dx
a 3
2 Sumof the remaining evenordinates
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.
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)
𝑥 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
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
Verification:
By actual Integration
4 4
x x 4
e dx e e e
0 0
53.5981
Home Work Problems
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
𝑦=
𝑥
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
𝑏
ℎ
∫ (
𝑓 𝑥)
𝑑= {(𝑦0 + )
𝑦𝑛 + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ ) + 2(𝑦2 + 𝑦4 + 𝑦6 +
𝑎
⋯ )}3
∫ 𝑥𝑑=
2 𝑒𝑥 ℎ {(𝑦0 + 𝑦4) + 4(𝑦1 + 𝑦3) +
2(𝑦2)}
1
𝑥 3
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
𝑥 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+𝑥
𝑏
ℎ
∫ (
𝑓 𝑥)
𝑑= {(𝑦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
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.
∫
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
2(2.0281)}
=3.1043.
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
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
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.
Picard’s method
Euler’s Method
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:
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 𝒚(𝒙)𝒂𝒕 𝒙 = 𝒙 , 𝒂𝒏𝒅
𝟎 𝒚 = 𝒚 𝟎
𝒉
(𝒉) 𝟐 ′′ ′(𝒉) 𝟑 ′′′
𝒚(𝒙𝟐) = 𝒚𝟐 = 𝒚𝟏 + 𝒚𝟏 + 𝒚 + 𝒚𝟏 + − − − − −
𝟏! 𝟐! 𝟏
𝟑!
Similarly, expanding 𝒚(𝒙) in Taylor series about the point 𝒙𝟐, we will get
(𝒓) 𝒅 𝒓𝒚
where 𝒚 =( ) 𝒂𝒕 𝒙 = 𝒙 ,𝒏 𝒚 = 𝒚𝒏
𝒏 𝒅 𝒙𝒓
Problems on Taylor’s Series Method:
𝒚 ′′ = 𝟐𝒙𝒚 + 𝒙 𝒚 ---------------(2)
𝟐 ′
𝒙𝟎 = 𝟎 𝒂𝒏𝒅 𝒚𝟎 = 𝟏
From the given initial condition 𝒚(𝟎) = 𝟏 we have
𝒚 ′𝟎 = 𝒚 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎
′
= 𝒙 𝟐𝒚 𝟎 − 𝟏 = 𝟎−𝟏 = ∴ 𝒚 ′ 𝟎= −𝟏
−𝟏
𝟎
𝒚 ′′𝟎 = 𝒚 ′′ 𝒂𝒕 𝒙 = 𝒙 &𝟎 𝑦 = 𝒚 𝟎
= 𝟐𝒙 𝒚 + 𝒙 𝟐𝒚′ =𝟎 +𝟎 = 𝟎 ∴ 𝒚 ′′𝟎= 𝟎
𝟎 𝟎 𝟎 𝟎
𝒚 ′ ′ ′ = 𝒚′′′ 𝒂𝒕 𝒙 = 𝒙 & 𝑦 = 𝒚
𝟎 𝟎 𝟎
′ 𝟐 ′′
= 𝟐𝒚𝟎 + 𝟒𝒙𝟎𝒚 𝟎 + 𝒙𝟎 𝒚𝟎 = 𝟐(𝟏) + 𝟎 + 𝟎 = 𝟐 ∴ 𝒚 ′′′𝟎 = 𝟐
′ ′′ 𝟐 ′′′
= 𝟔𝒚 𝟎+ 𝟔𝒙 𝟎𝒚 𝟎+ 𝒙 𝒚𝟎 𝟎 = 𝟔(−𝟏) + 𝟎 + 𝟎 = −𝟔 ∴ 𝒚𝒊𝒗=
𝟎 −𝟔
𝒉 𝟐 𝟑 𝟒
′
𝒚 𝟏 = 𝒚(𝒙 𝟏) = 𝒚(𝟎. 𝟏 ) = 𝒚𝟎 + 𝟏! 𝒚 𝟎 +
(𝒉 ) 𝒚 ′′𝟎 + (𝒉 ) 𝒚 ′′′
𝟎
(𝒉 ) 𝒚𝒗 𝒊𝟎 +
𝟐! 𝟑! + 𝟒! ⋯
𝟐
𝟑
𝟒
= 𝟏 + 𝟎𝟏. (−𝟏) + (𝟎.𝟏)
(𝟎.𝟏)
(𝟎 ) +
(𝟎.𝟏)
(𝟐 ) +
(−𝟔)
𝟏 𝟐 𝟔
𝟐𝟒
= 𝟏 − 𝟎. 𝟏 + 𝟎 + 𝟎. 𝟎𝟎𝟎𝟑𝟑 − 𝟎. 𝟎𝟎𝟎𝟎𝟐𝟓 + ⋯
2. Solve 𝒚 ′ = 𝟑𝒙 + 𝒚𝟐, 𝒈𝒊𝒗𝒆𝒏 𝒚(𝟎) = 𝟏. Find 𝒚(𝟎. 𝟏 ) 𝒂𝒏𝒅 𝒚(𝟎. 𝟐) by
= 𝟎. 𝟗𝟎𝟎𝟑
Taylor’s Series method .
Sol. The given differential equation with initial condition is
𝒚 ′ = 𝟑𝒙 + 𝒚𝟐, 𝒚( 𝟎 ) = 𝟏
Now 𝒚 ′ = 𝟑𝒙 + 𝒚𝟐 ….…(1)
𝒚 ′′ = 𝟑 + 𝟐𝒚𝒚′ ---------------(2)
[ Here 𝒙𝟏 = 𝟎. 𝟏 & 𝒙𝟐 = 𝟎. 𝟐 ]
Step 1:
Substituting these values in equations (1), (2), (3), and (4), we obtain
𝒚 ′𝟎 = 𝒚 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎
′
= 𝟑𝒙𝟎 + 𝒚𝟐 𝟎 = 𝟎 + 𝟏 ∴ 𝒚 ′ 𝟎= 𝟏
=𝟏
𝒚 ′′𝟎 = 𝒚 ′′ 𝒂𝒕 𝒙 = 𝒙𝟎 & 𝑦 = 𝒚𝟎
= 3+𝟐𝒚𝟎𝒚′ =
𝟎 𝟑 + 𝟐 ( 𝟏 ) (𝟏 ) = 𝟓 ∴ 𝒚 ′′𝟎= 𝟓
= 𝟏. 𝟏𝟐𝟕
Step 2:
Putting these values of 𝒙𝟏 𝒂𝒏𝒅 𝒚𝟏 in equations (1), (2), (3) and (4)
𝒚 ′𝟏 = 𝒚 𝒂𝒕 𝒙 = 𝒙𝟏 & 𝑦 = 𝒚𝟏
′
𝒚 ′𝟏′ = 𝒚 ′′ 𝒂𝒕 𝒙 = 𝒙𝟏 & 𝑦 = 𝒚𝟏
∴ 𝒚 ′′𝟏= 𝟔. 𝟓𝟑𝟖
𝒚 𝟏′ ′ ′ = 𝒚 ′ ′ ′ 𝒂𝒕 𝒙 = 𝒙𝟏 & 𝑦 = 𝒚𝟏
= 𝟐 [ 𝒚 𝟏 𝒚 ′′ + ( 𝒚 ′ )𝟐] = 𝟐[(𝟏. 𝟏𝟐𝟕)(𝟔. 𝟓𝟑𝟖) + (𝟏. 𝟓𝟕)𝟐] = 𝟏𝟗. 𝟔𝟔𝟔
𝟏 𝟏
= 𝟏𝟎𝟓. 𝟗𝟏𝟓
𝒉 𝟐 𝟑 𝟒
′′ ′′′ (𝒉 ) 𝒚 𝒗𝒊 +
𝒚 ′𝟏 + 𝟐! 𝒚 𝟏 + 𝟑! 𝒚 𝟏 +
(𝒉 ) (𝒉 )
𝒚𝟐 = 𝒚(𝟎. 𝟐) = 𝒚𝟏 + 𝟏! 𝟏
𝟒! ⋯
𝟐 𝟑
𝟎.𝟏 (𝟎.𝟏) (𝟎.𝟏) (𝟎.𝟏) 𝟒
= 𝟏. 𝟏𝟐𝟕 + (𝟏. 𝟓𝟕) + (𝟔. 𝟓𝟑𝟖) + (𝟏𝟗. 𝟔𝟔𝟔) + (𝟏𝟎𝟓. 𝟗𝟏𝟓)
+…
𝟏 𝟐 𝟔 𝟐𝟒
= 1.32
y(0)=1.
Sol: Given y’=𝒚𝟐+x ----------------(1)
y’’=2yy’+1 ---------------(2)
We were asked to find 𝒚(𝟎. 𝟏), 𝒚(𝟎. 𝟐) &𝒚(𝟎. 𝟑) 𝒊. 𝒆. , 𝒚(𝒙𝟏), 𝒚(𝒙𝟐 ) & 𝒚(𝒙𝟑 )
[ Here 𝒙𝟏 = 𝟎. 𝟏, 𝒙𝟐 = 𝟎. 𝟐 & 𝒙𝟑 = 𝟎. 𝟑 ]
Substituting these values in equations (1), (2), (3), and (4), we obtain
𝒚 ′𝟎 = (𝒚 𝟎 )𝟐 + 𝒙𝟎 = 𝟏 + 𝟎 = 𝟏
𝒚 ′′𝟎 = 𝟐𝒚 𝟎 𝒚 ′ 𝟎+ 𝟏 = 𝟐(𝟏)(𝟏) + 𝟏 = 𝟑
𝒚 ′ ′ ′ = 𝟐𝒚 𝟎 𝒚 ′′ + 𝟐 ( 𝒚 ′ )𝟐 = 𝟐(𝟏)(𝟑) + 𝟐(𝟐) = 𝟖
𝟎 𝟎 𝟎
= 1.11647.
∴ 𝒚𝟏 = 𝟏. 𝟏𝟏𝟔𝟒𝟕
Step 2:
Putting these values of 𝒙𝟏 𝒂𝒏𝒅 𝒚𝟏 in equations (1), (2), (3) and (4)
𝒚 ′𝟏 = (𝒚 𝟏 )𝟐 + 𝒙𝟏 = 𝟏. 𝟑𝟒𝟔𝟓𝟎
𝒚 ′′ = 𝟐𝒚𝟏 𝒚 ′ + 𝟏 = 𝟒. 𝟎𝟎𝟔𝟔𝟓
𝟏 𝟏
𝟐
𝒚𝟏′′′= 𝟐𝒚𝟏𝒚𝟏 +
′′
𝟐( 𝒚 𝟏 ) ′ = 𝟏𝟐. 𝟓𝟕𝟐𝟕𝟑
𝒉 ′ 𝒉𝟐 ′′ 𝒉
𝟑
′′′ 𝒉
𝟒
𝒗𝒊
𝒚 𝟐 = 𝒚(𝒙 𝟐) = 𝒚(𝟎. 𝟐) = 𝒚 +
𝟏 𝟏! 𝒚 𝟏+ 𝟐! 𝒚 𝟏+ 𝟑! 𝒚𝟏 + 𝒚𝟏 +
𝟒!
………. 𝟐
𝟑
𝟒
= 1.11647 + (0.1)(1.34650) + (𝟎.𝟏) (4.00665) + (𝟎.𝟏) (12.57273) + (𝟎.𝟏) (60.44387)
𝟐
𝟔
𝟐𝟒
=1.27344
∴ 𝒚𝟐 = 𝟏. 𝟐𝟕𝟑𝟒𝟒
Step 3:
𝟐
𝒚𝟐′′′= 𝟐𝒚𝟐𝒚𝟐 +
′′
𝟐( 𝒚 𝟐 ) ′ = 𝟐𝟎. 𝟗𝟗𝟗𝟖𝟒
= 1.48785
∴ y(0.2)=1.27344 and
∴ 𝒚𝟑 = 𝟏. 𝟒𝟖𝟕𝟕𝟐
y(0.1)=1.11647, y(0.3)=1.48772
𝒙=𝒙𝟎 𝒙𝟎
𝟎 ∫ 𝒙 𝒇(𝒙, 𝒚)𝒅𝒙
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)
𝒚 (𝟏 ) = 𝒚 𝟎 𝒙𝟎
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
𝒚(𝟏 ) = 𝒚𝟎 + ∫
𝒇(𝒙, 𝒚𝟎 )𝒅𝒙 𝒙
= 𝟏 + ∫ (𝒙. 𝒚 𝟎 +
𝟏) 𝒅𝒙 𝟎 𝒙𝟎
𝒙
= 𝟏 + ∫ (𝒙 +
𝟏 ) 𝒅𝒙 𝟎
𝒙
=𝟏 + (𝒙𝟐 + = 𝟏 + {(𝒙𝟐 + 𝒙 ) −
𝟐 𝟎 𝟐
𝒙) 𝟎}
𝟐
𝒙
=𝟏 + + 𝒙
𝟐
𝟐
𝒙
∴ 𝒚 (𝟏 ) =𝟏 +𝒙+
𝟐
𝒙
𝟎 ∫
=𝒚 + (𝒙. 𝒚(𝟏) + 𝟏 ) 𝒅𝒙
𝟎
𝒙 𝒙𝟐
= 𝟏 + ∫ ( 𝒙 (𝟏 + 𝒙 + ) + 𝟏 ) 𝒅𝒙
𝟎 𝟐
𝒙 𝒙𝟑
= 𝟏 + ∫ (𝒙 + 𝒙𝟐 + + 𝟏 ) 𝒅𝒙
𝟎 𝟐
𝒙
=𝟏 + (𝒙𝟐 + 𝒙𝟑 + 𝒙𝟒 +
𝟐 𝟑 𝟖 𝟎
𝒙)
𝟐 𝟑
𝟒
= 𝟏 + 𝒙𝟐+ 𝒙 + 𝒙
𝟑 +𝟖 𝒙
𝟐 𝟑 𝒙𝟒
∴ 𝒚(𝟐 ) = 𝟏 + 𝒙 + 𝒙 + 𝒙
𝟐 𝟑
+ 𝟖
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 𝒙 = 𝟎. 𝟏,
𝒚 ′ = 𝒙 + 𝒚, 𝒚(𝟎) = 𝟏.
𝒙𝟏 = 𝟎. 𝟏
𝒙𝟐 = 𝟎. 𝟐
[Note:- 𝒉 = 𝒙𝟐 − 𝒙𝟏 = 𝟎. 𝟐 − 𝟎. 𝟏 = 𝟎. 𝟏]
By Picard’s method
𝒚(𝟏) = 𝒚𝟎 + ∫ 𝒙
= 𝒚 + ∫𝟎 (𝒙 + 𝒚 )𝟎 𝒅𝒙
𝟎
𝒇(𝒙, 𝒚𝟎 )𝒅𝒙 𝒙
= 𝟏 + ∫ (𝒙 + 𝟏)𝒅𝒙
𝟎 𝒙𝟎
𝒙
= 𝟏 + ∫ (𝒙 + 𝟏)𝒅𝒙
𝟎
𝟐
𝒙
=𝟏 + + 𝒙
𝟐
𝟐
∴ 𝒚(𝟏 ) = 𝟏 + 𝒙 + 𝒙
𝟐
The second 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 𝒚 = 𝒚(𝟑)
𝒙𝟑 + 𝒙
𝟒
∴ 𝒚(𝒙) = 𝒚(𝟑) = 𝟏 + 𝒙 + 𝒙𝟐 +
𝟑 𝟑 𝟒
𝑨𝒕 𝒙 = 𝟎. 𝟏, 𝒚(𝟎. 𝟏) = 𝒚 𝟏 𝟐𝟒
= 𝟏 + 𝟎. 𝟏 + (𝟎. 𝟏) +
𝟐 (𝟎.𝟏)
+ (𝟎.𝟏)
𝟑 𝟐𝟒
= 𝟏. 𝟏𝟏𝟎𝟑
(𝟎. 𝟐)𝟑 (𝟎. 𝟐)𝟒
+ = 𝟏. 𝟐𝟒𝟐𝟕
𝑨𝒕 𝒙 = 𝟎. 𝟐, 𝒚(𝟎. 𝟐) = 𝒚𝟐 = 𝟏 + 𝟎. 𝟐 + (𝟎. 𝟐)𝟐 + 𝟑 𝟐𝟒
𝒚(𝟎) = 𝟎.
𝒅𝒚
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
𝒙
+ ∫ 𝒇(𝒙, 𝒚 ( 𝟏 ) )𝒅𝒙 =
𝒚 (𝟐 ) = 𝒚 𝟎 𝒙𝟎
𝒙
=𝟎 𝟐 + (𝒚 (𝟏) )𝟐 ]𝒅𝒙
∫𝟎 [𝒙
+
𝒙 𝒙
𝟐 + (𝒙𝟑 )𝟐 ] 𝒅𝒙 𝟐 + 𝒙𝟔 ] 𝒅𝒙 = 𝒙𝟑 𝒙𝟕
= ∫𝟎 [𝒙 𝟑 = ∫𝟎 [𝒙 𝟗 +
𝟑
𝟔𝟑
𝒙𝟑 + 𝒙𝟕
∴ 𝒚 ( 𝟐) = 𝟑 𝟔𝟑
𝒙𝟑 𝒙𝟕
∴ 𝒚(𝒙) = 𝟑 𝟔𝟑
+
Now put 𝒙 = 𝟎. 𝟒 in the above equation, we get
𝟑 𝟕
𝒚 (𝟎. 𝟒) = (𝟎.𝟒) + (𝟎.𝟒) = 𝟎. 𝟎𝟐𝟏𝟑𝟑𝟑
+ 𝟎. 𝟎𝟎𝟎𝟎𝟐𝟔 = 𝟎. 𝟎𝟐𝟏𝟑𝟓𝟗
𝟑 𝟔𝟑
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.
=1.104829
Put 𝒙 = 𝟎. 𝟐 in 𝒚(𝒙)
(𝟎. 𝟐)𝟐 (𝟎. 𝟐)𝟑 (𝟎. 𝟐)𝟒 (𝟎. 𝟐)𝟓 (𝟎. 𝟐)𝟔
− − −
𝒚(𝟎. 𝟐) = 𝟏 + 𝟎. 𝟐 + 𝟐 𝟔 𝟐𝟒 𝟔𝟎 𝟑𝟔𝟎
−
= 1 + 0.2 + 0.02 – 0.0013333 – 0.00006666 - 0.000005333 –
0.0000001777
= 1.21859
By Euler’s Algorithm we can find 𝒚𝟏, 𝒚𝟐, 𝒚𝟑, … . 𝒊. 𝒆, 𝒚(𝒙𝟏), 𝒚(𝒙𝟐), 𝒚(𝒙𝟑 ) …., starting from
𝒚𝟑 = 𝒚𝟐 + 𝒉. 𝒇(𝒙𝟐, 𝒚 𝟐 )
𝒚𝟒 = 𝒚𝟑 + 𝒉. 𝒇(𝒙𝟑, 𝒚 𝟑 ) and so
on.
where ′ 𝒉′ is the step size of ′𝒙′. i.e., 𝒉 = 𝒙𝟏
− 𝒙𝟎
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 𝒇(𝒙, 𝒚) = 𝒚 − 𝒙 , 𝒙𝟎 = 𝟐, 𝒚𝟎 = 𝟏
Let 𝒙𝟏 = 𝟐. 𝟏
∴ 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟐. 𝟏 − 𝟐. 𝟎 = 𝟎. 𝟏
and 𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟐. 𝟏 + 𝟎. 𝟏 = 𝟐. 𝟐
= 𝟏 + (𝟎. 𝟏)(𝒚𝟎 − 𝒙𝟎 )
= 𝟏 + (𝟎. 𝟏)(𝟏 − 𝟐)
= 𝟏 − 𝟎. 𝟏 = 𝟎. 𝟗
𝒚(𝟐. 𝟏) = 𝒚𝟏 = 𝟎. 𝟗
= 𝟎. 𝟗 + (𝟎. 𝟏)(𝒚𝟏 − 𝒙𝟏 )
= 𝟎. 𝟗 + (𝟎. 𝟏)(𝟎. 𝟗 − 𝟐. 𝟏)
2. Apply Euler’s method to solve 𝒚 ′ = 𝒙 + 𝒚, 𝒚(𝟎) = 𝟎 𝒕𝒐 find y(1.2) by
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟐 + 𝟎. 𝟐 = 𝟎. 𝟒
𝒙𝟑 = 𝒙𝟐 + 𝒉 = 𝟎. 𝟒 + 𝟎. 𝟐 = 𝟎. 𝟔
𝒙𝟒 = 𝒙𝟑 + 𝒉 = 𝟎. 𝟔 + 𝟎. 𝟐 = 𝟎.8
𝒙𝟓 = 𝒙𝟒 + 𝒉 = 𝟎. 𝟖 + 𝟎. 𝟐 = 𝟏. 𝟎
𝒙𝟔 = 𝒙𝟓 + 𝒉 = 𝟏. 𝟎 + 𝟎. 𝟐 = 𝟏.2
𝒚(𝒙𝟐 ) = 𝒚𝟐 = 𝒚𝟏 + 𝒉𝒇(𝒙𝟏, =
𝒚 𝟏 )𝟎
= 𝟎 + 𝟎. 𝟐(𝟎. 𝟐 +
𝟎)
𝒚𝟐 = 𝒚(𝟎. 𝟒) = 𝟎. 𝟎𝟒
= 𝟎. 𝟎𝟒
𝒚(𝒙𝟑 ) = 𝒚𝟑 = 𝒚𝟐 + 𝒉𝒇(𝒙𝟐, 𝒚 𝟐 )
𝒚𝟑 = 𝒚(𝟎. 𝟔) ==
𝟎.𝟎𝟏𝟐𝟖
. 𝟏𝟐𝟖
𝒚(𝒙𝟒 ) = 𝒚𝟒 = 𝒚𝟑 + 𝒉𝒇(𝒙𝟑, 𝒚 𝟑 )
𝒚(𝒙𝟓 ) = 𝒚𝟓 = 𝒚𝟒 + 𝒉𝒇(𝒙𝟒, 𝒚 𝟒 )
𝒚(𝒙𝟔 ) = 𝒚𝟔 = 𝒚𝟓 + 𝒉𝒇(𝒙𝟓, 𝒚 𝟓 )
3.Using Euler’s method, Find 𝒚(𝟐) from 𝒅𝒅𝒚𝒙 = 𝟑𝒙𝟐 + 𝟏, 𝒚(𝟏) = 𝟐, taking step
size (𝒊) 𝒉 = 𝟎. 𝟓 (𝒊𝒊)𝒉 = 𝟎. 𝟐𝟓
𝒅𝒚
Sol. Given differential equation is = 𝟑𝒙𝟐 + 𝟏, 𝒚(𝟏) = 𝟐 ……….(1)
𝒅𝒙
= 𝒚𝟎 + 𝒉(𝟑𝒙𝟐 𝟎+ 𝟏 )
=𝟐 + 𝟎. 𝟓 [𝟑(𝟏)𝟐 + 𝟏] = 𝟐 + 𝟎. 𝟓 (𝟒) = 𝟒
∴ 𝒚𝟏 = 𝒚(𝒙𝟏 ) = 𝒚(𝟏. 𝟓) = 𝟒
= 𝒚𝟏 + 𝒉(𝟑𝒙𝟐 𝟏+ 𝟏 )
= 𝒚𝟎 + 𝒉(𝟑𝒙𝟐 𝟎+ 𝟏 )
=𝟐 + 𝟎. 𝟐𝟓 [𝟑(𝟏)𝟐 + 𝟏] = 𝟑
= 𝒚𝟏 + 𝒉(𝟑𝒙𝟐 𝟏+ 𝟏 )
= 𝟑 + 𝟎. 𝟐𝟓 [𝟑(𝟏. 𝟐𝟓)𝟐 + 𝟏] = 𝟒. 𝟒𝟐𝟏𝟖𝟖
= 𝒚𝟐 + 𝒉(𝟑𝒙𝟐 𝟐+ 𝟏 )
= 𝟒. 𝟒𝟐𝟏𝟖𝟖 + 𝟎. 𝟐𝟓 [𝟑(𝟏. 𝟓)𝟐 + 𝟏] = 𝟔. 𝟑𝟓𝟗𝟑𝟖
= 𝒚𝟑 + 𝒉(𝟑𝒙𝟐 𝟑+ 𝟏 )
= 𝟔. 𝟑𝟓𝟗𝟑𝟖 + 𝟎. 𝟐𝟓 [𝟑(𝟏. 𝟕𝟓)𝟐 + 𝟏] = 𝟖. 𝟗𝟎𝟔𝟐𝟔
∴ 𝒚𝟒 = 𝒚(𝒙 𝟒 ) = 𝒚(𝟐) = 𝟖. 𝟗𝟎𝟔𝟐𝟔
Note: Observe the difference in the value of 𝒚(𝟐) in both cases i.e., when 𝒉 = 𝟎. 𝟓
and when 𝒉 = 𝟎. 𝟐𝟓.
We know that 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟎 + 𝟎. 𝟏 = 𝟎. 𝟏
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟏 + 𝟎. 𝟏 = 𝟎. 𝟐
𝒙𝟑 = 𝒙𝟐 + 𝒉 = 𝟎. 𝟐 + 𝟎. 𝟏 = 𝟎. 𝟑
=
= 𝟏𝟏.+ 𝟎.𝟎𝟏.)𝟏[𝟎[𝟎+
𝟏 (+ . 𝟏𝟏+
]=𝟏.𝟏𝟏. ] = 𝟏. 𝟐𝟐
𝒚𝟐 = 𝒚 𝟎. 𝟐 = 𝟏. 𝟐𝟐
( )
𝒚(𝒙𝟑 ) = 𝒚𝟑 = 𝒚𝟐 + 𝒉𝒇(𝒙𝟐, 𝒚 𝟐 )
𝒅𝒚 which is
The above equation is of the form
𝒅 𝒙 + 𝑷(𝒙). 𝒚 =
linear
𝑸 ( 𝒙)
equation in ′𝒚′
𝒚(𝒆−𝒙)= ∫ 𝒙𝒆
𝒙𝒆
−𝒙
−𝒙𝒅𝒙 + 𝒄
= + ∫ 𝒆−𝒙𝒅𝒙 + 𝒄
−𝟏
−𝒙
𝒆
= −𝒙𝒆−𝒙 +
−𝟏
𝒚(𝒆−𝒙) =+𝒆−𝒙𝒄[−𝒙 − 𝟏] + 𝒄
From (𝟏 ) 𝟏 = −𝟏 + 𝒄
𝒄= 𝟐 𝒚(𝒙) = −(𝒙 + 𝟏) + 𝟐𝒆𝒙
∴ The
𝒚(𝟎. 𝟑solution
) = −(𝟎of
. 𝟑 given
+ 𝟏) D.E.
+ 𝟐𝒆is
𝟎.𝟑
𝒚 = −(𝒙 + 𝟏) + 𝟐𝒆𝒙
= 𝟏. 𝟑𝟗𝟗𝟕𝟏
𝒅𝒚
2. Find y(2) using Euler’s method, given that
𝒅 𝒙 = 𝟑𝒙𝟐 + 𝟏, 𝒚(𝟏 ) = 𝟐 with
h = 0.2.
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)
𝒉 (𝟎)
𝒚(𝟏)
𝟏 = 𝒚 𝟎 𝟎 𝟎 𝟏
𝟐 [𝒇( 𝒙 , 𝒚 ) + 𝒇 (𝒙 , 𝒚 𝟏
+
)]
𝒉 (𝟏)
𝒚(𝟏𝟐 ) = 𝒚 𝟎 𝟎 𝟎 𝟏
+𝟐 [𝒇(𝒙 , 𝒚 ) + 𝒇 (𝒙 , 𝒚 𝟏 )]
𝒉 (𝟎)
(𝟐𝟏 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]
𝒉 (𝟏)
(𝟐𝟐 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]
Similarly for finding 𝒚𝟑, 𝒚𝟒, 𝒆𝒕𝒄., we use same procedure by finding successive
approximations for each value.
1. Find 𝒚(𝟎. 𝟏) 𝒂𝒏𝒅 𝒚(𝟎. 𝟐) using Modifed Euler’s Method given that
𝒅𝒚
𝒅 𝒙 = 𝒙𝟐 − 𝒚, 𝒚(𝟎) = 𝟏.
Here 𝒇(𝒙, 𝒚) = 𝒙𝟐 − 𝒚, 𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏.
𝒚(𝟎)
𝟏 = 𝒚 𝟎 + 𝒉. 𝒇(𝒙 𝟎, 𝒚 𝟎)
= 𝒚𝟎 + 𝒉(𝒙𝟐 𝟎− 𝒚 𝟎 )
𝟎. 𝟗
= 𝟏 + 𝟎. 𝟏(𝟎 − 𝟏)
= 𝒉
(𝟏 ) (𝟎)
𝒚𝟏 = 𝒚 𝟎 𝟎 𝟎 𝟏
𝟐 [𝒇( 𝒙 , 𝒚 ) + 𝒇 (𝒙 , 𝒚 𝟏
+
)]
𝒉
= 𝒚𝟎 + 𝟐 [ (𝒙𝟎 𝟐− 𝒚 𝟎 ) + (𝒙 𝟏 𝟐− 𝒚𝟏 (𝟎) )]
𝟎.𝟏
=𝟏+ 𝟐 [(𝟎 − 𝟏) + ((𝟎. 𝟏)𝟐 − 𝟎. 𝟗)]
𝒉 (𝟏)
(𝟏𝟐 ) 𝟎
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟎, 𝒚 𝟎) + 𝒇 (𝒙 ,𝟏 𝒚 𝟏 )]
𝒉
= 𝒚𝟎 + 𝟐 [ (𝒙𝟎 𝟐− 𝒚 𝟎 ) + (𝒙 𝟏 𝟐− 𝒚𝟏 (𝟏) )]
𝟎.𝟏
=𝟏+ 𝟐 [(𝟎 − 𝟏) + ((𝟎. 𝟏)𝟐 − 𝟎. 𝟗𝟎𝟓)]
Since 𝒚(𝟏), 𝒚(𝟐 ) coincide with each other we stop the iteration process here and we
𝟏 𝟏
∴ 𝒚𝟏 = 𝒚(𝟎. 𝟏) = 𝟎. 𝟗𝟎𝟓
To find 𝒚(𝟎. 𝟐) = 𝒚(𝒙𝟐 ) = 𝒚𝟐 we find the successive approximations for 𝒚𝟐
(Note:𝒙𝟏 = 𝟎. 𝟏, 𝒚𝟏 = 𝟎. 𝟗𝟎𝟓, 𝒙𝟐 = 𝟎. 𝟐, 𝒉 = 𝟎. 𝟏)
= 𝒚𝟏 + 𝒉(𝒙𝟐 𝟏− 𝒚 𝟏 )
𝟎. 𝟖𝟏𝟓𝟓
= 𝟎. 𝟗𝟎𝟓 + 𝟎. 𝟏[𝟎. 𝟎𝟏 − 𝟎. 𝟗𝟎𝟓] =
𝒉 (𝟎)
(𝟐𝟏 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]
𝒉
= 𝒚𝟏 + 𝟐 [(𝒙𝟏 𝟐− 𝒚 𝟏 ) + (𝒙 𝟐 −
𝟐
𝒚𝟐 (𝟎) )
𝟎.𝟏
= 𝟎. 𝟗𝟎𝟓 + 𝟐 [((𝟎. 𝟏)𝟐 − 𝟎. 𝟗𝟎𝟓) + ((𝟎. 𝟐)𝟐 − 𝟎. 𝟖𝟏𝟓𝟓)]
𝟎.𝟏
= 𝟎. 𝟗𝟎𝟓 + 𝟐 [−𝟎. 𝟖𝟗𝟓 − 𝟎. 𝟕𝟕𝟓] = 𝟎. 𝟖𝟐𝟏𝟒
𝒉 (𝟏)
(𝟐𝟐 ) 𝟏
𝒚 =𝒚 +𝟐 [𝒇(𝒙 𝟏, 𝒚 𝟏) + 𝒇 (𝒙 ,𝟐 𝒚 𝟐 )]
𝒉
= 𝒚𝟏 + 𝟐 [(𝒙𝟏 𝟐− 𝒚 𝟏 ) + (𝒙 𝟐 −
𝟐
𝒚𝟐 (𝟏) )
𝟎.𝟏
= 𝟎. 𝟗𝟎𝟓 + 𝟐 [((𝟎. 𝟏)𝟐 − 𝟎. 𝟗𝟎𝟓) + ((𝟎. 𝟐)𝟐 − 𝟎. 𝟖𝟐𝟏𝟒)]
𝟎.𝟏
= 𝟎. 𝟗𝟎𝟓 + 𝟐 [−𝟎. 𝟖𝟗𝟓 − 𝟎. 𝟕𝟖𝟏] = 𝟎. 𝟖𝟐𝟏𝟏
Since 𝒚(𝟏), 𝒚(𝟐) coincide with each other we stop the iteration process here and we
𝟐 𝟐
Now 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟎 + 𝟎. 𝟏 = 𝟎. 𝟏 𝒂𝒏𝒅 𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟏 + 𝟎. 𝟏 =
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
𝟏 𝟏
(Note:𝒙𝟏 = 𝟎. 𝟏, 𝒚𝟏 = 𝟏. 𝟗𝟖𝟎𝟑, 𝒙𝟐 = 𝟎. 𝟐, 𝒉 = 𝟎. 𝟏)
= 𝒚𝟏 + 𝒉(−𝒙𝟏𝒚𝟐)𝟏
𝒉
= 𝒚𝟏 + 𝟐 [ (−𝒙𝟏 𝒚𝟏 )𝟐 + ((−𝒙𝟐(𝒚𝟐 (𝟎 ) )𝟐 )]
𝟎.𝟏
= 𝟏. 𝟗𝟖𝟎𝟑 + 𝟐 [(−𝟎. 𝟑𝟗𝟐𝟏) + (−𝟎. 𝟐)(𝟏. 𝟗𝟒𝟏𝟎)𝟐]
𝟎.𝟏
= 𝟏. 𝟗𝟖𝟎𝟑 + 𝟐 [−𝟎. 𝟑𝟗𝟐𝟏 − 𝟎. 𝟕𝟓𝟑𝟒] = 𝟏. 𝟗𝟐𝟑𝟎
𝒉 (𝟏)
𝒚(𝟐𝟐 ) = 𝒚 𝟏 𝟏 𝟏 𝟐
𝟐 [𝒇( 𝒙 , 𝒚 ) + 𝒇 (𝒙 , 𝒚 𝟐
+
)]
𝒉
= 𝒚𝟏 + 𝟐 [ (−𝒙𝟏 𝒚𝟏 )𝟐 + ((−𝒙𝟐(𝒚𝟐 (𝟏) )𝟐 )]
𝟎.𝟏
= 𝟏. 𝟗𝟖𝟎𝟑 + 𝟐 [(−𝟎. 𝟑𝟗𝟐𝟏) + (−𝟎. 𝟐)(𝟏. 𝟗𝟐𝟑𝟎)𝟐]
𝟎.𝟏
= 𝟏. 𝟗𝟖 + 𝟐 [−𝟎. 𝟑𝟗𝟐𝟏 − 𝟎. 𝟕𝟑𝟕] = 𝟏. 𝟗𝟐37
Since 𝒚(𝟏), 𝒚(𝟐 ) coincide with each other we stop the iteration process here and we
𝟐 𝟐
∴ 𝒚𝟐 = 𝒚(𝟎. 𝟐 ) = 𝟏. 𝟗𝟐𝟑𝟕
Solution:
𝒙𝟎 = 𝟎, 𝒚𝟎 = 𝟏
𝒙𝟏 = 𝟎. 𝟐 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
𝟐 𝟐
Let 𝒙𝟏 = 𝟎. 𝟐 and 𝒉 = 𝒙𝟏 − 𝒙𝟎 = 𝟎. 𝟐 − 𝟎 = 𝟎. 𝟐
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟎. 𝟒
To find 𝐲𝟏:
𝐱𝟎 = 𝟎, 𝐲𝟎 = 𝟎
𝐲(𝟏𝟎) =𝐲 𝟏 = 𝐲𝟎 + 𝐡𝐟(𝐱𝟎, 𝐲𝟎) = 𝟎. 𝟐
𝐟(𝐱 , 𝐲 ) = 𝐞𝐱𝟎 + 𝐲 = 𝐞𝟎 + 𝟎 = 𝟏
𝒉 (𝟎)
(𝟏 ) 𝟎 𝟎 𝟎 𝟏
𝒚𝟏 = 𝒚 + 𝟐 {𝒇( 𝒙 , 𝒚 ) + 𝒇 ( 𝒙 , 𝒚𝟏
)}
= 𝟎 + (𝟎.𝟐 ){𝟏 + 𝒆𝒙𝟏 + 𝒚(𝟎)
𝟏 }
𝟐
𝒉 (𝟏)
(𝟐 )
𝒚𝟏 = 𝒚 𝟎 + 𝟐 {𝒇( 𝒙 𝟎, 𝒚 𝟎 ) + 𝒇 ( 𝒙𝟏 , 𝒚𝟏
)}
= 𝟎 + (𝟎.𝟐 ){𝟏 + 𝒆𝒙𝟏 + 𝒚(𝟏) 𝟏 }
𝟐
𝒉 (𝟐)
(𝟑 ) 𝟎 𝟎 𝟎 𝟏
𝒚𝟏 = 𝒚 + 𝟐 {𝒇( 𝒙 , 𝒚 ) + 𝒇 ( 𝒙 , 𝒚𝟏
)}
= 𝟎 + (𝟎.𝟐 ){𝟏 + 𝒆𝒙𝟏 + 𝒚(𝟐)
𝟏 }
𝟐
𝒉 (𝟑)
(𝟒 ) 𝟎 𝟎 𝟎 𝟏
𝒚𝟏 = 𝒚 + 𝟐 {𝒇( 𝒙 , 𝒚 ) + 𝒇 ( 𝒙 , 𝒚𝟏
)}
= 𝟎 + (𝟎.𝟐 ){𝟏 + 𝒆𝒙𝟏 + 𝒚(𝟑)
𝟏 }
𝟐
To find 𝒚𝟐:
Here 𝒙𝟏 = 𝟎. 𝟐, 𝒚𝟏 = 𝟎. 𝟐𝟒𝟔𝟖
𝒉 (𝟏)
(𝟐 )
𝒚𝟐 = 𝒚 + 𝟐 {𝒇( 𝒙 𝟏, 𝒚 𝟏 ) + 𝒇 ( 𝒙𝟐 , 𝒚𝟐
𝟏
)}
= 𝟎. 𝟐𝟒𝟔𝟖 + ( 𝟎.𝟐 ){𝟏. 𝟒𝟔𝟖𝟐 + 𝒆 𝒙𝟐 + 𝒚(𝟏)
𝟐 }
𝟐
= 𝟎. 𝟔𝟎𝟑𝟏
𝒉 ( 𝟑)
=𝒚
(𝟒 ) 𝟏 + 𝟐 {𝒇(𝒙𝟏, 𝒚 𝟏 ) + 𝒇 (𝒙𝟐, 𝒚𝟐
𝒚𝟐
)}
= 𝟎. 𝟐𝟒𝟔𝟖 + ( 𝟎.𝟐 ) {𝟏. 𝟒𝟔𝟖𝟐 + 𝒆𝒙𝟐 + 𝒚(𝟑)
𝟐 }
𝟐
Since 𝒚(𝟑), 𝒚(𝟒 ) coincide with each other we stop the iteration process here and we
𝟐 𝟐
We find 𝒚(𝒙𝟏), 𝒚(𝒙𝟐), 𝒚(𝒙𝟑), … … i.e., 𝒚𝟏, 𝒚𝟐, 𝒚𝟑, … etc, by using
𝒚𝟏 = 𝒚𝟎 + [𝟏𝒌𝟏 + 𝒌𝟐]
𝟐
Finding 𝒚𝟐:
𝒚𝟐 = 𝒚𝟏 + [𝟏𝒌𝟏 + 𝒌𝟐]
𝟐
Finding 𝒚𝟑:
𝒚𝟑 = 𝒚𝟐 + [𝟏𝒌𝟏 + 𝒌𝟐]
𝟐
Finding 𝒚𝒏:
+ 𝒌𝟏 )
𝒚 𝒏 = 𝒚𝒏 −𝟏 +𝟐 𝟏 [𝒌𝟏 + 𝒌𝟐 ] 𝒘𝒉𝒆𝒓𝒆 𝒌 𝟏 = 𝒉 𝒇(𝒙𝒏 −𝟏 𝒏 −𝟏) 𝒂𝒏𝒅 𝒌𝟐 = 𝒉 𝒇(𝒙𝒏, 𝒚𝒏−𝟏
,𝒚
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 𝒙𝟏 = 𝒙𝟎 + 𝒉 = 𝟐 + 𝟎. 𝟐𝟓 = 𝟐. 𝟐𝟓
𝒙𝟐 = 𝒙𝟏 + 𝒉 = 𝟐. 𝟐𝟓 + 𝟎. 𝟐𝟓 = 𝟐. 𝟓
(Note:- 𝒙𝟏 = 𝟐. 𝟐𝟓 𝒂𝒏𝒅 𝒚𝟎 + 𝒌𝟏 = 𝟐 + 𝟎. 𝟓 = 𝟐. 𝟓)
𝟐.𝟐𝟓+𝟐.𝟓
= 𝟎. 𝟐𝟓 ( ) = 𝟎. 𝟓𝟐𝟕𝟕
𝟐.𝟐𝟓
∴ 𝑭 𝒓 𝒐 𝒎 (𝟏 ) 𝒚𝟏 = 𝒚(𝟐. 𝟐𝟓) = 𝒚 𝟎 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]
𝟏
= 𝟐 + (𝟎. 𝟓 + 𝟎. 𝟓𝟐𝟕𝟕) 𝟐. 𝟓𝟏𝟑𝟖
𝟐
=
Step 2: Finding 𝒚𝟐:
By R-K Method of second
order
𝒚 𝟐 = 𝒚𝟏 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]-----------(2)
= 𝟑. 𝟎𝟓𝟓𝟔
𝒌𝟐 = 𝒉 𝒇(𝒙𝟏, 𝒚𝟎 + 𝒌 𝟏 ) = 𝒉 𝒇(𝟎. 𝟏, 𝟐. 𝟐)
(Note:- 𝒙𝟏 = 𝟎. 𝟏 𝒂𝒏𝒅 𝒚𝟎 + 𝒌𝟏 = 𝟐 + 𝟎. 𝟐 = 𝟐. 𝟐)
= (𝟎. 𝟏)(𝟐. 𝟐 − 𝟎. 𝟏) = 𝟎. 𝟐𝟏
∴ 𝑭 𝒓 𝒐 𝒎 (𝟏 ) 𝒚𝟏 = 𝒚(𝟎. 𝟏) = 𝒚 𝟎+𝟐𝟏 [𝒌 𝟏+ 𝒌 ]
𝟐
𝟏
= 𝟐 + (𝟎. 𝟐 + 𝟎. 𝟐𝟏) 𝟐. 𝟐𝟎𝟓
𝟐
=
Step 2: Finding 𝒚𝟐:
By R-K Method of second
order
𝒚 𝟐 = 𝒚𝟏 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]-----------(2)
𝒌𝟐 = 𝒉 𝒇(𝒙𝟐, 𝒚𝟏 + 𝒌 𝟏 ) = 𝒉 𝒇(𝟎. 𝟐, 𝟐.
𝟒𝟏𝟓𝟓)
𝟎. 𝟐𝟐𝟏𝟓𝟓
= (𝟎. 𝟏(Note:- 𝒙𝟐 =
)(𝟐. 𝟒𝟏𝟓𝟓 − 𝟎𝟎..𝟐𝟐)𝒂𝒏𝒅
= 𝒚𝟏 + 𝒌𝟏 = 𝟐.
𝟐𝟎𝟓 + 𝟎. 𝟐𝟏𝟎𝟓 = 𝟐. 𝟒𝟏𝟓𝟓)
∴ 𝑭 𝒓 𝒐 𝒎 (𝟐 ) 𝒚𝟐 = 𝒚(𝟐. 𝟓) = 𝒚 𝟏 +𝟐𝟏 [𝒌𝟏 + 𝒌𝟐 ]
𝟏
= 𝟐. 𝟐𝟎𝟓 + [𝟎. 𝟐𝟏𝟎𝟓 + 𝟎. 𝟐𝟐𝟏𝟓𝟓]
𝟐
= 𝟐. 𝟒𝟐𝟏𝟎𝟐𝟓
We find 𝒚(𝒙𝟏), 𝒚(𝒙𝟐), 𝒚(𝒙𝟑), … … i.e., 𝒚𝟏, 𝒚𝟐, 𝒚𝟑, … etc, by using
Finding 𝒚𝟐:
In general for
Finding 𝒚𝒏:
𝟏
𝒚 𝒏 = 𝒚𝒏−𝟏 + [𝒌𝟏 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒]
𝟔
𝒉 𝒌𝟏
𝒘𝒉𝒆𝒓𝒆 𝒌 𝟐 = 𝒉 𝒇(𝒙 + )
𝒌𝟏 =𝒉 𝒇(𝒙 𝒏 −𝟏 , 𝒚 𝒏−𝟏 + 𝟐 , 𝒚𝒏−𝟏 𝟐
𝒏 −𝟏
), 𝒉 𝒌𝟐
𝒌 𝟑 = 𝒉 𝒇(𝒙 + ) 𝒌𝟒 = 𝒉 𝒇(𝒙𝒏, 𝒚𝒏−𝟏 + 𝒌 𝟑 )
𝒏−𝟏 + 𝟐 , 𝒚𝒏−𝟏 𝟐
𝒚 ′ = 𝒙𝟐 + 𝒚𝟐, 𝒚(𝟏) = 𝟏. 𝟓
𝟎. 𝟑𝟐𝟓
= (𝟎. 𝟏)(𝟏𝟐 + 𝟏. 𝟓 𝟐 ) =
𝒉 𝟎.𝟏 𝟎.𝟑𝟐𝟓
(Note: 𝒙𝟎 + 𝟐 = 𝟏 + 𝟐
= 𝟏. 𝟎𝟓, 𝒚𝟎 + 𝟐𝒌=
𝟏
𝟏. 𝟓 + 𝟐
= 𝟏. 𝟔𝟔𝟐𝟓)
= 𝟏. 𝟖𝟗𝟓𝟓
𝒉 𝟎.𝟏 𝟎.𝟒𝟖𝟎𝟑
(Note: 𝒙𝟏 + 𝟐 = 𝟏. 𝟏 + 𝟐
= 𝟏. 𝟏𝟓, 𝒚𝟏 + 𝟐𝒌=
𝟏
𝟏. 𝟖𝟗𝟓𝟓 + 𝟐
= 𝟐. 𝟏𝟑𝟓𝟔𝟓)
= 𝟐. 𝟓𝟎𝟒𝟑
Finding 𝒚𝟏:
𝟎. 𝟒
= (𝟎. 𝟐)(𝟏 × 𝟐) =
𝒉 𝟎.𝟐 𝒌𝟏 𝟎.𝟒
(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 𝒌𝟏 = 𝒉𝒇(𝒙𝟎, 𝒚 𝟎 )
= 𝒉 (𝒚𝟎−𝒙𝟎 )
𝒚𝟎+𝒙𝟎
= 𝟎. 𝟐 (𝟏− 𝟎
𝟏+𝟎
)
𝒌𝟏 = 𝟎. 𝟐
𝒌𝟐 = 𝒉𝒇(𝒙𝟎 + 𝒉, 𝒚𝟎 + 𝒌 𝟏 )
= 𝒉𝒇(𝟎 + 𝟎. 𝟐, 𝟏 + 𝟎. 𝟐)
𝟏.𝟐−𝟎.𝟐
=
= 𝒉𝒇
(𝟎(.𝟎𝟐. )𝟐, 𝟏. 𝟐) )
𝟏.𝟐+𝟎.𝟐
(
𝒌𝟐 = 𝟎. 𝟏𝟒𝟐9
𝒚𝟏 = 𝟏. 𝟏𝟕𝟏5
To find 𝒚𝟏 for 4th order of R-K method: 𝒙𝟎 = 𝟎 and 𝒚𝟎 =1
𝒌 }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
𝒚 , 𝒚(𝟎) = 𝟏
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.
dy
x y
b) Evaluate y (0.1), y (0.2) using Picard’s method for dx , y (0) =1.
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