[an error occurred while processing this directive]

Math 489/Math 889 Stochastic Processes and Advanced Mathematical Finance Dunbar, Fall 2010

Ordinary Differential Equations: Analytically, Graphically, Numerically

Key Concepts

1. How to proceed graphically from a differential equation of the analytic form dy/dx = f(x,y) to a slope field and then to a solution curve.
2. Solving differential equations numerically with Euler’s method.

Vocabulary

1. Euler’s method is a numerical method for solving ordinary differential equations based on the definition of the derivative, or equivalently on the tangent line approximation: Given dy/dt = G(t,y), y(t0) = y0 and a step size dt:
 t1 = t0 + dt, y1 = y0 + G(t0,y0)dt t2 = t1 + dt, y2 = y1 + G(t1,y1)dt t3 = t2 + dt, y3 = y2 + G(t2,y2)dt
and so on, as needed.

Mathematical Ideas

Ordinary Differential Equations: Analytically

Differentiable functions, no matter how difficult or how strange their global behavior, are on a local scale composed of segments which are nearly straight line segments. Differential calculus is the formal acknowledgment and application of this simple idea.

With differential calculus, we can build nice functions by specifying how they are built up locally out of our base function, the straight line. We would write the local change in value of the function over a time interval of infinitesimal length dt informally as

or more typically and formally, as

This says that the initial point is specified, and the slope at the point is determined (through G) by the time and the function value. This is the usual expression of an Ordinary Differential Equation (ODE). Then we can infinitesimally extend the function with that information (along the tangent straight line) and repeat. Of course, this is just an expression in words of the Euler method for numerically solving the differential expression.

Simple Example 1 The simplest differential equation is df = r dt where r is a constant. Take an initial condition to be f(0) = b. This is just the differential equation expression of a straight line, since it says that the slope is everywhere constant. In fact, it is the straight line with slope r and intercept b, f(t) = rt + b. Looking ahead to the next section, , we could say that f is drifting or rending upward at rate r.

Simple Example 2 The next simplest differential equation is df = tdt. This differential equation says that the slope is increasing, in fact increasing exactly as the time. The solution may be easily guessed (using the Fundamental Theorem of Calculus!) as f = t2/2 + C, where C would be specified by the initial value.

Simple Example 3 The next simplest and first non-trivial differential equation is df = f dt. Here the differential equation says that the slope at a pont is the same as the function value. The solution may be guessed to be f(t) = Cet where the constant C is determined from the initial condition. Again looking ahead, we could write the differential equation as df/f = dt and interpret it to say the relative rate of increase is proportional to the time observed.

Simple Example 4 The next simplest differential equation is df = sf dt. Here the differential equation says that the slope at a point is proportional to the function value. The solution may be guessed to be f(t) = Cest where the constant C is determined from the initial condition. Again looking ahead, we could write the differential equation as df/f = sdt and interpret it to say the relative rate of increase is proportional to the time observed.

Ordinary Differential Equations: Graphically

Sketch the graph of the solution of dy/dt = y + t with y(0) = 1. We don’t know a formula for the solution, so how can we possibly sketch its graph? Actually, the equation y' = t + y tells us that at the point (t,y) on the graph of the solution the slope of the solution has a value given by the sum of t and y. In particular, because the curve must pass the initial condition (0, 1) (since y(0) = 1), it’s slope there must be 1 = 0 + 1. So a small portion of the solution curve through the point (0, 1) looks like a short line segment with slope 1. As a guide to sketching the rest of the curve, let’s draw short line segments a lot of points (t,y), each with slope t + y. The result is called a slope field and is shown in the figure. For instance the line segment at the point (1, 2) has slope 1 + 2 = 3. The slope field allows us to visualize the general shape of the solution curves by indicating the direction in which the curves proceed at each point.

Now we can sketch the solution curve through the point (0, 1) by following the slope field.

Ordinary Differential Equations: Numerically

The solution that Euler’s method produces numerically is the same as the solution produced graphically using the slope field.

The formula for Euler’s method is based on the definition of the derivative, or equivalently on the tangent line approximation:

 t1 = t0 + dt, y1 = y0 + f(t0,y0)dt t2 = t1 + dt, y2 = y1 + f(t1,y1)dt t3 = t2 + dt, y3 = y2 + f(t2,y2)dt

and so on, as needed.

