SlideShare a Scribd company logo
INITIAL VALUE PROBLEM
(FIRST ORDER DIFFERENTIAL EQUATIONS)
A differential equation equipped with initial values (or conditions) is
called an initial value problem.
A differential equation of first order is of the type
𝑑𝑦
𝑑𝑥
= 𝑓(𝑥, 𝑦).
INITIAL VALUE PROBLEM
(FIRST ORDER DIFFERENTIAL EQUATIONS)
A differential equation equipped with initial values (or conditions) is
called an initial value problem.
A differential equation of first order is of the type
𝑑𝑦
𝑑𝑥
= 𝑓(𝑥, 𝑦).
INITIAL VALUE PROBLEM
(FIRST ORDER DIFFERENTIAL EQUATIONS)
A differential equation equipped with initial values (or conditions) is
called an initial value problem.
A differential equation of first order is of the type
𝑑𝑦
𝑑𝑥
= 𝑓(𝑥, 𝑦).
INITIAL VALUE PROBLEM
(FIRST ORDER DIFFERENTIAL EQUATIONS)
A differential equation equipped with initial values (or conditions) is
called an initial value problem.
A differential equation of first order is of the type
𝑑𝑦
𝑑𝑥
= 𝑓(𝑥, 𝑦).
Numerical Methods Runge-Kutta by Ch.M.Verriyya Naidu is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
EULER’S METHOD
To solve a differential equation of first order of the type
𝑑𝑦
𝑑𝑥
= 𝑓 𝑥, 𝑦 , with initial
conditions 𝑦 𝑥0 = 𝑦0.
The method is used to find the values of 𝑦(𝑥) for different values of 𝑥 at equal
intervals. The length of the interval is ℎ, i.e. ℎ = 𝑥 𝑛+1 − 𝑥 𝑛.
In other words, 𝑥1 = 𝑥0 + ℎ, 𝑥2 = 𝑥1 + ℎ, 𝑥3= 𝑥2 + ℎ … etc.
Also 𝑦𝑛 is defined as 𝑦𝑛 = 𝑦 𝑥 𝑛 .
Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
ℎ will be provided or need to be chosen. Smaller the value of ℎ, more accurate is
the answer and less is the error committed.
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 =
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1
𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1
𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1 = 1 + 0.1 𝑥1 = 1 + (0.1)(0.1) = 1.01
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1
𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1 = 1 + 0.1 𝑥1 = 1 + (0.1)(0.1) = 1.01
𝑦3 = ??
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1
𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1 = 1 + 0.1 𝑥1 = 1 + (0.1)(0.1) = 1.01
𝑦3 = 1.03
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1
𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1 = 1 + 0.1 𝑥1 = 1 + (0.1)(0.1) = 1.01
𝑦3 = 1.03, 𝑦4 =1.06
Comparison
Actual solution of the differential equation is
𝑦 =
𝑥2
2
+ 1
n 𝑥 𝑛 𝑦𝑛
0 0 1
1 0.1 1.005
2 0.2 1.02
3 0.3 1.045
4 0.4 1.08
Comparison
Actual solution of the differential equation is
𝑦 =
𝑥2
2
+ 1
n 𝑥 𝑛 𝑦𝑛 (actual) 𝑦𝑛 (approx)
0 0 1 1
1 0.1 1.005 1
2 0.2 1.02 1.01
3 0.3 1.045 1.03
4 0.4 1.08 1.06
Comparison
Actual solution of the differential equation is
𝑦 =
𝑥2
2
+ 1
n 𝑥 𝑛 𝑦𝑛 (actual) 𝑦𝑛 (approx) % error
0 0 1 1 0
1 0.1 1.005 1 0.497512
2 0.2 1.02 1.01 0.980392
3 0.3 1.045 1.03 1.435407
4 0.4 1.08 1.06 1.851852
Problem 2
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.05 and find 𝑦 0.4 .
Problem 2
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.05 and find 𝑦 0.4 .
n 𝑥 𝑛 𝑦𝑛
0 0 1
1 0.05 1
2 0.1 1.0025
3 0.15 1.0075
4 0.2 1.015
5 0.25 1.025
6 0.3 1.0375
7 0.35 1.0525
8 0.4 1.07
Problem 2
Given
𝑑𝑦
𝑑𝑥
= 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.05 and find 𝑦 0.4 .
n 𝑥 𝑛 𝑦𝑛 (actual) 𝑦𝑛 (approx) % error
0 0 1 1 0
1 0.05 1.00125 1 0.124844
2 0.1 1.005 1.0025 0.248756
3 0.15 1.01125 1.0075 0.370828
4 0.2 1.02 1.015 0.490196
5 0.25 1.03125 1.025 0.606061
6 0.3 1.045 1.0375 0.717703
7 0.35 1.06125 1.0525 0.824499
8 0.4 1.08 1.07 0.925926
Problem 3
Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and
find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ?
Problem 3
Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and
find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ?
Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0
Problem 3
Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and
find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ?
Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0
n 𝑥 𝑛 𝑦𝑛
0 0 0
1 0.01
2 0.02
3 0.03
4 0.04
Problem 3
Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and
find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ?
Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0
n 𝑥 𝑛 𝑦𝑛
0 0 0
1 0.01 0.01
2 0.02
3 0.03
4 0.04
Problem 3
Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and
find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ?
Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0
n 𝑥 𝑛 𝑦𝑛
0 0 0
1 0.01 0.01
2 0.02 0.020192
3 0.03
4 0.04
Problem 3
Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and
find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ?
Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0
n 𝑥 𝑛 𝑦𝑛
0 0 0
1 0.01 0.01
2 0.02 0.020192
3 0.03 0.030557
4 0.04 0.041077
Comparison
Actual solution of the differential equation is
𝑦 = 1 +
1
2
𝑒−4𝑥
−
3
2
𝑒−2𝑥
n 𝑥 𝑛 𝑦𝑛 (actual)
0 0 0
1 0.01 0.010097
2 0.02 0.020374
3 0.03 0.030813
4 0.04 0.041397
Comparison
Actual solution of the differential equation is
𝑦 = 1 +
1
2
𝑒−4𝑥
−
3
2
𝑒−2𝑥
n 𝑥 𝑛 𝑦𝑛 (approx) 𝑦𝑛 (actual) % error
0 0 0 0
1 0.01 0.01 0.010097 0.957833
2 0.02 0.020192 0.020374 0.892847
3 0.03 0.030557 0.030813 0.831839
4 0.04 0.041077 0.041397 0.774497
Problem 4
Given 𝑥 + 1 𝑑𝑦 = 𝑦 − 1 𝑑𝑥, with initial conditions 𝑦 0.5 = 2.5. Choose ℎ = 0.025
and find 𝑦 0.6 . Compare with the exact value of 𝑦 0.6 .
Problem 4
Given 𝑥 + 1 𝑑𝑦 = 𝑦 − 1 𝑑𝑥, with initial conditions 𝑦 0.5 = 2.5. Choose ℎ = 0.025
and find 𝑦 0.6 . Compare with the exact value of 𝑦 0.6 .
Here 𝑓 𝑥, 𝑦 = , 𝑥0 = , 𝑦0 =
Problem 4
Given 𝑥 + 1 𝑑𝑦 = 𝑦 − 1 𝑑𝑥, with initial conditions 𝑦 0.5 = 2.5. Choose ℎ = 0.025
and find 𝑦 0.6 . Compare with the exact value of 𝑦 0.6 .
Here 𝑓 𝑥, 𝑦 =
𝑦−1
𝑥+1
, 𝑥0 = 0.5, 𝑦0 = 2.5
Problem 4
Given 𝑥 + 1 𝑑𝑦 = 𝑦 − 1 𝑑𝑥, with initial conditions 𝑦 0.5 = 2.5. Choose ℎ = 0.025
and find 𝑦 0.6 . Compare with the exact value of 𝑦 0.6 .
Here 𝑓 𝑥, 𝑦 =
𝑦−1
𝑥+1
, 𝑥0 = 0.5, 𝑦0 = 2.5
n 𝑥 𝑛 𝑦𝑛 (approx)
𝑦𝑛 = 𝑥 𝑛 + 2
(actual) % error
0 0.5 2.5 2.5 0
1 0.525 2.525 2.525 0
2 0.55 2.55 2.55 0
3 0.575 2.575 2.575 0
4 0.6 2.6 2.6 0
RUNGE-KUTTA’S METHOD
1. Second order
𝑦 𝑛+1 = 𝑦𝑛 +
1
2
𝑘1 + 𝑘2
where 𝑘1 = ℎ𝑓 𝑥 𝑛, 𝑦𝑛
𝑘2 = ℎ𝑓 𝑥 𝑛 + ℎ, 𝑦𝑛 + 𝑘1
2. Fourth order
𝑦 𝑛+1 = 𝑦𝑛 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥 𝑛, 𝑦𝑛
𝑘2 = ℎ𝑓 𝑥 𝑛 +
ℎ
2
, 𝑦𝑛 +
𝑘1
2
𝑘3 = ℎ𝑓 𝑥 𝑛 +
ℎ
2
, 𝑦𝑛 +
𝑘2
2
𝑘4 = ℎ𝑓 𝑥 𝑛 + ℎ, 𝑦𝑛 + 𝑘3
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get
𝑦1 = 𝑦0 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get
𝑦1 = 𝑦0 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get
𝑦1 = 𝑦0 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1
𝑘2 = ℎ𝑓 𝑥0 +
ℎ
2
, 𝑦0 +
𝑘1
2
= 0.1 0.05 + 1.05 = 0.11
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get
𝑦1 = 𝑦0 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1
𝑘2 = ℎ𝑓 𝑥0 +
ℎ
2
, 𝑦0 +
𝑘1
2
= 0.1 0.05 + 1.05 = 0.11
𝑘3 = ℎ𝑓 𝑥0 +
ℎ
2
, 𝑦0 +
𝑘2
2
= 0.1 0.05 + 1.055 = 0.1105
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get
𝑦1 = 𝑦0 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1
𝑘2 = ℎ𝑓 𝑥0 +
ℎ
2
, 𝑦0 +
𝑘1
2
= 0.1 0.05 + 1.05 = 0.11
𝑘3 = ℎ𝑓 𝑥0 +
ℎ
2
, 𝑦0 +
𝑘2
2
= 0.1 0.05 + 1.055 = 0.1105
𝑘4 = ℎ𝑓 𝑥0 + ℎ, 𝑦0 + 𝑘3 = 0.1 0.1 + 1.1105 = 0.12105
Problem 1
Given
𝑑𝑦
𝑑𝑥
= 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find
𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get
𝑦1 = 𝑦0 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1
𝑘2 = ℎ𝑓 𝑥0 +
ℎ
2
, 𝑦0 +
𝑘1
2
= 0.1 0.05 + 1.05 = 0.11
𝑘3 = ℎ𝑓 𝑥0 +
ℎ
2
, 𝑦0 +
𝑘2
2
= 0.1 0.05 + 1.055 = 0.1105
𝑘4 = ℎ𝑓 𝑥0 + ℎ, 𝑦0 + 𝑘3 = 0.1 0.1 + 1.1105 = 0.12105
𝑦 0.1 = 𝑦1 = 1 +
1
6
0.1 + 0.22 + 0.221 + 0.12105 =1.11034
Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get
𝑦2 = 𝑦1 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get
𝑦2 = 𝑦1 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103
Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get
𝑦2 = 𝑦1 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103
𝑘2 = ℎ𝑓 𝑥1 +
ℎ
2
, 𝑦1 +
𝑘1
2
= 0.13208
Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get
𝑦2 = 𝑦1 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103
𝑘2 = ℎ𝑓 𝑥1 +
ℎ
2
, 𝑦1 +
𝑘1
2
= 0.13208
𝑘3 = ℎ𝑓 𝑥1 +
ℎ
2
, 𝑦1 +
𝑘2
2
= 0.13263
𝑘4 = ℎ𝑓 𝑥1 + ℎ, 𝑦1 + 𝑘3 = 0.14429
Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get
𝑦2 = 𝑦1 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103
𝑘2 = ℎ𝑓 𝑥1 +
ℎ
2
, 𝑦1 +
𝑘1
2
= 0.13208
𝑘3 = ℎ𝑓 𝑥1 +
ℎ
2
, 𝑦1 +
𝑘2
2
= 0.13263
𝑘4 = ℎ𝑓 𝑥1 + ℎ, 𝑦1 + 𝑘3 = 0.14429
𝑦 0.2 = 𝑦2 = 1.2428
Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get
𝑦2 = 𝑦1 +
1
6
𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103
𝑘2 = ℎ𝑓 𝑥1 +
ℎ
2
, 𝑦1 +
𝑘1
2
= 0.13208
𝑘3 = ℎ𝑓 𝑥1 +
ℎ
2
, 𝑦1 +
𝑘2
2
= 0.13263
𝑘4 = ℎ𝑓 𝑥1 + ℎ, 𝑦1 + 𝑘3 = 0.14429
𝑦 0.2 = 𝑦2 = 1.2428
𝑛 = 2 will give 𝑦 0.3 = 1.399711
𝑘1 = 0.14428, 𝑘2 = 0.156494, 𝑘3 = 0.157105, 𝑘4 = 0.169990

