0% found this document useful (0 votes)
138 views

M8. Eulers Method For ODE

1) The document discusses Euler's method, a numerical method for approximating solutions to ordinary differential equations (ODEs) with initial value problems. 2) It provides an example of using Euler's method to solve the ODE dy/dx = -3x^3 + 14x^2 - 10x + 9, from x = 0 to x = 1 with a step size of 0.2. 3) The accuracy of Euler's method is assessed by comparing the numerical solutions to the true solutions obtained by integrating the ODE analytically. The percent errors are calculated and found to be generally low, below 4%.

Uploaded by

aisen agustin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views

M8. Eulers Method For ODE

1) The document discusses Euler's method, a numerical method for approximating solutions to ordinary differential equations (ODEs) with initial value problems. 2) It provides an example of using Euler's method to solve the ODE dy/dx = -3x^3 + 14x^2 - 10x + 9, from x = 0 to x = 1 with a step size of 0.2. 3) The accuracy of Euler's method is assessed by comparing the numerical solutions to the true solutions obtained by integrating the ODE analytically. The percent errors are calculated and found to be generally low, below 4%.

Uploaded by

aisen agustin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Title : Euler’s Method for ODE with initial value problem

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.

Euler’s Method of Analysis for an ODE with Initial Value Problem


Estimate of the slope at point (xi, yi) is expressed as a first derivative using
yi+1 = yi + f(xi, yi) h
where : h =Δx = step increment
Using the point-slope form the y value of the function can be estimated.

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

yi+1 = yi + f(xi, yi) h


yi+1 = yi + (-3x3+14x2-10x+9)0.2
y1 = 2.0 + (-3(0.2)3+14(0.2)2-10(0.2)+9) 0.2 = 3.5072
y2 = 3.5072 + (-3(0.4)3+14(0.4)2-10(0.4)+9) 0.2 = 4.9168
y3 = 4.9168 + (-3(0.6)3+14(0.6)2-10(0.6)+9) 0.2 = 6.3952
y4 = 6.3952 + (-3(0.8)3+14(0.8)2-10(0.8)+9) 0.2 = 8.0800
y5 = 8.0800 + (-3(1.0)3+14(1.0)2-10(1.0)+9) 0.2 = 10.0800

Euler’s Method for ODE with initial value problem page 1 of 3


2. Calculate the percent error
Analytical Solution using Integration
dy/dx = -3x3+14x2-10x+9
dy = (-3x3+14x2-10x+9)dx
∫dy = ∫(-3x3+14x2-10x+9)dx
y = -3x4/4 + 14x3/3 – 5x2 + 9x + C

apply the initial condition (at x = 0, y = 2)


C=2
y = -3x /4 + 14x3/3 – 5x2 + 9x + 2
4

x y (Euler's) y(Actual) %Error


0 2.0000 2.0000 0.00
0.2 3.5072 3.6361 3.55
0.4 4.9168 5.0795 3.20
0.6 6.3952 6.5108 1.78
0.8 8.0800 8.0821 0.03
1.0 10.0800 9.9167 1.65

y1 = -3(0.2)4/4 + 14(0.2)3/3 – 5(0.2)2 + 9(0.2) + 2 = 3.6361


y2 = -3(0.4)4/4 + 14(0.4)3/3 – 5(0.4)2 + 9(0.4) + 2 = 5.0795
y3 = -3(0.6)4/4 + 14(0.6)3/3 – 5(0.6)2 + 9(0.6) + 2 = 6.5108
y4 = -3(0.8)4/4 + 14(0.8)3/3 – 5(0.8)2 + 9(0.8) + 2 = 8.0821
y5 = -3(1.0)4/4 + 14(1.0)3/3 – 5(1.0)2 + 9(1.0) + 2 = 9.9167

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

Euler’s Method for ODE with initial value problem page 2 of 3


Self Assessment(Problem Set) :

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

2. Elementary Numerical Analysis 3rd Edition


Kendall Atkinson &Weimin Han, John Wiley and Sons c.2004

3. Numerical Methods for Engineers 5th Edition


Steven C. Chapra & Raymond P. Canale, McGraw Hill International Edition c.2006

Euler’s Method for ODE with initial value problem page 3 of 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy