Heuns Methods MAT 275 There exist many numerical methods that allow us to construct an approximate solution to an ordinary differential equation In this section we will study two Eulers Method and Advanced Eulers ID: 675456
Download Presentation The PPT/PDF document "Numerical Methods: Euler’s and Advanc..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Numerical Methods: Euler’s and Advanced Euler’s (Heun’s) Methods
MAT 275Slide2
There exist many numerical methods that allow us to construct an approximate solution to an ordinary differential equation. In this section, we will study two: Euler’s Method, and Advanced Euler’s (
Heun’s
) Method.Euler’s Method:Given: A differential equation of the form , with initial condition .Assume the solution exists over an interval and subdivide this interval into equal subdivisions of length h (the “step size”). Thus, a typical subinterval will have the form , or equivalently, .Integrate both sides with respect to x from to :
(c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu
2Slide3
(Continued from last slide)
Notation:
We will call the approximate value to , which represents an actual solution point of the differential equation. (c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu3Slide4
We can approximate
using rectangles (similar to Riemann Sums). So we replace
with .Thus, we have the following formula for approximating solutions to a differential equation:This is Euler’s Method. (c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu4Slide5
Example:
Find the approximate solutions of
with . Use a step size of .Note: The initial condition is also written as and . Also, represents the right side of the differential equation, so . It does not represent the solution to the differential equation. That is , which is what we’re trying to approximate.Solution: The formula is Thus,
So now we have a new approximation point,
.
(c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu
5Slide6
So we repeat the process:
Now we have another approximation point,
.Now we have . (c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu6Slide7
From last slide, we have
…
This gives us .One more time:This gives us . (c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu7Slide8
The five approximation points on the solution curve of
are:
The actual solution of is found by using an integration factor. It isThis is used to generate actual solutions of (c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu8Slide9
Here is the actual solution curve,
:
(c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu9Slide10
Improved Euler’s Method (also called
Heun’s
Method)Instead of using rectangles to approximate , we use trapezoids.A trapezoid with base h and heights and has areaThus, the formula now becomes(but there’s a problem…) (c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu10Slide11
From the last slide, we have
The problem is … how do we approximate
on the left side when it’s also part of the formula on the right side?The answer is to replace it with the formula we used for Euler’s Method:This is called the Improved Euler’s Formula. (c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu11Slide12
Example:
use the
Improved Euler’s Method on , with a step side of , to find and .Solution: We have Thus,
Recall that the other method gave
and the actual solution is
.
Thus, we see that this method is already providing more precise approximations.
(c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu
12Slide13
One more time… we have
Don’t forget that
using the from the last slide.Thus, we obtainThis works out to
Recall that Euler’s Method gave an approximation of
, and that the actual solution was
. Again, we see better precision.
(c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu
13Slide14
Advantages & Disadvantages
These methods allow you ways to find solution curves when the differential equation may not be solvable using analytical means. For example, it is impossible to find a “closed form” solution to
. If we know an initial condition, we can numerically find approximate solutions to the differential equation.The larger the step size, the approximations usually diverge faster from the actual solution. The smaller step sizes give better approximations, but require more calculations to cover a certain interval.Euler’s method is fast but not as precise, while the Improved Euler’s Method offers better precision, but takes more time.Suggestion: do not round any calculations at any steps. This adds in “error”, which is not desired since this is already an approximation technique. Write out all decimal places.Write out each formula, step by step, since it’s easy to get lost on each step. (c) ASU Math - Scott Surgent. Report errors to surgent@asu.edu14