More Related Content

What's hot

Finite difference method
Finite difference methodFinite difference method
Finite difference method
Divyansh Verma
 
Runge-Kutta methods with examples
Runge-Kutta methods with examplesRunge-Kutta methods with examples
Runge-Kutta methods with examples
Sajjad Hossain
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference method
Prateek Jha
 
Newton's Backward Interpolation Formula with Example
Newton's Backward Interpolation Formula with ExampleNewton's Backward Interpolation Formula with Example
Newton's Backward Interpolation Formula with Example
MuhammadUsmanIkram2
 
Taylors series
Taylors series Taylors series
Taylors series
DN Vaisnavi
 
Euler's Method
Euler's MethodEuler's Method
Euler's Method
dmidgette
 
Numerical solution of ordinary differential equation
Numerical solution of ordinary differential equationNumerical solution of ordinary differential equation
Numerical solution of ordinary differential equation
Dixi Patel
 
Numerical solution of ordinary differential equations GTU CVNM PPT
Numerical solution of ordinary differential equations GTU CVNM PPTNumerical solution of ordinary differential equations GTU CVNM PPT
Numerical solution of ordinary differential equations GTU CVNM PPT
Panchal Anand
 
Jacobi method
Jacobi methodJacobi method
Jacobi method
Grishma Maravia
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2
Asad Ali
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
Mukuldev Khunte
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equation
DnyaneshwarPardeshi1
 
