## Mathematics & Science
Learning Center |
|||

## Numerical Methods for Solving Differential Equations## Euler's Method## Theoretical Introduction
## Developing Euler's Method GraphicallyIn order to develop a technique for solving first order initial value problems numerically, we should first agree upon some notation. We will assume that the problem in question can be algebraically manipulated into the form:
Our goal is to find a Now, remember we don't really know the true solution of the problem, or we
wouldn't be going through this method at all. But let's act as if we Again, the blue graph of the true solution,
shown above, is actually Since we're after a set of points which lie along the true solution, as stated above, we must now derive a way of generating more solution points in addition to the solitary initial condition point shown in red in the picture. How could we get more points? Well, look back at the original initial value problem at the top of the page! So far we have only used the initial condition, which gave us our single point. Maybe we should consider the possibility of utilizing the other part of the initial value problem—the differential equation itself:
Remember that one interpretation of the quantity
All we have to do now is think of a way of using this slope to get those
"other points" that we've been after! Well, look at the right hand side of the
last formula. It looks like you can get the slope by substituting
values for
Remembering that this gives us the Once again, let's remind ourselves of our goal of finding more points which lie on the true solution's curve. Using what we know about the initial condition, we've built a tangent line at the initial condition's point. Look again at the picture of this line in comparison with the graph of the true solution in the picture above. If we're wanting other points along the path of the true solution, and yet we don't actually have the true solution, then it looks like using the tangent line as an approximation might be our best bet! After all, at least on this picture, it looks like the line stays pretty close to the curve if you don't move too far away from the initial point. Let's say we move a short distance away, to a new Notice that our new point, which I've called ( So we now have - (
*x*_{o},*y*_{o}): an exact value, known to lie on the solution curve. - (
*x*_{1},*y*_{1}): an approximate value, known to lie on the solution curve's tangent line through (*x*_{o},*y*_{o}).
We must now attempt to continue our quest for points on the solution curve (though we're starting to see the word "on" as a little optimistic—perhaps "near" would be a more realistic word here.) Still glowing from our former success, we'll dive right in and repeat our last trick, constructing a tangent line at our new point, like this:
to get get the slope of a We now attempt to use this new We now have - (
*x*_{o},*y*_{o}): an exact value, known to lie on the solution curve. - (
*x*_{1},*y*_{1}): an approximate value, known to lie on the solution curve's tangent line through (*x*_{o},*y*_{o}). - (
*x*_{2},*y*_{2}): an approximate value, known to lie on the solution curve's pseudo-tangent line through (*x*_{1},*y*_{1}).
As you can see, we're beginning to establish a pattern in the way we are generating new points. We could continue making new points like this for as long as we liked, but for the sake of this illustration let's find just one more value in the approximate solution. We make another and we make another short jump to an So the list of points in our approximate numerical solution now has four members: - (
*x*_{o},*y*_{o}): an exact value, known to lie on the solution curve. - (
*x*_{1},*y*_{1}): an approximate value, known to lie on the solution curve's tangent line through (*x*_{o},*y*_{o}). - (
*x*_{2},*y*_{2}): an approximate value, known to lie on the solution curve's pseudo-tangent line through (*x*_{1},*y*_{1}). - (
*x*_{3},*y*_{3}): an approximate value, known to lie on the solution curve's pseudo-tangent line through (*x*_{2},*y*_{2}).
Looking over the picture one last time, we see an example of how the numerical solution—the red dots, might compare with the actual solution. As we stated in the introduction to this laboratory, a weakness of numerical solutions is their tendency to drift away from the true solution as the points get further away from the initial condition point. One way of minimizing (but not eliminating) this problem is to make sure that the jump-size between consecutive points is relatively small. Now that you've seen the pictorial version of Euler's Method for finding numerical solutions, you should have a better chance of understanding the derivation of the formulas used by the method. So, let's go and derive them... |
|||

ODE Laboratories: A Sabbatical Project by Christopher A. Barker©2017 San Joaquin Delta College, 5151 Pacific Ave., Stockton, CA 95207, USA e-mail: cbarker@deltacollege.edu |