Vous êtes sur la page 1sur 4

Themes for Advanced Placement Calculus

45

12

Differential Equations and Eulers Method

Theme 12

Key to Text Coverage


Section
7.2 7.2 Appendix A

Examples

Exercises
109 110 914

Topics
Eulers Method developed Exercise on Eulers Method More exercises on Eulers Method

Summary
Many differential equations, such as y e x and y x 2 y 2, cannot be solved by traditional pencil and paper methods. In fact, most differential equations that arise in real life applications are solved on computers using approximation techniques. The simplest such technique is called Eulers Method and is based on a tangent line approximation. Let dy dx y f x, y be a differential equation with initial condition y y0 when x x0. This means that the solution y is only known at the initial point x0, y0 , and that the derivative of y is known at all points x, y , as indicated in the figure at the top right. Partition the x-axis to the right of x0 into subintervals x0 < x1 < x2 < . . . of length x xi 1 xi . Eulers Method approximates the value of the exact solution at these points xi , as indicated in the figure at the bottom right. The algorithm uses the known slope of the tangent line at x0, y0 to estimate the solution y1 at x1: y1 x1 y0 x0 y1 f x0, y0 y0 f x0 , y0 x
2

y (unknown)
y0

x0

Approximation yi

y0

Exact Solution y (xi) x0 x x1 x2 x3


x

x4

The procedure is repeated using x1, y1 to estimate the solution y2 at x2, and so on. Each of these steps is called one iteration. y1 y2 y3 y0 y1 y2 f x0 , y0 f x1, y1 f x2, y2 x x x

Store the differential equation in Y1. :Program Euler :Disp INITIAL X :Input x :Disp INITIAL Y :Input y :Disp DELTA X :Input D :Disp ITERATIONS :Input N :0 I :While I < N : y Y1*D YNEW :Disp YNEW :Pause : x Dx : YNEW y :Disp x, y : I 1I :End

yi

yi

f xi, yi

If y1, y2, . . . are the approximations from Eulers Method, and y x1 , y x 2 , . . . are the exact values of the (unknown) solution, then the error at iteration i is the absolute value of the difference between the approximation and the exact value, Error yi y xi .

In general, the error increases as i increases. A TI-83 calculator program for Eulers Method is given at the right.

46

Themes for Advanced Placement Calculus

Worked Example
Consider the differential equation y x y with initial condition y x 0.1. 1 when x 0. (a) Do three iterations of Eulers Method with

Theme 12

(b) Sketch the solution to the differential equation on the given slope field.
8

0 0

(c) The exact solution to this differential equation is y 2e x approximations y1, y2, and y3. What do you observe?

1. Calculate the error of the Euler

SOLUTION
(a) You can use Eulers Method yi x 0.1. y1 y2 y3 y0 y1 y2 f x0, y0 f x1, y1 f x2, y2 x x x 1 1.1 1.22
1

yi 0

f xi , y1 1 0.1

x with x0 1.1 1.22 1.362

0, y0

1, f x, y

y and

0.1 0.2

1.1 0.1 1.22 0.1

(b) The solution follows the direction of the tick marks, and must pass through the point 0, 1 .
8

(0, 1)
0 0 2

(c) The following table shows the approximations yi , the exact solutions y xi and the errors yi the four points x0, x1, x2, and x 3. x yi y xi Error x0 1.0 1.0 0 0 x1 0.1 1.1 1.11034 0.01034 x2 0.2 1.22 1.24281 0.02281 x3 0.3

y xi at

1.362 1.39972 0.03772

The errors get larger as i increases.

Notes
(c) At the initial point x0, y0 1, 0 there is no error because y0 is the given exact solution of the differential equation. However, at each iteration the errors seem to increase. One way to see this is to note that the calculation of y2 uses y1 as its initial condition, which is already in error.

Themes for Advanced Placement Calculus

47
Name ________________________________________ Date _________________________________________

Theme 12

Sample Questions
Show all your work on a separate sheet of paper. Indicate clearly the methods you use because you will be graded on the correctness of your methods as well as on the accuracy of your answers.

Multiple Choice
2xy be a differential equation with initial condition y0 2 when x0 1. Let y solution at x1 1.1 by performing one iteration of Eulers Method with x (a) 2.0 2. Let dy dt 1 y 2 0. Approximate the solution at t2 (d) 4.8 (e) 8.84 0.4 (b) 2.1 (c) 2.2 (d) 2.4 1. Approximate the 0.1. (e) 6.0

be a differential equation with initial condition y0 4 when t0 by performing two iterations of Eulers Method with t 0.2. (a) 4.4 (b) 4.44 (c) 4.84

2x y be a differential equation with initial condition y0 1 when x0 1. Use a graphing utility 3. Let y to do ten iterations of Eulers Method with x 0.1 and find the difference between the exact solution and the Euler approximation at x10 2.0. You may use the program given on page 45. (a) 0.01468 (b) 0.01646 (c) 0.01684 (d) 0.01692 (e) 0.01741

Free Response
Consider the logistics differential equation y y1 x 1 y y with initial condition y0 0.05. 1 1 y . 1 2 when x0 0. (a) Do two iterations of Eulers Method using (b) Solve differential equation. Hint: 1 y1 y

(c) Graph the solution on the interval 0 x 10 and determine the horizontal asymptote to the right.

48

Themes for Advanced Placement Calculus

SOLUTIONS

Theme 12

Multiple Choice
1. Answer (d). Use Eulers Method with x0 y1 y0 f x0, y0 x 2 1, y0 2 2, f x, y 0.4 0, y0 2xy, and 2.4 4, f t, y y 2, and t 0.2 are x 0.1. 2 1 2 0.1

2. Answer (c). Two iterations of Eulers Method with t 0 y1 y2 y0 y1 f t0, y0 f t1, y1 t t 4 4.4 1 4.0 0.2 2 1 4.4 0.2 2 4.4 4.84.

3. Answer (a). The Euler approximation at x10 is 2.66043. The exact solution is obtained by separation of variables. dy dx 2x y y dy 2x dx y2 2 x2 C1 y 2x 2 C 2x2 1. At x 2,

1 gives C 1 and the particular solution is y The initial condition y 1 y 2 22 1 2.64575 and the error is 2.66043 2.64575 0.01468.

Free Response
(a) Two iterations of Eulers Method with x0 y1 y2 y0 y1 f x0, y0 f x1, y1 dy dx 1 y1 1 y 1 1 ln y y 1 y 1 y y yCe x y The initial condition y y (c) y ex 1 ex 1 1 e y y dy dy x ex Ce x Ce x 1 Ce x 1 2 when x
x.

0, y0

1 2, f x, y 0.5125

y1

y , and

0.05 are

x x

0.5

0.5 1

0.5 0.05

0.5125

0.5125 1

0.5125 0.05

0.5250.

(b) Use the method of separation of variables. y1 dx dx C1


C1

Ce x

0 gives C

1. So, the exact solution is


2

1 is the horizontal asymptote to the right.


0 0 10

Vous aimerez peut-être aussi