Fixed point iteration
Fixed point iterationFixed point iteration
Fixed point iteration
Isaac Yowetu
 
Partial differential equations
Partial differential equationsPartial differential equations
Partial differential equations
aman1894
 
numerical methods
numerical methodsnumerical methods
numerical methods
HaiderParekh1
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation
Meet Patel
 
Series solution to ordinary differential equations
Series solution to ordinary differential equations Series solution to ordinary differential equations
Series solution to ordinary differential equations
University of Windsor
 

What's hot (20)

Finite difference method
Finite difference methodFinite difference method
Finite difference method
 
Runge-Kutta methods with examples
Runge-Kutta methods with examplesRunge-Kutta methods with examples
Runge-Kutta methods with examples
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference method
 
Numerical method
Numerical methodNumerical method
Numerical method
 
Newton's Backward Interpolation Formula with Example
Newton's Backward Interpolation Formula with ExampleNewton's Backward Interpolation Formula with Example
Newton's Backward Interpolation Formula with Example
 
Taylors series
Taylors series Taylors series
Taylors series
 
Euler's Method
Euler's MethodEuler's Method
Euler's Method
 
Numerical solution of ordinary differential equation
Numerical solution of ordinary differential equationNumerical solution of ordinary differential equation
Numerical solution of ordinary differential equation
 
