M8. Eulers Method For ODE
M8. Eulers Method For ODE
Intended Learning Outcomes : At the end of this lesson, you should be able to :
1. Identify Ordinary Differential Equation(ODE) with Initial Value Problem
2. Approximate the required function in the ODE using the Euler’s Method Estimate
Discussions :
A differential equation(DE) has an order. A first-order DE has the highest derivative equal to
the first derivative (ex. y’ + 2y = 0). A second-order DE has the highest derivative equal to the
second derivative (ex. y’’ - 3y’ + K = 0).
A second-order DE can be reduced to a first-order DE using a substitution of variables.
Original DE : y’’ - 3y’ + K = 0
let t = y’ & t’ = y’’.
First-Order DE by substitution : t’ - 3t’ + K = 0
Several analytical methods can be employed to integrate the differential equation in order to
arrive at the general and specific solutions. In some instances, the DE can be approximated using
numerical methods.
Illustrative Problem
Use the Euler's Method to numerically integrate the function dy/dx = -3x3+14x2-10x+9
with an initial condition x = 0, y = 2 between x = 0 to x = 1 using step size h = 0.20.
Solution :
1. Prepare the table
x y (Euler's)
0 2.0000
0.2 3.5072
0.4 4.9168
0.6 6.3952
0.8 8.0800
1.0 10.0800
Euler's Method
12.0000
10.0000
8.0000
6.0000
4.0000
y(true)
2.0000 y(Euler's)
0.0000
0 0.2 0.4 0.6 0.8 1 1.2
P1. Use the Euler's Method to numerically integrate the function dy/dx = 3x3 - 5x from x =0 to x =
5 with h = 1. Initial condition at x = 0, y = 2. Calculate the percent error.
References :
1. Applied Numerical Methods with MATLAB for Engineers and Scientist
Steven C. Chapra, McGraw Hill International Edition c.2005