Professional Documents
Culture Documents
TOPIC 5
DIFFERENTIAL EQUATION
At the end of this topic, students should be able to:
is a first derivative.
- A higher order equation.
ODEs for ENGINEERING
PROBLEM SOLVING
MATHEMATICAL BACKGROUND
A solution of an ODE is a specific function of the
independent variable and parameters that
satisfies the original differential equation. To
illustrate this concept, let us start with a given
function;
y = −0.5x4 + 4x3 − 10x2 + 8.5x + 1
yi+1
A new value of y is predicted using the slope (equal to
the first derivative at the original value of x) to yi
extrapolate linearly over the step size h.
=xi+h
EULER’S METHOD – Example 25.1
Use Euler’s method to numerically integrate this
equation; x y
dy
= −2 x 3 + 12 x 2 − 20 x + 8.5 0 1
dx
0.5 yi + 1 = yi + f(xi,yi)h
From x = 0 to x = 4 with a step size, h of 0.5.
The initial condition at x=0 is y=1. 1
1.5
yi +1 = yi + f ( xi , yi )h 2
𝑦𝑦𝑖𝑖+1 = 𝑦𝑦1 = 𝑦𝑦0.5 + 𝑓𝑓 𝑥𝑥0.5 , 𝑦𝑦0.5 ℎ 2.5
(𝑥𝑥𝑖𝑖 , 𝑦𝑦𝑖𝑖 ) = (0,1) ℎ = 0.5 = 5.25 + 𝑓𝑓 0.5,5.25 0.5
3
𝑓𝑓 𝑥𝑥𝑖𝑖 , 𝑦𝑦𝑖𝑖 = 𝑓𝑓 0,1 𝑓𝑓 0.5,5.25 = 3.5
= −2 0 3 + 12 0 2 − 20 0 + 8.5 = −2 0.5 3 + 12 0.5 2
− 20 0.5
+ 8.5 = 1.25 4
= 8.5
𝑦𝑦𝑖𝑖+1 = 𝒚𝒚𝟎𝟎.𝟓𝟓 = 1 + 8.5 0.5 = 𝟓𝟓. 𝟐𝟐𝟐𝟐 𝑦𝑦𝑖𝑖+1 = 𝒚𝒚𝟏𝟏 = 5.25 + 1.25 0.5 = 𝟓𝟓. 𝟖𝟖𝟖𝟖𝟖𝟖
EULER’S METHOD – Example 25.1
Use Euler’s method to numerically integrate this equation;
dy
= −2 x 3 + 12 x 2 − 20 x + 8.5
dx
From x = 0 to x = 4 with a step size of 0.5. The initial condition at x=0 is y=1.
EULER’S METHOD
The error can be reduced by
reducing the step size
x y
0 1
0.25 yi + 1 = yi + f(xi,yi)h
0.5
0.75
1
4
IMPROVEMENT OF EULER’S METHOD
The main assumption in Euler’s method is that the derivative at the beginning of the
interval is apply across the entire interval. This assumption is the main source of error.
ℎ
𝑦𝑦𝑚𝑚 = 𝑦𝑦𝑖𝑖+1/2 = 𝑦𝑦𝑖𝑖 + 𝑓𝑓(𝑥𝑥𝑖𝑖 , 𝑦𝑦𝑖𝑖 )
2
MODIFIED EULER’S METHOD
/MIDPOINT METHOD :Example
MODIFIED EULER’S METHOD
/MIDPOINT METHOD: Example
0.851
𝑦𝑦𝑖𝑖+1 = 𝑦𝑦𝑖𝑖 + 𝑓𝑓 𝑥𝑥𝑚𝑚 , 𝑦𝑦𝑚𝑚 ℎ
= 0.851
MODIFIED EULER’S METHOD
/MIDPOINT METHOD: Example
MODIFIED EULER’S METHOD /MIDPOINT METHOD: Example
Weekly homework
ECS555 – DEC 2016