newton raphson method
newton raphson methodnewton raphson method
newton raphson method
 
Numerical solution of ordinary differential equations GTU CVNM PPT
Numerical solution of ordinary differential equations GTU CVNM PPTNumerical solution of ordinary differential equations GTU CVNM PPT
Numerical solution of ordinary differential equations GTU CVNM PPT
 
Jacobi method
Jacobi methodJacobi method
Jacobi method
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equation
 
Fixed point iteration
Fixed point iterationFixed point iteration
Fixed point iteration
 
Partial differential equations
Partial differential equationsPartial differential equations
Partial differential equations
 
Gauss sediel
Gauss sedielGauss sediel
Gauss sediel
 
numerical methods
numerical methodsnumerical methods
numerical methods
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation
 
Series solution to ordinary differential equations
Series solution to ordinary differential equations Series solution to ordinary differential equations
Series solution to ordinary differential equations
 

Similar to Euler and runge kutta method

Study Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential EquationsStudy Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential Equations
Meenakshisundaram N
 
Ecuaciones lineales de orden superior
Ecuaciones lineales de orden superiorEcuaciones lineales de orden superior
Ecuaciones lineales de orden superior
mariarivas114
 
Lecture-1-Mech.pptx . .
Lecture-1-Mech.pptx                   . .Lecture-1-Mech.pptx                   . .
Lecture-1-Mech.pptx . .
happycocoman
 
Runge - Kutta Method of fourth order.pptx
Runge - Kutta Method of fourth order.pptxRunge - Kutta Method of fourth order.pptx
Runge - Kutta Method of fourth order.pptx
SoyaMathew1
 
Functions of severable variables
Functions of severable variablesFunctions of severable variables
Functions of severable variables
Santhanam Krishnan
 
MT102 Лекц 10
MT102 Лекц 10MT102 Лекц 10
MT102 Лекц 10
ssuser184df1
 
MATRICES AND CALCULUS.pptx
MATRICES AND CALCULUS.pptxMATRICES AND CALCULUS.pptx
MATRICES AND CALCULUS.pptx
massm99m
 
Euler's and picard's
Euler's and picard'sEuler's and picard's
Euler's and picard's
Manikanta satyala
 
Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method  Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method
AMINULISLAM439
 
Gauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan methodGauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan method
Naimesh Bhavsar
 
odes1.pptx
odes1.pptxodes1.pptx
odes1.pptx
YashniGopal1
 
내적의 이해.pdf
내적의 이해.pdf내적의 이해.pdf
내적의 이해.pdf
Lee Dustin
 
numericai matmatic matlab uygulamalar ali abdullah
numericai matmatic  matlab  uygulamalar ali abdullahnumericai matmatic  matlab  uygulamalar ali abdullah
numericai matmatic matlab uygulamalar ali abdullah
Ali Abdullah
 
Ch9 SL3 ODE-BVP.pptx
Ch9 SL3 ODE-BVP.pptxCh9 SL3 ODE-BVP.pptx
Ch9 SL3 ODE-BVP.pptx
ReelsShortVideo
 
