Differential Equation
Differential Equation
Numerical Solution
to Engineering Problems
ORDINARY
DIFFERENTIAL EQUATION
COURSE OUTCOME 4:
Solve Ordinary Differential Equation
problems numerically when their
analytical solution is either not
available or difficult to obtain.
Ordinary Differential Equation
COURSE OUTCOME 4:
Solve Ordinary Differential Equation problems
numerically when their analytical solution is either
not available or difficult to obtain.
Ordinary Differential Equation
Differential Equations are one of the most important
mathematical tools used in producing models of
physical and biological processes.
𝑦 ′ 𝑥 = 𝑓 𝑥, 𝑦 𝑥 , 𝑥≥0
Ordinary Differential Equation
The simplest form of differential equation is
𝑦′ 𝑥 = 𝑓 𝑥
with 𝑓(𝑥) a given function. The general solution of this
equation is
𝑦 𝑥 = න 𝑓 𝑥 𝑑𝑥 + 𝑐
𝑌 ′ 𝑥 = 𝑓 𝑥, 𝑌 𝑥 , 𝑥0 ≤ 𝑥 ≤ 𝑏
𝑌 𝑥0 = 𝑌0
Ordinary Differential Equation
EULER’S METHOD
Numerical methods for solving the previous
Differential Equation will find an approximate
solution 𝑦(𝑥) at only a discrete set of nodes,
𝑥𝑛 = 𝑥0 + 𝑛ℎ, 𝑛 = 0,1,2, … , 𝑁
Ordinary Differential Equation
EULER’S METHOD
To derive Euler’s Method, recall the derivative
approximation we have previously,
′
1
𝑌 𝑥 ≈ 𝑌 𝑥 + ℎ − 𝑌(𝑥)
ℎ
Applying this to the initial value problem at 𝑥 = 𝑥𝑛 ,
𝑌 ′ 𝑥𝑛 = 𝑓(𝑥𝑛 , 𝑌 𝑥𝑛 )
we obtain
1
𝑌 𝑥𝑛+1 − 𝑌(𝑥𝑛 ) ≈ 𝑓(𝑥𝑛 , 𝑌 𝑥𝑛 )
ℎ
𝑌 𝑥𝑛+1 ≈ 𝑌 𝑥𝑛 + ℎ𝑓(𝑥𝑛 , 𝑌 𝑥𝑛 )
Ordinary Differential Equation
EULER’S METHOD
Thus, Euler’s Method is defined by taking this to be
exact:
1
𝑦𝑛+1 = 𝑦𝑛 + ℎ 𝑓 𝑥𝑛 , 𝑦𝑛 + 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ𝑓 𝑥𝑛 , 𝑦𝑛 )
2
Ordinary Differential Equation
Example
For the initial value problem
𝑑𝑦 𝑦 ln 𝑦
= , 𝑦 2 =𝑒
𝑑𝑥 𝑥