EULER’S METHODINTERACTIVE E-BOOK |
Ordinary Differential Equations |
MAJORGENERAL |
On non Internet Explorer
browsers, the equations may not show up.
As an alternative or if you
prefer,
you can see the pdf version of the ebook instead
Title |
An interactive e-book for illustrating Euler’s Method of solving ordinary differential equations |
|
Creator |
Autar K Kaw |
|
Subject and Keywords |
Euler’s Method, Ordinary Differential Equations, Mathcad, Maple, Mathematica, Matlab, Simulations. |
|
Description |
This is an interactive E-book for illustrating Euler’s Method for solving ordinary differential equations. It includes links to examples, simulations in Mathcad, Maple, Mathematica, and Matlab for the algorithm, convergence, and a PowerPoint presentation. |
|
Publisher |
Holistic Numerical Methods Institute, |
|
Contributors |
Autar Kaw |
|
Format |
Text/HTML |
|
Last Revised |
May 4, 2006 |
|
Identifier |
http://numericalmethods.eng.usf.edu/ebooks/euler_08dif_ebook.pdf |
|
Language |
English |
|
Rights |
|
What are ordinary differential equations? A Primer on Ordinary Differential Equations Euler’s Method for Ordinary Differential Equations Examples Example 1: First order differential equation rewritten in dy/dx=f(x,y) form Example 2: First order differential equation rewritten in dy/dx=f(x,y) form Example 3: Heat transfer problem solved using Euler’s method Simulation of Euler’s Method ([MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]) Convergence Simulation of Euler’s Method ([MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]) |
||||||||||||||||||||
|
Background This is an example of how an instructor of a Numerical Methods course can develop an E-book on a single topic by using resources that are only available at the Holistic Numerical Methods Institute (HNMI) Website. Although one of the primary advantages of a web-based resource is that one can use documents outside of its own domain, we are particularly using this example as a way to illustrate the holistic nature of the resources available at HNMI. You are welcome to modify and edit this e-book to suit your purpose. Using the textbook document written in MS Word 2000 as a foundation, it was made interactive within MS Word 2000 by putting bookmarks and hyperlinks to background information, PowerPoint presentations, Mathcad simulations, historical anecdotes, multiple choice tests, problem sets, etc. Then the MS Word 2000 file was saved as a webpage and that is what you are about to read here.
Euler’s Method for Ordinary Differential Equations
Euler’s method is a numerical technique to solve ordinary differential equations of the form
So only first order ordinary differential equations can be solved by using Euler’s method. In other sections, we will discuss how Euler’s method is used to solve higher order ordinary differential equations or coupled (simultaneous) differential equations. How does one write a first order differential equation in the above form?
is rewritten as
In this case
Another example is given as follows:
is rewritten as
In this case
At
So the slope at x=x0 as shown in Figure 1 is
Slope
From here
Calling
One can now use the value of
Based on the above equations,
if we now know the value of
This formula is known as the
Euler’s method and is illustrated graphically in Figure 2. In some
books, it is also called the Euler-Cauchy method.
Simulation of Euler’s Method ([MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]) Convergence Simulation of Euler’s Method ([MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]) A ball at 1200K is allowed to cool down in air at an ambient temperature of 300K. Assuming heat is lost only due to radiation, the differential equation for the temperature of the ball is given by
Find the temperature at Solution
Per equation 3, the Euler’s method reduces to
For
For
Figure 3 compares the exact solution with the numerical solution from Euler’s method for the step size of h=240.
The problem was solved again using a smaller step size. The results are given below in Table 1.
Table 1. Temperature at 480 seconds as a function of step size, h
Figure 4 shows how the temperature varies as a function of time for different step sizes
while the values of the calculated temperature at t=480s as a function of step size are plotted in Figure 5.
The exact solution of the ordinary differential equation is given by the solution of a non-linear equation as
The solution to this nonlinear equation is
It can be seen that Euler’s
method has large errors. This can be illustrated using
As you can see the first two
terms of the
are the Euler’s method. The true error in the approximation is given by
The true error hence is approximately proportional to the square of the step size, that is, as the step size is halved, the true error gets approximately quartered. However from Table 1, we see that as the step size gets halved, the true error only gets approximately halved. This is because the true error being proportioned to the square of the step size is the local truncation error, that is, error from one point to the next. The global truncation error is however proportional only to the step size as the error keeps propagating from one point to another. Back to TOC |