Комплекс тоо цуврал хичээл-2
Комплекс тоо цуврал хичээл-2Комплекс тоо цуврал хичээл-2
Комплекс тоо цуврал хичээл-2
Март
 
MTK KELAS X SEMS 1.pptx
MTK KELAS X SEMS 1.pptxMTK KELAS X SEMS 1.pptx
MTK KELAS X SEMS 1.pptx
HestiNovianti1
 
Solving First Derivative Equation
Solving First Derivative EquationSolving First Derivative Equation
Solving First Derivative Equation
Aulia Khalqillah
 
Scalars and Vectors Part4
Scalars and Vectors Part4Scalars and Vectors Part4
Scalars and Vectors Part4
UdayKhanal
 

Similar to Euler and runge kutta method (20)

Study Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential EquationsStudy Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential Equations
 
Ecuaciones lineales de orden superior
Ecuaciones lineales de orden superiorEcuaciones lineales de orden superior
Ecuaciones lineales de orden superior
 
Lecture-1-Mech.pptx . .
Lecture-1-Mech.pptx                   . .Lecture-1-Mech.pptx                   . .
Lecture-1-Mech.pptx . .
 
Runge - Kutta Method of fourth order.pptx
Runge - Kutta Method of fourth order.pptxRunge - Kutta Method of fourth order.pptx
Runge - Kutta Method of fourth order.pptx
 
Functions of severable variables
Functions of severable variablesFunctions of severable variables
Functions of severable variables
 
MT102 Лекц 10
MT102 Лекц 10MT102 Лекц 10
MT102 Лекц 10
 
MATRICES AND CALCULUS.pptx
MATRICES AND CALCULUS.pptxMATRICES AND CALCULUS.pptx
MATRICES AND CALCULUS.pptx
 
Euler's and picard's
Euler's and picard'sEuler's and picard's
Euler's and picard's
 
Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method  Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method
 
Gauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan methodGauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan method
 
odes1.pptx
odes1.pptxodes1.pptx
odes1.pptx
 
내적의 이해.pdf
내적의 이해.pdf내적의 이해.pdf
내적의 이해.pdf
 
doc
docdoc
doc
 
numericai matmatic matlab uygulamalar ali abdullah
numericai matmatic  matlab  uygulamalar ali abdullahnumericai matmatic  matlab  uygulamalar ali abdullah
numericai matmatic matlab uygulamalar ali abdullah
 
Ch9 SL3 ODE-BVP.pptx
Ch9 SL3 ODE-BVP.pptxCh9 SL3 ODE-BVP.pptx
Ch9 SL3 ODE-BVP.pptx
 
Computational Dynamics edited
Computational Dynamics editedComputational Dynamics edited
Computational Dynamics edited
 
Комплекс тоо цуврал хичээл-2
Комплекс тоо цуврал хичээл-2Комплекс тоо цуврал хичээл-2
Комплекс тоо цуврал хичээл-2
 
MTK KELAS X SEMS 1.pptx
MTK KELAS X SEMS 1.pptxMTK KELAS X SEMS 1.pptx
MTK KELAS X SEMS 1.pptx
 
Solving First Derivative Equation
Solving First Derivative EquationSolving First Derivative Equation
Solving First Derivative Equation
 
Scalars and Vectors Part4
Scalars and Vectors Part4Scalars and Vectors Part4
Scalars and Vectors Part4
 

Recently uploaded

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 

Recently uploaded (20)

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 

