6.6 euler’s method - mcgraw hill · pdf filehowever, euler’s method does not...

of 35 /35
6.6 EULER’S METHOD In section 6.5, we saw how to solve some simple first-order differential equations, namely, those that are separable. While there are numerous other special cases of differential equa- tions whose solutions are known (you will encounter many of these in any beginning course in differential equations), the vast majority cannot be solved exactly. For instance, the equation y = x 2 + y 2 + 1 is not separable and cannot be solved using our current techniques. Nevertheless, some information about the solution(s) can be determined. In particular, since y = x 2 + y 2 + 1 > 0, we can conclude that every solution is an increasing function. This type of infor- mation is called qualitative, since it tells us about some quality of the solution without pro- viding any specific quantitative information. In this section, we examine first-order differential equations in a more general setting. We consider the more general first-order equation of the form y = f (x , y ). (6.1) While we cannot solve all such equations, it turns out that there are many numerical meth- ods available for approximating the solution of such problems. We will study one simple method here, called Euler’s method. We begin by observing that any solution of equation (6.1) is a function y = y (x ) whose slope at any particular point (x , y ) is given by f (x , y ). In order to get a handle on what a solution curve looks like, we draw a short line segment through each of a sequence of points (x , y ), with slope f (x , y ), respectively. This collection of line segments is called the direction field or slope field of the differential equation. Notice that if a particular solution curve passes through a given point (x , y ), then its slope at that point is f (x , y ). Thus, the direction field gives an indication of the behavior of the family of solutions of a differential equation. Construct the direction field for y = 1 2 y . (6.2) Solution All that needs to be done is to plot a number of points and then draw through each point (x , y ), a short line segment with slope f (x , y ). For example, at the point (0, 1), draw a short line segment with slope y (0) = f (0, 1) = 1 2 (1) = 1 2 . Draw similar segments at 25 to 30 points. This is a bit tedious to do by hand, but a good graphing utility can do this for you with minimal effort. See Figure 6.26a (on the fol- lowing page) for the direction field for equation (6.2). Notice that equation (6.2) is sep- arable. We leave it as an exercise to produce the general solution y = Ae 1 2 x . We plot a number of the curves in this family of solutions in Figure 6.26b (on the follow- ing page) using the same graphing window we used for Figure 6.26a. Notice that if you connected some of the line segments in Figure 6.26a, you would obtain a close approxi- mation to the exponential curves depicted in Figure 6.26b. What is significant about this Constructing a Direction Field Example 6.1 Section 6.6 Euler’s Method 521 H ISTORICAL N OTES Leonhard Euler (1707–1783) A Swiss mathematician regarded as the most prolific mathematician of all time. Euler’s complete works fill over 100 large volumes, with much of his work being completed in the last 20 years of his life after going blind. Euler made important and lasting contributions in numerous research fields, including calculus, number theory, calculus of variations, complex variables, graph theory and differential geometry. Mathematics author George Simmons calls Euler, “the Shakespeare of mathematics— universal, richly detailed and inexhaustible.” smi98485_ch06b.qxd 5/17/01 1:36 PM Page 521

Author: ngoliem

Post on 11-Feb-2018

238 views

Category:

Documents


3 download

Embed Size (px)

