10.06.2022 Views

James Stewart-Calculus_ Early Transcendentals-Cengage Learning (2015)

A five star textbook for college calculus

A five star textbook for college calculus

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 9.2 Direction Fields and Euler’s Method 595

y

1

solution curve

y=L(x)

Euler’s Method

The basic idea behind direction fields can be used to find numerical approximations to

solutions of differential equations. We illustrate the method on the initial-value problem

that we used to introduce direction fields:

y9 − x 1 y ys0d − 1

0 1

FIGURE 11

First Euler approximation

y

1

1.5

0 0.5

1

x

x

The differential equation tells us that y9s0d − 0 1 1 − 1, so the solution curve has slope 1

at the point s0, 1d. As a first approximation to the solution we could use the linear approximation

Lsxd − x 1 1. In other words, we could use the tangent line at s0, 1d as a rough

approximation to the solution curve (see Figure 11).

Euler’s idea was to improve on this approximation by proceeding only a short distance

along this tangent line and then making a midcourse correction by changing direction as

indicated by the direction field. Figure 12 shows what happens if we start out along the

tangent line but stop when x − 0.5. (This horizontal distance traveled is called the step

size.) Since Ls0.5d − 1.5, we have ys0.5d < 1.5 and we take s0.5, 1.5d as the starting point

for a new line segment. The differential equation tells us that y9s0.5d − 0.5 1 1.5 − 2,

so we use the linear function

y − 1.5 1 2sx 2 0.5d − 2x 1 0.5

FIGURE 12

Euler approximation with step size 0.5

y

1

0 0.25

1

FIGURE 13

Euler approximation with step size 0.25

y

x

as an approximation to the solution for x . 0.5 (the green segment in Figure 12). If we

decrease the step size from 0.5 to 0.25, we get the better Euler approximation shown in

Figure 13.

In general, Euler’s method says to start at the point given by the initial value and proceed

in the direction indicated by the direction field. Stop after a short time, look at the

slope at the new location, and proceed in that direction. Keep stopping and changing

direction according to the direction field. Euler’s method does not produce the exact

solution to an initial-value problem—it gives approximations. But by decreasing the step

size (and therefore increasing the number of midcourse corrections), we obtain successively

better approximations to the exact solution. (Compare Figures 11, 12, and 13.)

For the general first-order initial-value problem y9 − Fsx, yd, ysx 0 d − y 0 , our aim is

to find approximate values for the solution at equally spaced numbers x 0 , x 1 − x 0 1 h,

x 2 − x 1 1 h, . . . , where h is the step size. The differential equation tells us that the slope

at sx 0 , y 0 d is y9 − Fsx 0 , y 0 d, so Figure 14 shows that the approximate value of the solution

when x − x 1 is

y 1 − y 0 1 hFsx 0 , y 0 d

slope=F(x¸, y¸)

(⁄, ›)

hF(x¸, y¸)

Similarly,

In general,

y 2 − y 1 1 hFsx 1 , y 1 d

y n − y n21 1 hFsx n21 , y n21 d

h

0 x¸

FIGURE 14

x

Euler’s Method Approximate values for the solution of the initial-value problem

y9 − Fsx, yd, ysx 0 d − y 0 , with step size h, at x n − x n21 1 h, are

y n − y n21 1 hFsx n21 , y n21 d n − 1, 2, 3, . . .

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!