Euler and runge kutta method

  • 1. INITIAL VALUE PROBLEM (FIRST ORDER DIFFERENTIAL EQUATIONS) A differential equation equipped with initial values (or conditions) is called an initial value problem. A differential equation of first order is of the type 𝑑𝑦 𝑑𝑥 = 𝑓(𝑥, 𝑦).
  • 2. INITIAL VALUE PROBLEM (FIRST ORDER DIFFERENTIAL EQUATIONS) A differential equation equipped with initial values (or conditions) is called an initial value problem. A differential equation of first order is of the type 𝑑𝑦 𝑑𝑥 = 𝑓(𝑥, 𝑦).
  • 3. INITIAL VALUE PROBLEM (FIRST ORDER DIFFERENTIAL EQUATIONS) A differential equation equipped with initial values (or conditions) is called an initial value problem. A differential equation of first order is of the type 𝑑𝑦 𝑑𝑥 = 𝑓(𝑥, 𝑦).
  • 4. INITIAL VALUE PROBLEM (FIRST ORDER DIFFERENTIAL EQUATIONS) A differential equation equipped with initial values (or conditions) is called an initial value problem. A differential equation of first order is of the type 𝑑𝑦 𝑑𝑥 = 𝑓(𝑥, 𝑦). Numerical Methods Runge-Kutta by Ch.M.Verriyya Naidu is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
  • 5. EULER’S METHOD To solve a differential equation of first order of the type 𝑑𝑦 𝑑𝑥 = 𝑓 𝑥, 𝑦 , with initial conditions 𝑦 𝑥0 = 𝑦0. The method is used to find the values of 𝑦(𝑥) for different values of 𝑥 at equal intervals. The length of the interval is ℎ, i.e. ℎ = 𝑥 𝑛+1 − 𝑥 𝑛. In other words, 𝑥1 = 𝑥0 + ℎ, 𝑥2 = 𝑥1 + ℎ, 𝑥3= 𝑥2 + ℎ … etc. Also 𝑦𝑛 is defined as 𝑦𝑛 = 𝑦 𝑥 𝑛 . Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛) ℎ will be provided or need to be chosen. Smaller the value of ℎ, more accurate is the answer and less is the error committed.
  • 6. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 .
  • 7. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1
  • 8. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1 𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4
  • 9. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1 𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4 Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛) 𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 =
  • 10. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1 𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4 Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛) 𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0
  • 11. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1 𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4 Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛) 𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1 𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1
  • 12. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1 𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4 Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛) 𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1 𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1 = 1 + 0.1 𝑥1 = 1 + (0.1)(0.1) = 1.01
  • 13. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1 𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4 Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛) 𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1 𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1 = 1 + 0.1 𝑥1 = 1 + (0.1)(0.1) = 1.01 𝑦3 = ??
  • 14. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1 𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4 Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛) 𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1 𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1 = 1 + 0.1 𝑥1 = 1 + (0.1)(0.1) = 1.01 𝑦3 = 1.03
  • 15. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 , 𝑦 0.3 and 𝑦 0.4 . Here 𝑓 𝑥, 𝑦 = 𝑥, 𝑥0 = 0, 𝑦0 = 1 𝑥1 = 𝑥0 + ℎ = 0 + 0.1 = 0.1, 𝑥2 = 𝑥1 + ℎ = 0.2, 𝑥3= 𝑥2 + ℎ = 0.3, 𝑥4 = 0.4 Using Euler’s Method: 𝑦 𝑥 𝑛+1 𝑖. 𝑒. 𝑦 𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥 𝑛, 𝑦𝑛) 𝑦1 = 𝑦0 + ℎ𝑓 𝑥0, 𝑦0 = 1 + 0.1 𝑥0 = 1 + 0 = 1 𝑦2 = 𝑦1 + ℎ𝑓 𝑥1, 𝑦1 = 1 + 0.1 𝑥1 = 1 + (0.1)(0.1) = 1.01 𝑦3 = 1.03, 𝑦4 =1.06
  • 16. Comparison Actual solution of the differential equation is 𝑦 = 𝑥2 2 + 1 n 𝑥 𝑛 𝑦𝑛 0 0 1 1 0.1 1.005 2 0.2 1.02 3 0.3 1.045 4 0.4 1.08
  • 17. Comparison Actual solution of the differential equation is 𝑦 = 𝑥2 2 + 1 n 𝑥 𝑛 𝑦𝑛 (actual) 𝑦𝑛 (approx) 0 0 1 1 1 0.1 1.005 1 2 0.2 1.02 1.01 3 0.3 1.045 1.03 4 0.4 1.08 1.06
  • 18. Comparison Actual solution of the differential equation is 𝑦 = 𝑥2 2 + 1 n 𝑥 𝑛 𝑦𝑛 (actual) 𝑦𝑛 (approx) % error 0 0 1 1 0 1 0.1 1.005 1 0.497512 2 0.2 1.02 1.01 0.980392 3 0.3 1.045 1.03 1.435407 4 0.4 1.08 1.06 1.851852
  • 19. Problem 2 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.05 and find 𝑦 0.4 .
  • 20. Problem 2 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.05 and find 𝑦 0.4 . n 𝑥 𝑛 𝑦𝑛 0 0 1 1 0.05 1 2 0.1 1.0025 3 0.15 1.0075 4 0.2 1.015 5 0.25 1.025 6 0.3 1.0375 7 0.35 1.0525 8 0.4 1.07
  • 21. Problem 2 Given 𝑑𝑦 𝑑𝑥 = 𝑥, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.05 and find 𝑦 0.4 . n 𝑥 𝑛 𝑦𝑛 (actual) 𝑦𝑛 (approx) % error 0 0 1 1 0 1 0.05 1.00125 1 0.124844 2 0.1 1.005 1.0025 0.248756 3 0.15 1.01125 1.0075 0.370828 4 0.2 1.02 1.015 0.490196 5 0.25 1.03125 1.025 0.606061 6 0.3 1.045 1.0375 0.717703 7 0.35 1.06125 1.0525 0.824499 8 0.4 1.08 1.07 0.925926
  • 22. Problem 3 Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ?
  • 23. Problem 3 Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ? Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0
  • 24. Problem 3 Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ? Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0 n 𝑥 𝑛 𝑦𝑛 0 0 0 1 0.01 2 0.02 3 0.03 4 0.04
  • 25. Problem 3 Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ? Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0 n 𝑥 𝑛 𝑦𝑛 0 0 0 1 0.01 0.01 2 0.02 3 0.03 4 0.04
  • 26. Problem 3 Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ? Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0 n 𝑥 𝑛 𝑦𝑛 0 0 0 1 0.01 0.01 2 0.02 0.020192 3 0.03 4 0.04
  • 27. Problem 3 Given 𝑦′ + 2𝑦 = 2 − 𝑒−4𝑥, with initial conditions 𝑦 0 = 0. Choose ℎ = 0.01 and find 𝑦 0.04 . What is the exact value of 𝑦 0.04 ? Here 𝑓 𝑥, 𝑦 = 2 − 2𝑦 − 𝑒−4𝑥, 𝑥0 = 0, 𝑦0 =0 n 𝑥 𝑛 𝑦𝑛 0 0 0 1 0.01 0.01 2 0.02 0.020192 3 0.03 0.030557 4 0.04 0.041077
  • 28. Comparison Actual solution of the differential equation is 𝑦 = 1 + 1 2 𝑒−4𝑥 − 3 2 𝑒−2𝑥 n 𝑥 𝑛 𝑦𝑛 (actual) 0 0 0 1 0.01 0.010097 2 0.02 0.020374 3 0.03 0.030813 4 0.04 0.041397
  • 29. Comparison Actual solution of the differential equation is 𝑦 = 1 + 1 2 𝑒−4𝑥 − 3 2 𝑒−2𝑥 n 𝑥 𝑛 𝑦𝑛 (approx) 𝑦𝑛 (actual) % error 0 0 0 0 1 0.01 0.01 0.010097 0.957833 2 0.02 0.020192 0.020374 0.892847 3 0.03 0.030557 0.030813 0.831839 4 0.04 0.041077 0.041397 0.774497
  • 30. Problem 4 Given 𝑥 + 1 𝑑𝑦 = 𝑦 − 1 𝑑𝑥, with initial conditions 𝑦 0.5 = 2.5. Choose ℎ = 0.025 and find 𝑦 0.6 . Compare with the exact value of 𝑦 0.6 .
  • 31. Problem 4 Given 𝑥 + 1 𝑑𝑦 = 𝑦 − 1 𝑑𝑥, with initial conditions 𝑦 0.5 = 2.5. Choose ℎ = 0.025 and find 𝑦 0.6 . Compare with the exact value of 𝑦 0.6 . Here 𝑓 𝑥, 𝑦 = , 𝑥0 = , 𝑦0 =
  • 32. Problem 4 Given 𝑥 + 1 𝑑𝑦 = 𝑦 − 1 𝑑𝑥, with initial conditions 𝑦 0.5 = 2.5. Choose ℎ = 0.025 and find 𝑦 0.6 . Compare with the exact value of 𝑦 0.6 . Here 𝑓 𝑥, 𝑦 = 𝑦−1 𝑥+1 , 𝑥0 = 0.5, 𝑦0 = 2.5
  • 33. Problem 4 Given 𝑥 + 1 𝑑𝑦 = 𝑦 − 1 𝑑𝑥, with initial conditions 𝑦 0.5 = 2.5. Choose ℎ = 0.025 and find 𝑦 0.6 . Compare with the exact value of 𝑦 0.6 . Here 𝑓 𝑥, 𝑦 = 𝑦−1 𝑥+1 , 𝑥0 = 0.5, 𝑦0 = 2.5 n 𝑥 𝑛 𝑦𝑛 (approx) 𝑦𝑛 = 𝑥 𝑛 + 2 (actual) % error 0 0.5 2.5 2.5 0 1 0.525 2.525 2.525 0 2 0.55 2.55 2.55 0 3 0.575 2.575 2.575 0 4 0.6 2.6 2.6 0
  • 34. RUNGE-KUTTA’S METHOD 1. Second order 𝑦 𝑛+1 = 𝑦𝑛 + 1 2 𝑘1 + 𝑘2 where 𝑘1 = ℎ𝑓 𝑥 𝑛, 𝑦𝑛 𝑘2 = ℎ𝑓 𝑥 𝑛 + ℎ, 𝑦𝑛 + 𝑘1 2. Fourth order 𝑦 𝑛+1 = 𝑦𝑛 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥 𝑛, 𝑦𝑛 𝑘2 = ℎ𝑓 𝑥 𝑛 + ℎ 2 , 𝑦𝑛 + 𝑘1 2 𝑘3 = ℎ𝑓 𝑥 𝑛 + ℎ 2 , 𝑦𝑛 + 𝑘2 2 𝑘4 = ℎ𝑓 𝑥 𝑛 + ℎ, 𝑦𝑛 + 𝑘3
  • 35. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order.
  • 36. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order. Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get
  • 37. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order. Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get 𝑦1 = 𝑦0 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
  • 38. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order. Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get 𝑦1 = 𝑦0 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1
  • 39. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order. Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get 𝑦1 = 𝑦0 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1 𝑘2 = ℎ𝑓 𝑥0 + ℎ 2 , 𝑦0 + 𝑘1 2 = 0.1 0.05 + 1.05 = 0.11
  • 40. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order. Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get 𝑦1 = 𝑦0 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1 𝑘2 = ℎ𝑓 𝑥0 + ℎ 2 , 𝑦0 + 𝑘1 2 = 0.1 0.05 + 1.05 = 0.11 𝑘3 = ℎ𝑓 𝑥0 + ℎ 2 , 𝑦0 + 𝑘2 2 = 0.1 0.05 + 1.055 = 0.1105
  • 41. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order. Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get 𝑦1 = 𝑦0 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1 𝑘2 = ℎ𝑓 𝑥0 + ℎ 2 , 𝑦0 + 𝑘1 2 = 0.1 0.05 + 1.05 = 0.11 𝑘3 = ℎ𝑓 𝑥0 + ℎ 2 , 𝑦0 + 𝑘2 2 = 0.1 0.05 + 1.055 = 0.1105 𝑘4 = ℎ𝑓 𝑥0 + ℎ, 𝑦0 + 𝑘3 = 0.1 0.1 + 1.1105 = 0.12105
  • 42. Problem 1 Given 𝑑𝑦 𝑑𝑥 = 𝑥 + 𝑦, with initial conditions 𝑦 0 = 1. Choose ℎ = 0.1 and find 𝑦 0.1 , 𝑦 0.2 and 𝑦 0.3 using Runge-Kutta’s method of fourth order. Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get 𝑦1 = 𝑦0 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0.1 0 + 1 = 0.1 𝑘2 = ℎ𝑓 𝑥0 + ℎ 2 , 𝑦0 + 𝑘1 2 = 0.1 0.05 + 1.05 = 0.11 𝑘3 = ℎ𝑓 𝑥0 + ℎ 2 , 𝑦0 + 𝑘2 2 = 0.1 0.05 + 1.055 = 0.1105 𝑘4 = ℎ𝑓 𝑥0 + ℎ, 𝑦0 + 𝑘3 = 0.1 0.1 + 1.1105 = 0.12105 𝑦 0.1 = 𝑦1 = 1 + 1 6 0.1 + 0.22 + 0.221 + 0.12105 =1.11034
  • 43. Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get 𝑦2 = 𝑦1 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
  • 44. Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get 𝑦2 = 𝑦1 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103
  • 45. Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get 𝑦2 = 𝑦1 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103 𝑘2 = ℎ𝑓 𝑥1 + ℎ 2 , 𝑦1 + 𝑘1 2 = 0.13208
  • 46. Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get 𝑦2 = 𝑦1 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103 𝑘2 = ℎ𝑓 𝑥1 + ℎ 2 , 𝑦1 + 𝑘1 2 = 0.13208 𝑘3 = ℎ𝑓 𝑥1 + ℎ 2 , 𝑦1 + 𝑘2 2 = 0.13263 𝑘4 = ℎ𝑓 𝑥1 + ℎ, 𝑦1 + 𝑘3 = 0.14429
  • 47. Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get 𝑦2 = 𝑦1 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103 𝑘2 = ℎ𝑓 𝑥1 + ℎ 2 , 𝑦1 + 𝑘1 2 = 0.13208 𝑘3 = ℎ𝑓 𝑥1 + ℎ 2 , 𝑦1 + 𝑘2 2 = 0.13263 𝑘4 = ℎ𝑓 𝑥1 + ℎ, 𝑦1 + 𝑘3 = 0.14429 𝑦 0.2 = 𝑦2 = 1.2428
  • 48. Putting 𝑛 = 1 in Runge-Kutta’s formula for fourth order, we get 𝑦2 = 𝑦1 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥1, 𝑦1 = 0.1 0.1 + 1.11034 = 0.12103 𝑘2 = ℎ𝑓 𝑥1 + ℎ 2 , 𝑦1 + 𝑘1 2 = 0.13208 𝑘3 = ℎ𝑓 𝑥1 + ℎ 2 , 𝑦1 + 𝑘2 2 = 0.13263 𝑘4 = ℎ𝑓 𝑥1 + ℎ, 𝑦1 + 𝑘3 = 0.14429 𝑦 0.2 = 𝑦2 = 1.2428 𝑛 = 2 will give 𝑦 0.3 = 1.399711 𝑘1 = 0.14428, 𝑘2 = 0.156494, 𝑘3 = 0.157105, 𝑘4 = 0.169990