TRANSCRIPT

  • 6.6 EULERS METHOD

    In section 6.5, we saw how to solve some simple first-order differential equations, namely,those that are separable. While there are numerous other special cases of differential equa-tions whose solutions are known (you will encounter many of these in any beginningcourse in differential equations), the vast majority cannot be solved exactly. For instance,the equation

    y = x2 + y2 + 1is not separable and cannot be solved using our current techniques. Nevertheless, someinformation about the solution(s) can be determined. In particular, since y = x2 + y2 +1 > 0, we can conclude that every solution is an increasing function. This type of infor-mation is called qualitative, since it tells us about some quality of the solution without pro-viding any specific quantitative information.

    In this section, we examine first-order differential equations in a more general setting.We consider the more general first-order equation of the form

    y = f (x, y). (6.1)While we cannot solve all such equations, it turns out that there are many numerical meth-ods available for approximating the solution of such problems. We will study one simplemethod here, called Eulers method.

    We begin by observing that any solution of equation (6.1) is a function y = y(x)whose slope at any particular point (x, y) is given by f (x, y). In order to get a handle onwhat a solution curve looks like, we draw a short line segment through each of a sequenceof points (x, y), with slope f (x, y), respectively. This collection of line segments is calledthe direction field or slope field of the differential equation. Notice that if a particularsolution curve passes through a given point (x, y), then its slope at that point is f (x, y).Thus, the direction field gives an indication of the behavior of the family of solutions of adifferential equation.

    Construct the direction field for

    y = 12

    y. (6.2)

    Solution All that needs to be done is to plot a number of points and then drawthrough each point (x, y), a short line segment with slope f (x, y). For example, at thepoint (0, 1), draw a short line segment with slope

    y(0) = f (0, 1) = 12 (1) = 12 .Draw similar segments at 25 to 30 points. This is a bit tedious to do by hand, but a goodgraphing utility can do this for you with minimal effort. See Figure 6.26a (on the fol-lowing page) for the direction field for equation (6.2). Notice that equation (6.2) is sep-arable. We leave it as an exercise to produce the general solution

    y = A e 12 x .We plot a number of the curves in this family of solutions in Figure 6.26b (on the follow-ing page) using the same graphing window we used for Figure 6.26a. Notice that if youconnected some of the line segments in Figure 6.26a, you would obtain a close approxi-mation to the exponential curves depicted in Figure 6.26b. What is significant about this

    Constructing a Direction FieldExample 6.1

    Section 6.6 Eulers Method 521

    H I S T O R I C A L N O T E S

    Leonhard Euler (17071783) ASwiss mathematician regarded asthe most prolific mathematician ofall time. Eulers complete works fillover 100 large volumes, with muchof his work being completed in thelast 20 years of his life after goingblind. Euler made important andlasting contributions in numerousresearch fields, including calculus,number theory, calculus ofvariations, complex variables,graph theory and differentialgeometry. Mathematics authorGeorge Simmons calls Euler, theShakespeare of mathematicsuniversal, richly detailed andinexhaustible.

    smi98485_ch06b.qxd 5/17/01 1:36 PM Page 521

  • is that Figure 6.26a was constructed using elementary algebra, without first solving thedifferential equation. That is, by constructing the direction field, we can obtain a reason-ably good picture of how the solution curves behave. Since most differential equationsare not solvable exactly, this is an extremely useful observation. This is what we mean byqualitative information about the solution: we get a graphical idea of how solutions be-have, but no details, such as the value of a solution at a specific point. Well see later inthis section that we can obtain approximate values of the solution of an IVP numerically.

    As we have already seen, differential equations are used to describe a wide variety of phe-nomena in science and engineering. Among many other applications, differential equationsare used to find flow lines or equipotential lines for electromagnetic fields. In such cases, it isvery helpful to visualize solutions graphically, so as to gain an intuitive understanding of thebehavior of such solutions and the physical phenomenon they are modeling.

    Construct the direction field fory = x + ey .

    Solution Theres really no trick to this; just draw a number of line segments withthe correct slope. Again, we let our CAS do this for us and obtained the direction field inFigure 6.27a. Unlike example 6.1, you do not know how to solve this differential equation

    Using a Direction Field to Visualize the Behaviorof SolutionsExample 6.2

    522 Chapter 6 Exponentials, Logarithms and Other Transcendental Functions

    y

    x

    4

    4

    4 2 4

    Figure 6.26bSeveral solutions of y = 12 y.

    4 2

    2

    4

    x

    y

    4

    2 4

    2

    Figure 6.27aDirection field for y = x + ey .

    4 2 2 4

    2

    x

    y

    4

    2

    4

    Figure 6.26aDirection field for y = 12 y.

    smi98485_ch06b.qxd 5/17/01 1:36 PM Page 522

  • exactly. Even so, you should be able to clearly see from the direction field how solutionsbehave. For example, solutions that start out in the second quadrant initially decrease veryrapidly, may dip into the third quadrant and then get pulled into the first quadrant and in-crease quite rapidly toward infinity. This is quite a bit of information to determine usinglittle more than elementary algebra. In Figure 6.27b, we have plotted the solution of thedifferential equation that also satisfies the initial condition y(4) = 2. Well see how togenerate such an approximate solution later in this section. Note how well this corre-sponds with what you get by connecting a few of the line segments in Figure 6.27a.

    You have already seen (in sections 6.4 and 6.5) how differential equation models canprovide important information about how populations change over time. A model thatincludes a critical threshold is

    P (t) = 2[1 P(t)][2 P(t)]P(t),where P(t) represents the size of a population at time t.

    A simple context in which to understand a critical threshold is with the problem of thesudden infestations of pests. For instance, suppose that you have some method for remov-ing ants from your home. As long as the reproductive rate of the ants is lower than yourremoval rate, you will keep the ant population under control. However, as soon as the antreproductive rate becomes larger than your removal rate (i.e., crosses the critical thresh-old), you wont be able to keep up with the extra ants and you will suddenly be faced witha big ant problem. We see this type of behavior in the following example.

    Draw the direction field for

    P (t) = 2[1 P(t)][2 P(t)]P(t)and discuss the eventual size of the population.

    Solution The direction field is particularly easy to sketch here since the right-handside depends on P, but not on t. If P(t) = 0, then P (t) = 0, also, so that the directionfield is horizontal. The same is true for P(t) = 1 and P(t) = 2. If 0 < P(t) < 1, thenP (t) < 0 and the solution decreases. If 1 < P(t) < 2, then P (t) > 0 and the solutionincreases. Finally, if P(t) > 2, then P (t) < 0 and the solution decreases. Putting all ofthese pieces together, we get the direction field seen in Figure 6.28. The constant

    Population Growth with a Critical ThresholdExample 6.3

    Section 6.6 Eulers Method 523

    x

    y

    2 2

    2

    4

    4

    Figure 6.27bSolution of y = x + ey passing

    through (4, 2).

    2 31

    1

    2

    3

    123t

    P

    Figure 6.28Direction field for P (t) =

    2[1 P(t)][2 P(t)]P(t).

    smi98485_ch06b.qxd 5/17/01 1:36 PM Page 523

  • solutions P(t) = 0, P(t) = 1 and P(t) = 2 are called equilibrium solutions. P(t) = 1is called an unstable equilibrium, since populations that start near 1 dont remain closeto 1. P(t) = 0 and P(t) = 2 are called stable equilibria, since populations either riseto 2 or drop to 0 (extinction), depending on which side of the critical threshold P(t) = 1they are on. (Look again at Figure 6.28.)

    In cases where you are interested in finding a particular solution, the numerous arrowsof a direction field can be distracting. Eulers method, developed below, enables you toapproximate a single solution curve. The method is quite simple, based almost entirely onthe idea of a direction field. However, Eulers method does not provide particularly accu-rate approximations. More accurate but more complicated methods will be explored in theexercises.

    Consider the IVP

    y = f (x, y), y(x0) = y0.We must emphasize once again that, assuming there is a solution y = y(x), the differentialequation tells us that the slope of the tangent line to the solution curve at any point (x, y)is given by f (x, y). Remember that the tangent line to a curve stays close to that curve nearthe point of tangency. This idea was the key to both Newtons method and differentials.Notice that we already know one point on the graph of y = y(x), namely, the initial point(x0, y0). Referring to Figure 6.29, if we would like to approximate the value of the solutionat x = x1 [i.e., y(x1)], and if x1 is not too far from x0, then we could follow the tangent lineat (x0, y0) to the point corresponding to x = x1 and use the y-value at that point (call it y1)as an approximation to y(x1). Again, t