Think of the slope field as a set of sign posts directing you across the plane. Pick a starting point (corresponding to the initial value), and calculate the slope at that point using the differential equation. This slope is a signpost telling you the direction to take. Head off a small distance in this direction. Stop and look at the new signpost. Recalculate the slope from the differential equation, using the coordinates of the new point. Change direction to correspond to the new slope, and move another small distance and so on.

Problems to Work for Understanding

1. Calculus, Second Edition by Hughes-Hallett, Gleason, et al. and
2. Financial Calculus: An introduction to derivative pricing by M Baxter, and A. Rennie, Cambridge University Press, 1996, pages 52-62.

1. Jacksonville State University Is an applet that lets you play with some initial value problems. It lets you enter the equation, and X0 and Y0. Submitted by Byron Blunk, December 6, 2001.
2. Texas A and M: A Comprehensive site on ODEs Covers many topics talked about in class (numerical, graphical, etc.) Links contain an explanation and also Maple topics. Submitted by Amy Charter, November 30, 2000.
3. Kennesaw State University A long PDF published that explains slope fields and special situations of slope fields. Submitted by Brian Kaiser, December 14, 2001.
4. University Tennessee Visual Calculus Good site with descriptions, a Java slope fields calculator, and programs for computers. Submitted by Josh Paula, December 10, 2001.
5. University of Montana Site with discussion of Newton’s Model of Cooling in two ways. Includes graphical analysis as well as numerical. Submitted by Josh Paula, December 10, 2001.
6. Duke University Connected Curriculum Explains what slope fields are and provides a diagram showing how points of a slope field are calculated. Submitted by Meghan Lyons, December 7, 2001
7. San Joaquin Delta Community College Introduces slope fields in a step-by-step fashion. VERY understandable!!! Submitted by Meghan Lyons, December 7, 2001
8. Addison Wesley Tools Site Allows user to create slope fields for 12 different differential equations. Lots of fun. Submitted by Meghan Lyons, December 7, 2001
9. University of British Columbia Provides an explanation to slope fields and takes the reader through two in-depth examples. Submitted by Meghan Lyons, December 7, 2001
10. SOS Math: Slope Fields Another good, easy to understand explanation of slope fields. Recommended for anyone having difficulty understanding what slope fields are all about. Submitted by Stuart Martens, November 20, 2000.
11. University of Alberta This Is a nice applet using Euler’s method to display the direction field and solution curve of an equation. Submitted by Josh Paula, December 10, 2001.
12. University of Montana Very helpful website that explains Euler’s method of differential equations. Uses pictures to aid in understanding the concept. Submitted by Brian Fleissner, October 25, 2001
13. More Computational Physics Nice website that proves the theory behind Euler’s Method. Submitted by David Peetz, November 16, 2000.
14. Penn State: Euler’s Method with Excel Interesting web site that explains Euler’s Method gives several real life applications and then proceeds to explain how Euler’s Method can be found by using Microsoft Excel. Submitted by David Peetz, November 16, 2000.
15. SOS Math: Numerical Methods Another excellent web site that contains illustrations and example problems to enhance its well explained background information. Submitted by David Peetz, November 16, 2000.
16. Colorado: Euler’s Method. Uses a good example problem to teach Euler’s Method. Also contains link to Excel 95 spreadsheet. Submitted by David Peetz, November 16, 2000.
17. Illinois math and Science Academy: Euler Method with Calculators Another good website that uses examples and graphs to teach Euler’s Method. Also contains Euler method program for TI-81 and 82 calculators. Submitted by David Peetz, November 16, 2000.
18. Furman U: Step Size in Euler Short site on the importance of step size when using Euler’s method. Interactive graph that changes with different step sizes. Submitted by Stuart Martens, November 20, 2000.
19. North Carolina State: Maple Worksheets on Calc II Great page with many links to Maple worksheets. Maple worksheets on Euler. Submitted by Mike Wrenholt, November 20, 2000.
20. U. British Columbia: Step Size and Euler Method Interactive website with Euler’s method, featuring a graph that displays Euler’s method run through step by step. Submitted by Stuart Martens, November 20, 2000.
21. Dartmouth: Applets for Solving DEs This has lots of descriptions of real-life diff equation models. Very good. Submitted by Amy Gant, December 4, 2000.

[an error occurred while processing this directive] [an error occurred while processing this directive]