Module 22 - Differential Equations and Euler's Method
 
  Introduction | Lesson 1 | Lesson 2 | Lesson 3 | Self-Test
 
 Lesson 22.2: Euler's Method
 

In this lesson Euler's method is used to approximate the solution to an initial-value problem. The method is based on linear approximations and uses a variation of the point-slope form of a linear equation: y1 = y0 + m(x1 – x0).


Linear Approximations

Suppose we want to solve a differential equation of the form where m(x, y) represents the slope of the function y = f(x) at the point (x, y). In general, this means that the slope of the graph of y = f(x) at any point (x, y) may depend on both x and y.

Euler's Method

Euler's method, which is described below, approximates the y-values of the solution for a sequence of x-values given by x1, x2, x3, ..., etc. The method uses linear approximation to move from one point on the solution curve to the next. At each point, it uses the equation to compute the slope of the tangent line and then moves along the tangent line to the next point.

Basically, since (rise) = (slope) · (run), starting at (x0, y0) and moving along the tangent line to the point x = x1 changes the y-value by m(x0, y0) · (x1 - x0). The value of y1 = f(x1) can therefore be estimated from y0 = f(x0) by the linear approximation

f(x1) f(x0) + m(x0, y0) · (x1x0).

The next value may be found by repeating the process. The value of y2 = f(x2) can be estimated from the value of y1 = f(x1) by the linear approximation

f(x2) f(x1) + m(x1, y1) · (x2x1).

After approximating f(x2) the same method can be used to approximate f(x3).

f(x3) f(x2) + m(x2, y2) · (x3x2).

The value of f(xn+1) can be approximated by using previously found values.

f(xn+1) f(xn) + m(xn, yn) · (xn+1xn)

Euler's method generally gives more accurate results if xn+1xn is small. In other words, xn+1 is close to xn and the step size is small. In most problems solved with Euler's method, xn+1xn is the same for all values of n.

Using Euler's Method

In Lesson 22.1 you graphed an approximate solution to the logistic initial-value problem

y' = 0.037 · y · (25 – y) and y(1) = 1

Euler's method may be used to approximate the values of the solution to this differential equation. For this problem m(x,y) = 0.037 · y · (25 - y). First let x0 = 1, y0 = 1, and x1 = 1.1, then compute y' = m(x0, y0) = m(1, 1), the slope of the graph at (1, 1). Use the differential equation shown above with y replaced by y0 = 1.

y' = m(x0, y0) = m(1, 1) = 0.037 · 1 · (25-1) = 0.888

Next, find f(x1) using the linear approximation equation. Notice that x1 - x0 = 0.1

f(x1) = f(1.1) f(x0) + m(x0, y0) · (x1 - x0)
= 1 + 0.888 · 0.1
= 1.0888

You can use the expression for m(x0, y0) in the linear approximation equation to find the value of y directly. Using one expression to find y-values will make the computation easier when finding subsequent values.

  • Enter 1 + 0.037 · 1 · (25 - 1) · 0.1

Approximate y2 = f(1.2) using the estimated value found for y1 and the value of m(x1, y1).

y(1.2) = y2 = f(x2) 1.0888 + m(1.1, 1.0888) · 0.1

= 1.0888 + [0.037 · 1.0888 · (25 - 1.0888)] · 0.1

Then continue the process by letting x3 = 1.3, x4 = 1.4, ... to find y3, y4, ....

The ANS Feature

There is a short cut that will speed up the process for subsequent approximations. The result of the most recent calculation is stored in a variable called ANS which can be entered into a calculation by pressing [ANS]. [ANS] is above . This approach will also improve the accuracy somewhat, since it uses all 14 places, rather than the 4 we entered by hand.

Because the most recent result represents y(1.2), the approximation for y(1.3) can be found by evaluating

y(1.3) Ans + 0.037 · Ans · (25 – Ans)· 0.1

  • Enter the right-hand side of this equation on the Home screen and press .

Ans has now been updated to 1.28956.

  • Simply press to approximate y(1.4).

Pressing re-executes the previous command using the new value stored in ANS and displays the result. When the result is displayed, ANS is updated for the next computation.

  • Approximate y(1.5) by pressing again.

22.2.1 Approximate y(2) by pressing five more times.
Click here for the answer.

The ANS feature works well in this example because y' depends only on y. If y' depends on x, then all occurrences of the x-value in the command line must be changed before is pressed.

Using Euler's Method in TI-83 Programs

Euler's method is used in the EULERG and EULERT programs. EULERG produces a visual solution to the differential equation stored in Y1. In Lesson 22.1, the solution to the logistic differential equation y' = 0.037y(25 - y) that modeled the rumor data was displayed.

Displaying a Table of Values

You can see the Euler method values with the program EULERT using the same differential equation.

  • Set Y1 = 0.037 · Y · (25 - Y).
  • If needed, click here to download EULERT to your computer and then reinstall it on your calculator.
  • Run EULERT.
  • Enter 1 for the initial values of X and Y.
  • Enter 0.1 for the step size.
  • Enter 10 for the number of points.

Each time you press you see the coordinates for another point. These are the same values produced by Euler's method using the ANS feature earlier in this lesson.

First 2 points with Euler's method Last 2 points with Euler's method

EULERG also uses Euler's method to calculate x and y coordinates; however, EULERG plots the points instead of displaying the coordinates.


< Back | Next >
  ©Copyright 2007 All rights reserved. | Trademarks | Privacy Policy | Link Policy