time (sec) first-order differential equations and models2 chapter 1/ first-order differential...

33
CHAPTER 1 First-Order Differential Equations and Models Time (sec) 5 10 15 Initial velocity = 20 meters/sec Height (m) The main thrust of this chapter is to find solution formulas for first-order ODEs, discuss some ODE models, introduce the geometry of solution curves, and show the central role of numerical solvers in understanding the behavior of solutions. Solution methods are tabulated at the end of the chapter for reference purposes. Questions of the existence and uniqueness of solutions of initial value problems (IVPs) and the sensitivity of IVPs to changes in the data can be answered from these formulas. The relationships between ODEs and dynamic processes are so basic that we explore the connections right from the start. Throughout the chapter, simple processes are introduced and modeled with ODEs. We hope users of this text will use numerical solvers to approximate and graph solutions of ODEs; the computer icon designates problems for which a numerical solver is appropriate. Most CAS packages have numerical solvers, but can also produce solution formulas for many first-order ODEs (even ODEs with parameters), not to mention graphs and direction fields. Systems of ODEs are introduced in this chapter for several reasons. Systems arise naturally in modeling. Some systems can be solved using the first-order techniques of the chapter. All numerical ODE solvers available on the market today are designed to solve systems of first-order ODEs. Note that discontinuous driving terms (e.g., the Engineering Functions of Appendix B.1) are introduced early in a mild way and in a more substantial way later in a modeling environment (Section 1.8). If your solver does not have these functions as predefined functions, you can often find a work-around using if-then-else logical commands over a finite time interval.

Upload: others

Post on 12-Mar-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

CHAPTER

1

First-Order DifferentialEquations and Models

Time (sec)

5

10

15

Initial velocity= 20 meters/sec

Hei

ght(

m)

The main thrust of this chapter is to find solution formulas for first-order ODEs, discuss someODE models, introduce the geometry of solution curves, and show the central role of numericalsolvers in understanding the behavior of solutions. Solution methods are tabulated at the end ofthe chapter for reference purposes. Questions of the existence and uniqueness of solutions of initialvalue problems (IVPs) and the sensitivity of IVPs to changes in the data can be answered from theseformulas. The relationships between ODEs and dynamic processes are so basic that we explorethe connections right from the start. Throughout the chapter, simple processes are introduced andmodeled with ODEs. We hope users of this text will use numerical solvers to approximate andgraph solutions of ODEs; the computer icon designates problems for which a numerical solver isappropriate. Most CAS packages have numerical solvers, but can also produce solution formulasfor many first-order ODEs (even ODEs with parameters), not to mention graphs and direction fields.

Systems of ODEs are introduced in this chapter for several reasons. Systems arise naturally inmodeling. Some systems can be solved using the first-order techniques of the chapter. All numericalODE solvers available on the market today are designed to solve systems of first-order ODEs.

Note that discontinuous driving terms (e.g., the Engineering Functions of Appendix B.1) areintroduced early in a mild way and in a more substantial way later in a modeling environment(Section 1.8). If your solver does not have these functions as predefined functions, you can oftenfind a work-around using if-then-else logical commands over a finite time interval.

Page 2: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

2 Chapter 1/ First-Order Differential Equations and Models

1.1 A Modeling Adventure

CommentsIn this introductory section we hit upon several of the main themes of our approach to modeling anddifferential equations. We construct an initial value problem that models a changing fish population.The reasoning process leading to that IVP is calledmodelingand the resulting IVP is called amodel.In the figures we visualize the long-term behavior of solution curves of some of the differentialequations used in the models. We examine the “sensitivity” of the structure of these solution curvesas the initial valuey0 or the harvesting rateH is changed, although we don’t yet explicitly use theterm “sensitivity.” This scenario is one that will be repeated many times in this book. So if youdidn’t grasp everything this first time around, just wait for the next opportunity. As in any field,there are a lot of terms to be defined. We have opted to include some of the definitions in thisopening section, but postpone others till later.

Tips on using numerical solversLike any other tool, you will need a “break-in” period to use your numerical solver effectively. Thedocumentation that comes with the solver is a good place to start, but there is no substitute forhands-on experience. Some solvers are command-line driven with a precise (and often complex)syntax for entering commands, but many solvers have a graphical interface which allows the userto select items from a menu and makes it easy to enter data and display graphs. Our advice is to getstarted right away in using your solver, even before you completely understand the basic conceptsbehind the differential equations you are studying. The reason is that the graphical displays createdby the solver will give you a better feeling for solutions of ODEs and how they behave when theunderlying model changes.

From time to time we will give practical tips that will help you avoid some of the frustrationsin using your solver. Here is some advice you can use right now:

• Numerical solvers are designed to solve initial value problems where the ODE is in normalform. Before using your solver, write your ODE in normal form and identify the rate function.Next, examine the initial condition and identify the initial timet0 and the initial valuey0.Finally, choose a solve-time interval for either forward or backward solving. Your solver mayask you for these items. Some solvers allow users the option to enter initial points graphicallyby clicking directly on the screen. Most solvers allow users to insert settings for the solveritself, but these are often set by default and not adjusted until something goes wrong.

• If your solver does not give you the option of setting your own scale on the axes at the outset,then not to worry: go ahead and let your solver set the scales automatically and then look atthe result. It may be just what you wanted. If not, then at this stage your solver will let youselect your own scales on the axes.

• Your solver may continue to crank away and never seem to come to an end. In that case youmay want to abort and take a shorter solve-time interval. This usually happens when ratefunctions are very large, and so examining the rate function at the outset will give you a cluethat you may run into a problem with the choice of a solve-time interval.

• Many solvers allow the user to choose the number of computed points (equally spaced intime) to display on the screen; these points are then connected with straight line segments. Ifthe graph produced by your solver looks partly like a broken-line graph, then you should goback and increase the number of displayed points and solve again.

Page 3: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.1/ A Modeling Adventure 3

• Some solvers have trouble dealing with IVPs like

y′ = ay− cy2− H(t), y(t0) = y0

if the harvesting functionH is not continuous (for example, a step function). One way to copewith the problem is to choose a very large number of displayed points, but this doesn’t workwith all solvers. So you may have trouble reproducing the figures in Problems 6 and 7. In anycase, your solver will have to work hard (or be clever) in order to handle on-off harvestingfunctions (Appendix B.1 describes these functions). Here’s a way that some solvers deal withthis problem: The solver computes values at the equally spaced time points displayed on thecomputer screen by using internal time-steps which are selected automatically in order tostay within specified error bounds (selected by default), but even this process can be defeatedby discontinuous harvesting functions. The problem appears to be that internal time-stepsbecome so large that they miss the on-off points of the harvesting function. Some solvershave a setting that allows the user to select a maximum internal step size, and if it is setlow enough then the solver will be better able to “see” the on-off points of the harvestingfunction. Some really sophisticated solvers will handle this fairly well when on-off functionsare detected.

1. (a). You can solve the IVP,y′ = ay, y(0) = y0, the easy way by replacingH by 0 informula (9), the formula that gives the solution of initial value problem (4). Soy= y0eat

for t ≥ 0. We make the restrictiont ≥ 0, not because there is any difficulty in defining theexponential for negative values oft, but because the fishing model has been formulated forfuture projections only. If the initial value problem (4) is valid for the past as well, then wedon’t need the restrictiont ≥ 0.

You could also repeat the steps given in this section for getting from IVP (4) to for-mula (9), replacingH by 0 every step of the way. This step-by-step derivation is an aid tounderstanding just why the formulay= y0eat gives the unique solution for each value ofy0. This solution formula makes sense if you remember from calculus that the exponentialfunctioneat is the only function whose derivative is a multiple of itself.

3. (a). The terms in the model ODE,y′ = ay− cy2+ R, have the following interpretation:y(t) is the fish tonnage at timet, y′ is the rate of changedy(t)/dt in the fish tonnage;a isthe difference between the population’s birth and death rates (ignoring both overcrowdingand harvesting);c is the overcrowding coefficient and is measured in (ton·year)−1 so thatcy2 has units of tons/year;R is the restocking rate in tons/year and is assumed to be apositive function, but not necessarily constant.

5. (a). The model IVP,y′ = ay− cy2− H0y, y(0) = y0, wherea, c, H0, andy0 are positiveconstants, models a harvesting situation where the harvesting rate at timet, H0y(t), isproportional to the tonnagey(t) of fish. The termy′ represents the change in fish tonnagey; a is the difference between the population’s birth and death rates (ignoring overcrowdingand harvesting);c is the overcrowding coefficient. The harvesting rateH0y(t) makes a lotof sense because it means that the tonnage caught rises or falls with the amount of fishactually in the lake. This is called a constant effort model because the ratio of the harvestingrate to the population is the constantH0, so the same amount of effort is expended whateverthe size of the population. One day your nets will be full because there are a lot of fish in the

Page 4: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

4 Chapter 1/ First-Order Differential Equations and Models

lake, another day with the same effort your nets will be nearly empty because the numberof fish is low.

7. Our solver uses the square wave functionAsqw(t,d, T) to represent a periodic on-offfunction with periodT, amplitudeA, and “duty cycle”d%. Duty cycle is an engineeringterm for the percentage of the total period that the function is actually on; it is assumedthat the on-time is always at the beginning of each period of the cycle. For example,4sqw(t,50,1) represents an on-off function of amplitude 4 that has value 4 for the firsthalf (i.e., 50%) of the cycle of period 1, and value 0 for the last half. See Appendix B.1for graphs of sqw(t,d, T) and other on-off functions that are widely used in engineering,science, and mathematics.

Careful measurements of the two graphs in Figures 1.1.7 and 1.1.8 show that harvestingis “on” for the first two months of each year (since the solution curves fall during theseperiods) in the first graph (sod= 100/6= 16.66%), and “on” for the first eight months ofthe year in the second graph (since now the curves fall during the first 8/12 of each year) [sod = (8/12)100= 66.66%]. The graphs are similar, but the initial population size neededfor survival starts a lot lower (somewhere slightly belowy0= 1.0) in the two-month harvestseason case. With an eight-month season there is a dangerously wide extinction range ofvalues ofy0, extending all the way up to somewhere betweeny0 = 4.5 andy0 = 5.

Here’s acomputer tip: if possible, lower the maximum internal step size of yournumerical solver so that your solver doesn’t overlook the on-off times of the harvest season.We lowered the maximum internal step size of our solver from 1.0 to 0.05 to avoid thisproblem.

t

y

Problem7, Graph 1.

t

y

Problem7, Graph 2.

Background Material: Growth Processes

The U.S. Bureau of the Census frequently predicts population trends. To do this, demog-raphers use known population data to formulate “laws” of population change. Each lawis converted into a mathematical formula that can then be used to make the predictions.Since there is a good deal of uncertainty about which law best describes actual populationshifts, several are derived, each proceeding from different assumptions. Similarly, ecolo-gists make predictions about changes in the numbers of fish and animal populations, and

Page 5: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.1/ A Modeling Adventure 5

biologists formulate laws for changing densities of bacteria growing in cultures. Let’s in-troduce some general laws of population change, solve the corresponding mathematicalmodels, and interpret the results in terms of the growth, stabilization, or decline of a popu-lation.

Background Material: Growth Models

Suppose thaty(t) denotes the population at timet of a species. The values ofy(t) areintegers and change by integer amounts as time goes on. However, for a large populationan increase by one or two over a short time span is infinitesimal relative to the total, andwe may think of the population as changing continuously instead of by discrete jumps.Once we assume thaty(t) is continuous, we might as well smooth off any corners on thegraph ofy(t) and assume that the function is differentiable. If we had lety(t) denote thepopulationdensity(i.e., the number per unit area or volume of habitat), the continuity anddifferentiability of y(t) would have seemed more natural. However, we shall continue tointerprety(t) as the size of the population, rather than density.

The underlying principle

Net rate of change= Rate in−Rate out (i)

applies to the changing populationy(t). For a population, the “Rate in” term is the sum ofthe birth and the immigration rates, while the “Rate out” term is the sum of the death andthe emigration rates. Let’s regroup the rates into an internal rate (birth minus death) andexternal rate (immigration minus emigration). Averaged over all classes of age, sex, andfertility, a typical individual makes a net contributionR to the internal rate of change. Theinternal rate of change at timet is, then,Ry(t), where

Ry= (Individual’s contribution)× (Number of individuals)

Theintrinsic rate coefficient Rwill differ from species to species, but it always denotes theaverage individual’s contribution to the rate. Given the rate coefficientR and the migrationrateM, we see that

y′(t) = Ry(t)+ M (ii)

and the study of population changes becomes the problem of solving ODE (ii) fory(t).In many casesR andM can be approximated by constants or else by simple functions

of the population levels and time. If simple models suffice for observed growth processes,there is little need for more complex assumptions. In modeling, it’s considered better tohave fewer assumptions.

Background Material: Exponential Growth

It may safely be pronounced, therefore, that population, when unchecked, goes ondoubling itself every twenty-five years.

Malthus

Thomas Robert Malthus (1766–1834) was a professor of history and political economy inEngland. The quotation is from “An Essay on the Principle of Population As It Affects the

Page 6: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

6 Chapter 1/ First-Order Differential Equations and Models

Future Improvement of Society.” Malthus’s views have had a profound effect on Westernthought. Both Darwin and Wallace have said that it was reading Malthus that led them tothe theory of evolution.

The Malthusian principle of explosive growth of human populations has become oneof the classic laws of population change. The principle follows directly from (ii) if we setM = 0 and letR= r , a positive constant whose units are (time)−1. ODE (ii) becomes thelinear ODEy′ = ry which has the exponentially growing solution

y(t) = y0ert , for all t ≥ 0 (i)

wherey0 is the population at the timet = 0. We see from (i) that thedoubling timeof aspecies is given byT = (ln2)/r since if y(t+ T) = 2y(t), then

y0er (t+T) = 2y0ert

erT = 2

T = 1r

ln2

Note the close connection with the half-life of a radioactive element (see Section 1.5).Malthus claimed a doubling time of 25 years for the human population, which implies

that the corresponding rate coefficientr = (1/T) ln2= (1/25) ln 2∼= 0.02777. Let’s usethis information to calculate the annual percentage increase in a population with a 25 yeardoubling time. The solution formula (i) implies that

y(t+ 1)/y(t) = y0er (t+1)

y0ert = er

and so Malthus’s value ofr = 0.02777 gives us thaty(t + 1)/y(t) ≈ 1.0282. This cor-responds to a 2.8% annual increase in population. Malthus’s figure forr is too high forour late-twentieth-century world. However, individual countries, for example, Mexico andSri Lanka, have intrinsic rate coefficients which exceed 0.02777 and may be as high as0.033 with a corresponding doubling time of 21 years. You may want to use an Almanacto calculate the intrinsic rate coefficient for the U.S.A.

Background Material: Logistic Growth

The positive checks to population are extremely various and include . . . all unwhole-some occupations, severe labor and exposure to the seasons, extreme poverty, badnursing of children, great towns, excesses of all kinds, the whole train of commondiseases and epidemics, wars, plague, and famine.

Malthus

The unbridled growth of a population (as predicted by the simple Malthusian law ofexponential increase) cannot continue forever. Malthus claimed that resources grow atmost arithmetically, i.e., the net increase in resources each year does not exceed a fixedconstant. An exponential increase in the size of a population must soon outstrip availableresources. The resulting hardships would surely put a damper on growth.

Page 7: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.2/ Visualizing Solution Curves 7

The simplest way to model restricted growth with no net migration is to account forovercrowding by requiring the rate coefficientR to have the formr0− r1y, wherer0 andr1 are positive constants. Sincer0 − r1y is negative wheny is large, y′ = (r0 − r1y)yis negative and the population declines. It is customary to write the rate coefficient asr(1− y/K), wherer and K are positive constants, rather than asr0− r1y. We then havethe logistic equationwith initial condition,

y′ = r(1− y

K

)y, y(0) = y0 (i)

Observe thaty(t) = 0 andy(t) = K are constant solutions of the logistic equation, the so-calledequilibrium solutions. The coefficientr is the logistic rate coefficientand K is thecarrying capacityof the species.

-

6Exponential

Logistic

P

t

The logistic equation and its solutions were introduced in the 1840s by the Belgianstatistician Pierre-Franc¸ois Verhulst (1804–1849). He predicted that the population of Bel-gium would eventually level off at 9,500,000. The estimated 1994 population of a littlemore than 10,000,000 is remarkably close to the predicted value.

Logistic laws are well suited to laboratory or other isolated populations for which thereis reason to believe thatK and r are constants. Beginning with the experiments of theSoviet biologist G.F. Gauze in the early 1930s, there have been numerous experiments withcolonies of protozoa growing under controlled laboratory conditions. The results of theseexperiments generally confirm the logistic model. See J.H. Vandermeer, “The CompetitiveStructure of Communities: An Experimental Approach with Protozoa,”Ecology50 (1969),pp. 362–371.

1.2 Visualizing Solution Curves

CommentsIn this section we connect the form of the rate functionf (t, y) in the ODE y′ = f (t, y) to thebehavior of a solution curve. For example, iff (t, y) is positive at a point(t, y), then the solutioncurve through that point has a positive slope and is rising. The nullclines in thety-plane divide theregions where solution curves rise from regions where they fall, so we discuss how to find nullclinesby solving f (t, y) = 0. We discuss several other ways to visualize the behavior of solution curves.

1. The IVP isy′ = y− y2/12− H(t), y(0) = y0, where

H(t) ={

4, 0≤ t ≤ 50, 5≤ t ≤ 10

and y0 lies between 0 and 20. The simplest way to find the smallest value ofy0 such thatthe population recovers after the harvesting stops is to sety(5) = 0, solvebackwardin tuntil t = 0, and then estimate the value ofy(0) from the graph of the approximate solution.See Fig. 1 where the points(5,0) and (0, y(0)) are specially marked. From the graph,y(0) ≈ 7.45.

Page 8: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

8 Chapter 1/ First-Order Differential Equations and Models

t

y

Problem1.

3. The regions inR where a solution curve rises are precisely the regions wherey′ > 0. Tofind these regions, first rewrite each ODE in the formy′ = f (t, y). Then setf (t, y) = 0so that we can find the equations of some parts of the boundary curve of the region wheref is positive (i.e., wherey′ is positive). These boundary curves are the nullclines. In eachgraph we use a dashed line for the nullcline that defines the boundary.

(a). See Fig. 3(a). The region of rising solution curves for the ODE,y′ = 1− y, is theregion below the horizontal nullcline liney= 1, (i.e., the region described byy< 1). Herethe nullcline coincides with the equilibrium solution curvey = 1, so you can’t see thedashed line.

(c). See Fig. 3(c). The region of rising solution curves for the ODE,y′ = 1+ t− y, is theregion below the nullcline line,y= 1+ t, the region described byy< 1+ t.

t

y

Problem3(a).

t

y

Problem3(c).

5. Figure (5), Graph 1 shows the solution curves of the IVP,y′ = −2y+ 3et, y(0) = −5,−4, . . . , 4, 5, in the rectangle 0≤ t ≤ 3, −5≤ y≤ 20. It appears that the solution curvesconverge to one another ast increases and eventually curve upwards as if the correspond-ing solutions are exponentially increasing. The apparent merging of solution curves at theupper right of Fig. (5), Graph 1 is an illusion caused by the finite number of pixels on acomputer screen. In Fig. (5), Graph 2 we zoom in on the rectangle 2.996≤ t ≤ 3.000,20.06≤ y≤ 20.09, and we see that the solution curves don’t meet. Under the zoom mi-croscope the arcs of the solution curves look like parallel lines. This is no surprise because

Page 9: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.3/ The Search for Solution Formulas 9

over very short ranges fort and fory the rate function−2y+ 3et doesn’t change much, andso the slopes of the curves are nearly identical.

t

y

Problem5, Graph 1.

t

y

Problem5, Graph 2.

7. We don’t usually say much about group problems, but occasionally we do. If you arelooking for a rate functionf (t, y) that forces solution curves ofy′ = f (t, y) to do a lotof twisting, or turning, or explosive growth, try a trigonometric function int or y, or apolynomial iny. For example, use a numerical solver and take a look at the solution curvesof y′ = y3 sint, or of y′ = 3ysiny− t sint, in the rectangle 0≤ t ≤ 10, |y| < 5.

1.3 The Search for Solution Formulas

CommentsMost methods for finding solution formulas for first-order ODEs are based on “preparing” an ODEfor application of Antiderivative Theorem 1.3.1. That theorem is really “The Mother of All SolutionMethods,” even though it is just a slight reformulation of the Fundamental Theorem of Calculus. Itis the basis for most techniques for solving first-order ODEs in closed form.

We prepare a first-order linear ODE in normal form for antidifferentiation by multiplying by anintegrating factor. The separable ODE,N(y)y′ + M(x) = 0, is already in shape for antidifferentia-tion (Section 1.6), as are the exact ODEs of Problem 6 in Section 1.6. The changes of variables inthe last section of the chapter are applied to convert an ODE to a form that can then be prepared forantidifferentiation. So, it isn’t surprising that antidifferentiation lies at the heart of finding solutionformulas for ODEs.

First-order linear ODEs are the most important in applications, and that’s why we tackle themfirst. The integrating factor technique is straightforward, but it takes practice to make the steps ofthe solution recipe become natural. In this section, the two antiderivatives needed for the techniquecan be evaluated in terms of familiar functions. Section 1.4 considers some linear ODEs for whichthe antiderivatives can’t be easily calculated. That section takes up other features of linearity thatwe don’t have room to do here.

1. (a). The ODE,y′ = sint− t3y, is first order (due to the termy′), linear iny, and has normallinear form,y′ + t3y= sint.

Page 10: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

10 Chapter 1/ First-Order Differential Equations and Models

(c). The ODE,(t2+ y2)1/2 = y′ + t, is first order (due to the termy′) and nonlinear iny[due to the term(t2+ y2)1/2].

(e). The ODE,y′′ − t2y= sint+ (y′)2, is second order (due toy′′), and nonlinear iny [dueto (y′)2].

(g). The ODE,et y′′ + (sint)y′ + 3y= 5et, is second order (due toy′′), linear iny, and hasnormal linear form,y′′ + e−t(sint)y′ + 3e−t y= 5.

3. Replacey by rt3 in the ODE, and find the values ofr for which the equation holds for allt.

(a). t2y′′ + 6ty′ + 5y= 0 becomest2(6rt )+ 6t(3rt2)+ 5(rt3) = 29rt3 = 0, which holdsfor all t if and only if r = 0.

(c). Insertingy = rt3 into the ODEt4y′ = y2, we have 3rt6 = r2t6, and so 3r = r2. So,r = 0, 3, andy= 0, y= 3t3 are solutions.

5. In (a)–(f) the Antiderivative Theorem 1.3.1 is implemented by antidifferentiating each sideof the ODE.C, C1, C2, andC3 are arbitrary constants in the solutions below.

(a). Antidifferentiating both sides ofy′ = 5+ cost givesy= 5t+ sint+C.

(c). Antidifferentiating both sides givesy = ∫ e−t cos 2t dt.∫

e−t cos 2t dt is of the form∫eat cosbt dt. So from Table 1.3.1 we see that the solution isy = (e−t/5)(−cos2t +

2sin 2t)+C.

(e). Antidifferentiating y′′ = sint twice, we obtainy= −sint + C1t + C2. Applying theinitial conditions, we get the equationsC2= 0 andC1 = 2, soy= 2t− sint.

(g). Multiplying the ODEy′′ + y′ = et by et, we obtain(et y′)′ = e2t. Antidifferentiating,we obtainet y′ = e2t/2+C1. So,y′ = et/2+C1e−t. Antidifferentiating again,y= et/2−C1e−t +C2.

7. In each case the equation must first be written in normal linear form,y′ + p(t)y = q(t).Then the integrating factoreP(t), whereP(t) = ∫ p(t)dt, is calculated and each side ofthe ODE is multiplied byeP(t) to obtain(eP(t)y)′ = eP(t)q. Antidifferentiating and mul-tiplying by e−P(t) gives the family of solutionsy = e−P(t)C+ e−P(t)R(t), whereR(t) =∫

eP(t)q(t)dt. C is an arbitrary constant, andt lies in an interval for which the ODE isnormal andp(t) andq(t) are continuous. It is best to follow the steps of this recipe in eachcase, rather than memorize the solution formula. The use of integral tables will speed upthe calculations. In each case,−∞ < t <∞ unless otherwise noted.

(a). For y′ − 2ty = t, the integrating factor ise∫ −2t dt = e−t2. So, after multiplying by

e−t2, we have thate−t2(y′ − 2ty) = (e−t2 y)′ = te−t2. Integrating, we have thate−t2 y(t) =∫te−t2 dt=−e−t2/2+C. The general solution isy= Cet2− 1/2, whereC is any constant

and−∞ < t <∞.

(c). The normal form isy′ + (sint)y= sint, so the integrating factor ise∫

sint dt = e−cost.We obtaine−cost(y′ + (sint)y)= (e−cost y)′ = e−cost sint. Integrating,e−cost y= e−cost+C and the general solution isy= Cecost + 1 since

∫e−cost sint dt= e−cost.

(e). The normal form isy′ + ty= t/2, so the integrating factor ise∫

t dt = et2/2. We obtainet2/2(y′ + ty)= (et2/2y)′ = (t/2)et2/2. Integrating,et2/2y= (t/2)et2/2+C and the general

Page 11: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.4/ Modeling with Linear ODEs 11

solution isy= Ce−t2/2+ 1/2.

9. You may either use graphics to plot the solutions given by the formulas derived in Prob-lem 8, or you may apply a numerical solver directly to the appropriate IVP, as we did. SeeFigs. 9(a) and 9(c) for the solution curves of the IVPs of Problem 8.

t

y

Problem9(a).

t

y

Problem9(c).

11. First write the ODE in normal form, then find the integrating factor and solve to get thegeneral solution. Use the initial data to evaluate the arbitrary constantC in the generalsolution formula.

(a). The normal form forty′ + 2y = sint is y′ + (2/t)y = (1/t)sint, t > 0, and theintegrating factor ise

∫2t−1 dt = e2 ln |t| = t2. We obtain(t2y)′ = t sint. Integrating,t2y =

sint − t cost + C. So y = (1/t2)sint − (1/t)cost + C/t2. Sincey(π) = 1/π, 1/π =1/π+C/π2, soC= 0. The solution isy= (1/t2)sint− (1/t)cost, t > 0. As t→+∞,y(t)→ 0.

(c). The integrating factor fory′ + (cott)y = 2cost is e∫

cott dt = eln(sint) = sint. Weobtain ((sint)y)′ = 2sint cost. Integrating,(sint)y = sin2 t + C, so y = sint + Ccsct.Sincey(π/2) = 3, 3= sinπ/2+Ccscπ/2= 1+C soC= 2. The solution isy= sint+2csct, 0< t < π. As t→ 0+, y→+∞ since csct→+∞.

13. Group problem.

1.4 Modeling with Linear ODEs

CommentsWe like to focus on the total response formula (Theorem 1.4.5) and the Balance Law, because thosetwo items have such widespread applications and interpretations. We have given some of them inthis section in the context of mixture problems, and we will include others later in the book.

Other than doing a “good guessing” example, we don’t make a big deal about the structure ofthe solution set of a first order linear ODE because it will come up again in Chapter 3 when wetreat second-order linear ODEs, and again in Chapter 7, where linear systems are handled. So why

Page 12: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

12 Chapter 1/ First-Order Differential Equations and Models

have we put the structure stuff here at all? Mostly for the readers who want to see and understandthe theory of a linear ODE, and because it does serve as a neat way to look at the solution formulaproduced by the recipe of the last section for constructing a general solution.

We always do some models with step function inputs because these inputs are so common inapplications, numerical solvers (most of them) can handle these functions, and they are easy tounderstand and appreciate. As step functions show, a computer can easily handle some things thata solution formula has trouble with.

1. Let’s denote the amount of waste (measured in gallons) in the tank at timet (measured inminutes) byy(t). By the Balance Law, we have

y′ = Rate in−Rate out

= rin − y(t)1000

· rout

whererin is the inflow rate of waste (in gal/min),y/1000 is the concentration of waste in thetank (in gallons of waste per gallon of mixture), androut is the outflow rate of contaminatedwater (in gal/min). For parts(a) and(b), rin = 1= rout. At time 0, the water in the tank isclean, soy(0) = 0.

(a). The IVP is

y′ = 1− y1000

· 1= 1− 0.001y, y(0) = 0

In normal linear form the ODE is

y′ + 0.001y= 1

so the integrating factor ise0.001t. We obtain(e0.001t y)′ = e0.001t. Integrating,e0.001t y =1000e0.001t +C, so solutions of the ODE have the form

y= Ce−0.001t + 1000

Imposing the initial conditiony(0) = 0, we see thatC= −1000, so

y(t) = 1000(1− e−0.001t ) gallons

As t→+∞, e−0.001t→ 0, so the pollution becomes total andy(t)→ 1000 gallons.

(c). Let’s model the sudden change in the waste inflow rate from 1 gal/min to 0 gal/min(the change occurs att = 60 min). So

rin ={

1, 0≤ t ≤ 600, t > 60

= step(60− t), t ≥ 0

The modeling IVP then is

y′ = step(60− t)− y1000

· 1= step(60− t)− 0.001y

y(0) = 0

Page 13: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.4/ Modeling with Linear ODEs 13

Applying a numerical solver, we get the graph shown in Fig. 1(c) for the solutiony(t).Since there is no inflow of waste aftert = 60 min, we expect the amount of waste in the

tank to decline exponentially to 0 ast→+∞. We see from the figure that this exponentialdecay is pretty slow, and we see from the answer to part(a) that this is expected because ofthe terme−0.001t.

t

y

Problem1(c).

3. Two different ODEs describe the system, before, or aftert = 3 min. If S(t) denotes theamount of salt in the tank at timet, then for t < 3 min, S′ = (2lb/gal)(3gal/min) = 6lb/min. SoS= 6t+C. Since no salt is present initially,S(0) = 0+C andC= 0. S= 6tis the amount of salt in the tank fort < 3 min. Note that at 3 min,S= 6 · 3= 18 lb, whichbecomes the initial condition for the next time interval (t ≥ 3).

For t ≥ 3 min, S′ = (2lb/gal)(3gal/min)− (S/V)(3gal/min) = 6− 3S/V, whereVis the volume of water in the tank.V is constant fort ≥ 3 since inflow and outflow rates areequal. Usingt0 = 3 and an integrating factor exp(3t/V), [Sexp(3t/V)] ′ = 6exp(3t/V),so

S= 2V+Cexp(−3t/V), t ≥ 3.

SinceV = 50+ (3gal/min)(3min)= 59 gal andS(3)= 18 lbs, we must haveS(3)= 18=2(59)+Cexp(−3 · 3/59) = 118+Cexp(−9/59). So,C= −100exp(9/59) and

S= 118− 100exp(−3(t− t0)/59)

for t > 3.

(a). Whent = 2 min, S(2)= 6 ·2= 12 lbs salt. Whent = 25 min,S= 118−100exp(−3 ·22/59) = 85.3 lbs salt.

5. We use the solution formulas found in Problem 4[see “Answers to Selected Problems” atthe end of the text for parts(a), (c), and(e)] . In every case in this specific problem thegeneral solutionyu of the undriven ODE tends to 0 ast→ +∞ (of course, this will notalways be the case). So the general solution of the driven ODE approaches the particularsolution found in the corresponding part of Problem 4.

(a). As t→+∞, all solutions tend to the parabolic curve described byyd = t2− 2t+ 2.

(c). As t→+∞, all solutions tend to 0, sinceyd = te−2t has this property.

Page 14: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

14 Chapter 1/ First-Order Differential Equations and Models

(e). As t→+∞, all solutions tend to the periodic function of periodπ, yd = −cos2t +2sin 2t.

7. The integrating factor of the undriven linear ODEy′ +2ty= 0 iset2. So the general solutionof that ODE isyu = Ce−t2. As t→+∞, yu(t)→ 0. This means that all solutions of thedriven ODE,y′ + 2ty= q(t), tend to some particular solutionyd(t) sincey(t) = yu+ yd.In each case we use a numerical solver for 0≤ t ≤ 10 with y(0) = 0,±2,±4.

(a). The general solution ofy′ + 2ty= 1 is y= Ce−t2 + e−t2∫

et2dt, but we can’t expressthe integral in terms of any of the elementary functions. So we turn to a numerical solverto solve the IVPs. From Fig 7(a), we conjecture that ast→+∞, all solutions tend to 0.

(c). The general solution ofy′ + 2ty= 1+ t2 is y= Ce−t2+ e−t2∫

et2(1+ t2)dt. Lookingat Fig. 7(c) it looks as ify(t) tends to a straight line ast→ +∞. Measuring the “rise”and the “run” from the figure, we guess that the straight line asymptote has a slope of 1/2.Moreover, putting a straight-edge on the graph, it looks as if the line would go through thepoint t = 0, y= 0. So one might conclude that ast→+∞ all solutions tend to the liney= t/2, although we haven’t actually proved this. Note, however, that there is no straightline solutiony(t) = A+ Bt which solves the ODE.

t

y

Problem7(a).

t

y

Problem7(c).

9. (a). See Fig 9(a) for the graphs of the solutions of the IVPsy′ + y = 0, y(−5) =0,±2,±4.

(b). See Fig 9(b) for the graph of the solution ofy′ + y= t cos(t2), y(−5) = 4.

(c). Fig. 9(a) shows the responseyh(t) = Ce−t to initial datay(−5) = 0,±2,±4 with noinput, and Fig. 9(b) [see part(b)] the total response to initial datay(−5) = 4 and to inputq(t)= t cos(t2). The response to any initial data dies out with increasing time. A sinusoidalresponse [apparently with rapidly increasing frequency like that of the inputq(t)] due to thedriving term remains. The solution curves in Fig. 9(c) show the superpositions of these tworesponses. As the initial response dies out, all solutions converge to the driven response.

Page 15: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.4/ Modeling with Linear ODEs 15

t

y

Problem9(a).

t

yProblem9(b).

t

y

Problem9(c).

11. Here you can find the solutions of the IVPs explicitly by the integrating factor technique,and then plot the graph. You can also just use a numerical solver/grapher directly withoutbothering to find explicit solution formulas. We give these formulas below in terms of aconstantC, which must be evaluated by using the given initial condition. However, wedid the graphs with our numerical solver, ignoring the solution formulas. Your solver mayreturn error messages as ours did in parts(c) and(d) because of a singularity at the origin[part (c)] and at the interval’s endpoints [part(d)]. In part (c) do whatever you can to getthe graph of the solutiony= t2/4 through the origin.

(a). The integrating factor fory′ = (sint)(1− y) is e−cost, and the general solution isy= 1+Cecost, −∞ < t <∞. See Fig. 11(a) for the solution curves withy(−π/2)=−1,0, 1.

(c). The integrating factor for the ODE in normal form,y′ + 2y/t = t, t 6= 0, is t2, and thegeneral solution isy= t2/4+Ct−2, t > 0, or t < 0. See Fig. 11(c) for the solution curveswith y(±2) = 0, 1, 2. Note thaty= t2/4 is the only solution defined for allt. Solutionswith positiveC go to+∞ ast→ 0; solutions with negativeC go to−∞.

t

y

Problem11(a).

t

y

Problem11(c).

13. The general solution of the linear ODE,y′ + y= q(t) is y= Ce−t + yd(t), whereyd is anyparticular solution. In this problem we assume that there is some solutionyd(t) that “blowsup” ast→+∞, [i.e., yd(t)→+∞ ast→+∞]. Then, we see from the general solution

Page 16: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

16 Chapter 1/ First-Order Differential Equations and Models

formula that all solutions have this property sinceCe−t→ 0 ast→+∞, and so this termhas no effect on the asymptotic behavior ast→+∞.

15. (a). The amountA(1) at the end of one year with 9% continuous compounding isA(1) =A0e0.09 since the model equation isA′ = 0.09A, A(0) = A0. Setting this equal to theamount after one year with interest payable annually at a rater%, we haveA0e0.09 =A0(1+ r/100), or r/100= e0.09− 1≈ 0.0942, (i.e., the annual interest rate would have tobe 9.42% to yield the same amount as continuous compounding at 9%).

(c). We must findt such that 2A0 = A0ekt for k = 0.05, 0.09, and 0.12. CancelingA0,taking logarithms, and solving fort, the respective doubling times are approximately 13.86,7.70, and 5.78 years.

17. Group project.

1.5 Introduction to Modeling and Systems

CommentsThis section is the longest in the text. The main aim of this section is to communicate the ideathat one can often create a mathematical model of a natural process if the system is described by acollection of laws or principles. These laws, which are usually based on experiment, observation,and insight, need not be expressed in mathematical terms. The mathematical modeler translatesthe laws into mathematical equations, ODEs and IVPs, using the methods of this chapter. In thissection, the translation process, the solution of the mathematical equations, and the interpretationof the mathematical solution are explained by using the examples of motion along the local verticaland of radioactive decay. The notions of state variables and dynamical systems are introduced (in animprecise way) so that the reader can see that a finite collection of variables that change in time oftenis adequate to describe the evolution of a natural process. The exact definition of a dynamical systemin terms of a relation such asy(t2+ t1, y0) = y(t2, y(t1, y0)), y(t0) = y0, seems inappropriate atthis early stage. In this book dynamical systems are mostly modeled with differential equations. InChapter 2, when numerical methods for solving ODEs are introduced, discrete dynamical systemsare considered (see Section 2.7). Any one-step numerical ODE solver algorithm (e.g., the Euler orRunge-Kutta methods of Section 2.5) can be considered to be a discrete dynamical simulation of theODE. One may even treat the discrete solver algorithm as a discrete model of the original naturalphenomenon.

A secondary aim of this section is to introduce the notion of a differential system in a mild wayand to establish the connection between differential systems, modeling, and dynamical systems.The vertical motion model does that in a familiar environment. Section 1.7 takes up systems in amuch more serious way.

Modeling is a complex process, and people become adept at it mostly by extensive practicerather than by memorizing modeling rules or schematics. For this reason, it is probably best to workthrough a specific modeling process rather than to think about modeling principles in the abstract.

An experimentThrow a whiffle ball up into the air; does it take longer to go up or to come down? Ask a groupthis question, and we guarantee that the responses will divide four ways: longer going up, longer

Page 17: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.5/ Introduction to Modeling and Systems 17

coming down, equal times, or it all depends. If you are in a room with a high ceiling, throw a realwhiffle ball up and ask everyone the same question. You will probably get the same four responses,because it is hard to tell the times by just watching the ball. You may want to devise some way to doalternate experiments with a whiffle ball. Even in this simple setting, the proof that the fall time islonger is hard [Problem 9(c)], but the computer simulation (Figures 1.5.3, 1.5.4) shows the answerquite dramatically. See the article, “Projectile Motion with Arbitrary Resistance,” Tilak de Alwis,The College Mathematics Journal, 26 (1995), 361–367, for a general discussion (with additionalreferences) of vertical motion against resistance.

The other process modeled in the text is radioactive decay and its application to dating. Youmight find something radioactive and test it with a Geiger counter, but this doesn’t sound very ap-pealing. The notion of a half-life is important here. See also the background material for Section 1.1.

1. The rate equation isN′ = −kN, wherek is a positive constant. The ODE can be solvedby multiplying by the integrating factorekt and rewriting asektN′ + kektN = [ektN] ′ = 0.So we have thatektN = C, or N(t) = Ce−kt, whereC is any constant. The half-life isrelated to the value ofk by kτ = ln2. To see this, note thatN(0) = C. At the timet = τ,N(0)/2 = N(0)e−kτ so 1/2 = e−kτ, or kτ = ln 2. The data of the problem imply that0.989N0 = N0e−25k, whereN0 = N(0). CancelingN0, taking logarithms, and solving forthe constantk, we have thatk = −(ln0.989)/25= 0.000442 (years)−1 So the half-life isτ = (ln 2)/k≈ 1567 years.

3. If N(t) is the amount of the phosphorus at timet (in days), thenN(0)= 8, andN(t)= 8e−kt

[from formula (6)]. Nowk = (ln 2)/14.2= 0.0488/day from text formula (7). To find thetime t for which N(t) = 1.0× 10−5, we have 1× 10−5 = 8e−0.0488t. Taking logarithmsand solving fort, we havet = 278.5 days.

5. The model equations are

y′′(t) = −g, y(0) = 0, y′(0) = 2000 cm/sec

wherey(t) is the height of the body of mass 600 gm above the ground at timet. The modelequations are valid for 0≤ t ≤ T, whereT is the positive time of impact at whichy(T)= 0.The value ofg is 980 cm/sec2.

(a). Integrating each side ofy′′ = −g from t = 0 to a general value oft, 0≤ t ≤ T, we havethat y′(t)− y′(0) = −gt. Sincev0 = y′(0) = 2000 cm/sec and since the velocityy′(t) is 0at the highest point, 0−2000=−gt sot = 2000/g≈ 2.04 sec. Integratingy′′ = −g twice,we havey(t) = y0+ v0t− (1/2)gt2. With the highest point reached at timet ≈ 2.04 sec,an initial velocityv0 of 2000 cm/sec, and a zero initial heighty0, we find that the highestpoint reached is about 2041 cm.

7. The model IVPs ares′′ = −g, s(0) = H, s′(0) = 0 for the positions(t) of the stone(valid for 0≤ t ≤ T), andb′′ = −g, b(1.5) = H, b′(1.5) = −20 for the positionb(t)of the ball (valid for 1.5 ≤ t ≤ T), wheres(t) and b(t) are the heights of the stone andthe ball above the ground at timet, H is the height of the building, andT is the timethe stone and the ball hit the ground. In general, we havey(t) = y0 + v0t − gt2/2 ify′′ = −g, y(0) = y0, y′(0) = v0, which is the form of both model IVPs.

Page 18: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

18 Chapter 1/ First-Order Differential Equations and Models

(a). At impact,s(T) = H − 4.9T2 since the initial velocity of the stone is 0. On the otherhand,b(T)= H− 20(T− 1.5)− 4.9(T− 1.5)2 since the initial velocity of the baseball is20 meters/second and the flight time of the ball is 1.5 seconds shorter than that of the stone.Since both the ball and the stone hit the ground at timeT, s(T) = b(T), so H − 4.9T2 =H − 20(T − 1.5)− 4.9(T − 1.5)2. CancelingH and−4.9T2 and solving forT, we havethat T ≈ 3.58 sec. Now we have thatH − S(T) = 4.9T2 ≈ 4.9(3.58)2 ≈ 62.8, which isthe height of the building in meters.

9. (a). With the origin at ground level and up as the positive direction, the whiffle ball isinitially at y(0) = h with initial velocity y′(0) = v0. The whiffle ball undergoes viscousdamping due to air resistance, and so we see from (10) thatmy′′ = −mg− ky′. Recallingthat y′ = v, we havey′′ = v′, somv′ = −mg− kv. Solving forv′, v′ = −g− (k/m)v. Theinitial conditions becomey(0) = h andv(0) = v0.

(c). The strategy is to findT (the time it takes to reach maximum height) and show thaty(2T) > h, which implies thatτ > 2T, whereτ is the time it takes for the whiffle ball tofall back to its initial positiony= h. Then we will have that the timeτ to rise and fall islonger than twice the timeT to rise to the maximum height, so the time to fall must belonger than the time to rise.

Solving the IVP,v′ + v = −g, v(0) = v0, we obtainv(t) = −g+ (v0+ g)e−t. Settingv(T) = 0 and solving forT,

T = ln(1+ v0/g)

and so this value ofT is the time it takes the whiffle ball to reach maximum height. Nowsincey′(t) = v(t) = −g+ (v0+ g)e−t, andy(0) = h. Integrating, we see that

y(t) = −gt− (v0+ g)e−t + v0+ g+ h

So evaluatingy(t) at 2T and substituting in our expression forT, we have

y(2T) = −2gT− (v0+ g)e−2T + v0+ g+ h

= −2g ln(1+ v0/g)− g2/(v0+ g)+ v0+ g+ h

Define the functionf (v0) = y(2T)− h, and so

f (v0) = −2g ln(1+ v0/g)− g2/(v0+ g)+ v0+ g

If we can show thatf (v0) > 0 for v0 > 0, theny(2T) > h. First, we note thatf (0) =−2g ln1− g2/g+ 0+ g= 0. To show thatf (v0) > 0 for v0 > 0 all we need to do is toshow thatd f/dv0 > 0 for v0 > 0:

d fdv0= −2gv0+ g

+ g2

(v0+ g)2+ 1

= −2g(v0+ g)+ g2+ (v0+ g)2

(v0+ g)2= v2

0

(v0+ g)2> 0

and so f (v0) is an increasing function ofv0 which is positive ifv0 > 0. This shows thaty(2T) > h and it takes longer for the whiffle ball to fall through a given distance than it

Page 19: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.5/ Introduction to Modeling and Systems 19

does to rise the same distance. This is reasonable because the gravitational and resistanceforces oppose each other during the fall (and so the magnitude of the acceleration is lower),but these two forces act in the same direction during the rise.

11. (a). Let Q(t) = q(t)/q0. Then Q′(t) = q′(t)/q0. The IVP q′ = −kq, q(0) = q0, ischanged into the IVP,Q′(t) = −kQ(t), Q(0) = 1. Also, a careful reading of Problem 10reveals thatQ(T) = qT/q0 = q′(T)/q′(0) = 13.5/1.69. Therefore, the IVP in the scaledvariableQ is Q′ = −kQ, Q(0) = 1, T ≤ t ≤ 0, and the problem is to find the value ofTsuch thatQ(T) = 13.5/1.69≈ 7.988.

13. We haveq(T) = q0e−kT where T is the time that has passed since the shell was liv-ing. Solving forT, we findT = −(1/k) ln(q(T)/q(0)) = −(τ/ ln2) ln(q′(T)/q′(0)), soT =−5568 ln(0.6 · 13.5/13.5) / ln2= −5568 ln(0.6)/ln2= 4103 years, which is the ap-proximate age of the shell.

15. This is a hard problem because there doesn’t seem to be enough information. And thereisn’t! The challenge is to assume just enough extra that is plausible and leads to a solution.Different people will make different assumptions and get different times for the start ofthe snowfall. Here is one set of assumptions and the corresponding solution. Assumethat the sidewalk has constant width and the man does not turn back. Let timet in hoursbe measured forward from 12 noon. Since the snow falls steadily, the depth of the snow attime t in inches ish(t)= a(t− T), whereT is the time the snow began to fall [T < 0] andais an unknown rate constant. Letx(t) be the position in blocks of the shoveler at timet ≥ 0.Thenx(0) = 0, x(2) = 2, x(4) = 3. The amount of snow1V removed in the time spanfrom t to t+1t as the shoveler moves fromx to x+1x is1V =w1xh(t∗), wherew is thewidth of the sidewalk, andt∗ is some value of time betweent andt+1t [h(t) would be toosmall andh(t+1t) too large]. Divide1V by1t and let1t→ 0 (forcing t∗ → t) to obtainthe snow removal rater = lim1t→01V/1t = w lim1t→0(1x/1t)h(t∗)= wx′(t)a(t− T).Let b = r/wa to obtain the rate equation for the shoveler’s walk:x′ = b/(t − T). So,x(t)= b ln(t− T)+C, wheret ≥ 0 andC is a constant. Our goal is to findT. We have that0= b ln(−T)+C, 2= b ln(2− T)+C, 3= b ln(4− T)+C. Divide the difference of thefirst two equations by the difference of the last two to obtain 2= ln(2−T

−T )/ln(4−T2−T ), where

we have used lny− ln z= ln(y/z). Cross-multiply by ln4−T2−T and use 2 ln(u) = ln(u)2 for

u > 0 to obtain ln(4−T2−T )

2 = ln(2−T−T ). So (4−T

2−T )2 = 2−T

−T . Clearing fractions, multiplyingout and combining terms, we have thatT2− 2T − 4= 0. So,T = 1±√1+ 4. SinceTmust be negative, we conclude that the snow began to fall atT = 1−√5= −1.236 hoursbefore noon, in other words, at 10:46 A.M.

Background Material: Modeling Principle

A guiding principle of modeling is Occam’s Razor:

Page 20: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

20 Chapter 1/ First-Order Differential Equations and Models

Occam’s Razor. What can be accounted for by fewer assumptions is explained in vainby more.

William of Occam (1285–1349) was an English theologian and philosopher who appliedthe Razor to arguments of every kind. The principle is called the Razor because Occamused it so often and so sharply.

Background Material: Radioactive Decay Law

A primitive form of the decay law would go something like this:

Radioactive Decay Law. In a sample containing a large number of radioactive nucleithe decrease in the number over time is directly proportional to the elapsed time andto the number of nuclei at the start.

Denoting the number of radioactive nuclei in the sample at timet by N(t), and a timeinterval by1t, the law translates to the mathematical equation

N(t+1t)− N(t)= −kN(t)1t (i)

wherek is a positive coefficient of proportionality. Observation suggests that in most decayprocessesk is independent oft and N. A decay process of this type is said to be offirstorder with rate constant k.

The mathematical model (i) of the decay law helps us to spot flaws in the law itself.N(t) and N(t+1t) must be integers, butk1t need not be an integer, or even a fraction.If we want to keep the form of the law, we must transform the real phenomenon into anidealization in which a continuous rather than a discrete amountN(t) undergoes decay. Thenumber of nuclei can be calculated from the mass of the sample at any given time. So thereis no need to be specific about the units forN or t at this point. Even ifN(t) is continuous,(i) could not hold for arbitrarily large1t sinceN(t+1t)→ 0 as1t→∞. Nor does (i)make sense if1t is so small that no nucleus decays in the time span1t. The failure of thelaw for large1t can be ignored since we are interested only in local behavior in time. Thedifficulty with small1t is troublesome. We can only hope that the mathematical procedureswe now introduce will lead to a mathematical model from which accurate predictions canbe made.

If we divide both sides of formula (i) by1t and let1t→ 0 (ignoring the difficultywith small1t mentioned above), we have the linear ODE

N′(t) = lim1t→0

N(t+1T)− N(t)1t

= −kN(t) (ii)

Note thatk is measured in units of reciprocal time.

Page 21: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.6/ Separable Differential Equations 21

Background Material: Radiocarbon Dating

The accuracy of the dating process depends on a knowledge of the exact ratio of radioactive14C to the carbon in the atmosphere. The ratio is now known to have changed over the years.Volcanic eruptions and industrial smoke dump radioactively dead14C into the atmosphereand lower the ratio. But the most drastic change in recent times has occurred through thetesting of nuclear weapons, which releases radioactive14C, resulting in an increase of 100%in the ratio in some parts of the Northern Hemisphere. These events change the ratio in theatmosphere and so in living tissue. The variations are now factored into the dating process.

Since the experimental error in determining the rate constants for decay processes withlong half-lives is large, we would not expect to use this process to date events in the veryrecent past. Recent events can be dated if a radioactive substance with a short half-life isinvolved, e.g., white lead contains a radioactive isotope with a half-life of only 22 years.At the other extreme, radioactive substances such as uranium, with half-lives of billions ofyears, can be used to date the formation of the earth itself.

1.6 Separable Differential Equations

CommentsPeople often have difficulty with separable ODEs. If you have trouble separating the ODE intothe form N(y)y′ + M(x) = 0, try to movex and y onto different sides of the equals sign to getN(y)dy= −M(x)dx and then integrate each side. You may still have trouble after getting theODE separated because you can’t find the antiderivativesG(y) of N and F(x) of M. Because thesolution is written implicitly asG(y)+ F(x)= C, it may be hard to findy(x) explicitly (sometimesimpossible). These technical difficulties often lead people astray. Consequently, we encourage theuse of integral tables, or a CAS (if available), and checking (and rechecking) your algebra.

In this section, we explain the difference between an integral curve [the graph of the levelset G(y)+ F(x) = C0] and a solution curve [the graph ofy = y(x), x in some interval, whereG(y(x))+ F(x)= C0]. Because a solution curve is the graph of a differentiable functiony= y(x),the curve cannot double back on itself and cannot have vertical tangents.

The modeling/application involves the motion of falling bodies subject to Newtonian damping.Problem 6(d) takes up the “longer to rise or to fall” problem first encountered in Section 1.5, butnow in the setting of Newtonian damping. It still takes longer to fall than to rise.

1. The ODEy′ = 2xy2 evidently has the constant solutiony= 0, for all x. In addition, notethat the ODE is separable and can be written in the separable form asy′y−2= 2x. Fory 6= 0,we can integrate the separated ODE, obtaining−y−1= x2+C, or y=−(x2+C)−1 whereC is any constant.

So the general solution ofy′ = 2xy2 is given by y = 0 and the family of solutionsy= −1/(x2+C), C any constant. IfC≤ 0, x must lie in an interval on whichx2+C 6= 0.So for example ifC=−1, we have three solutions on the three intervals,x< −1, |x| < 1,andx> 1.

Page 22: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

22 Chapter 1/ First-Order Differential Equations and Models

3. (a). Separating variables iny′ = (y+ 1)/(x+ 1), we have(y+ 1)−1y′ − (x+ 1)−1 = 0,which integrates to ln|y+ 1| − ln |x+ 1| = K. So, ln(|y+ 1|/|x+ 1|) = K and|y+ 1| =|x+ 1|eK . That is,y+ 1= ±eK(x+ 1), i.e., y= −1+C(x+ 1), where we have renamed±eK by C. Since y(1) = 1, 1= −1+ 2C, so C = 1. The solution becomesy = x,−1< x<∞, sincey′ is undefined atx= −1.

(c). The ODEy′ = ye−x separates toy−1 dy= e−x dx, which integrates to ln|y| = −e−x+C, so y = ±exp(C− e−x). The initial datay(0) = e imply that C = 2, and we take thepositive solution. So,y= exp(2− e−x) for all x.

(e). The ODEy′ = −x/y separates toy dy+ x dx= 0, which integrates toy2+ x2 = C.Sincey(1) = 2, C = 5 and solving fory the solution isy= (5− x2)1/2, |x| ≤ 51/2. SeeFig. 3(e) for the solution curve.

x

y

Problem3(e).

5. (a). By formula (15) for the solution ofy′ = r(1− y/K)y, y(0) = y0, we obtainy =y0K/(y0+ (K − y0)e−rt ). For the ODEy′ = (1− y/20)y, r = 1 andK = 20. We arealso given initial conditionsy0 = 5, 10, 20, or 30, so the respective solutions are given byy= 20y0/(y0+ (20− y0)e−t) wherey0 = 5, 10, 20, 30, respectively.

(c). The equilibrium (i.e., constant) solutions ofy′ = 3(1− y/12)y− 8 are found bysettingy′ equal to zero and using the quadratic formula (or factoring) to find the roots. Wehave 3(1− y/12)y−8=−1

4(y2−12y+32)=−1

4(y−4)(y−8), and so the equilibriumlevels arey= 4, 8. This means that ify0 lies between 0 and 4, the species falls away fromthe equilibriumy = 4 and dies out sincey′ < 0 in this region (e.g.,y0 = 2), while if y0

is between 4 and 8 (e.g.,y0 = 6) the population follows a logistic path and is asymptoticupward to the equilibrium levely = 8 sincey′ > 0 in this region. Ify0 exceeds 8 (e.g.,y0 = 10), the population falls asymptotically toward the equilibrium levely = 8 sincey′ < 0 in this region.

(e). The logistic model isy′ = r(1− y/K)y, whereK = 5× 108 andr = 0.01/day. Thesolution is given by formula (15) in the text:y(t) = y0K/(y0+ (K − y0)e−0.01t). Sett = 2, y0 = 108 and obtainy(2) ≈ 1.016× 108 individuals.

Page 23: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.6/ Separable Differential Equations 23

7. Observe that the ODEv′ = −g+ (k/m)v2 is separable. Separating the variables, we obtain∫1

−g+ (k/m)v2 dv =∫

dt

Using partial fractions to carry out the left-hand integration, we have

12

(mgk

)1/2

ln

∣∣∣∣v− (mg/k)1/2

v+ (mg/k)1/2

∣∣∣∣ = t+C

Plugging in the initial conditionv(0)= 0 givesC= 0. SettingA= 2(gk/m)1/2 and takingexponentials of both sides we obtain∣∣∣∣v− (mg/k)1/2

v+ (mg/k)1/2

∣∣∣∣ = eAt

Note that the quantity between the absolute value bars is negative for allt ≥ 0, and sochanging signs and dropping the absolute value, we solve forv to obtain

v(t) =(mg

k

)1/2 e−At− 1e−At+ 1

9. (a). The rate function for the ODEy′ = y(1− y/10)− 9/10 is the quadratic,−y2/10+y− 9/10, which factors to yieldy′ = −(y− 1)(y− 9)/10, y(0) = y0. The equilibriumpopulations arey= 1 andy= 9 becausey′ is zero if y= 1, 9. From the factorization ofthe rate function in the IVP we see that the population declines ify > 9 or if 0 < y < 1becausey′ is negative in those regions;y(t) increases if 1< y< 9. Separating variables inthe ODE and using partial fractions,

1y− 1

· 1y− 9

dy= − 110

dt, y 6= 1, 9

18

(1

y− 9− 1

y− 1

)dy= − 1

10dt

ln

∣∣∣∣ y− 9y− 1

∣∣∣∣1/8 = − 110

t+ b, b a constant∣∣∣∣ y− 9y− 1

∣∣∣∣1/8 = ebe−t/10

y− 9y− 1

= Be−4t/5, B= ±e8b

Solving for y and substituting initial conditionsy(0) = y0, we obtain

y= 9− Be−4t/5

1− Be−4t/5, B= y0− 9

y0− 1, y0 6= 1

11. Group project.

Page 24: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

24 Chapter 1/ First-Order Differential Equations and Models

1.7 Planar Systems and First-Order ODEs

CommentsPlanar systems come up in this section in a completely natural way—as a reformulation of second-order ODEs that were treated in Section 1.5. Later we show how to use planar systems to visualizesolution curves of first-order ODEs; a big advantage of this approach is that one can immediately“see” the maximally-extended solution curves of the first-order ODE. Another advantage of thisapproach is that a contour plotter need not be used even when an integral of the first-order ODE isknown. This neat trick is very useful in many applications, but the concept may seem rather trickyat first.

Another connection between second-order ODEs and first-order ODEs is made when we showhow to reduce the second-order ODEsy′′ = F(t, y′) and y′′ = F(y, y′) to systems of first-orderODEs that can be solved one at a time. The algebraic complications in actually constructing thesolutions can be difficult. If you use a computer solver to plot solution curves of a second-orderODE, you may also want to use the solver for the corresponding system and then plotty-componentgraphs.

For the second-order ODEs iny solved here, solution curves in thety-plane can cross eachother. This is because initial positionand initial velocity are needed to specify a unique solution ofa second-order ODE. If distinct solution curves cross, they do so with different slopes.

The section has a proof of the existence of the escape velocity from a massive body. Besidesbeing a nice example of the use of the reduction of order technique, it also provides a strikingexample of what the computer cannot do i.e., prove the existence of an escape velocity. The sectionends with a run-through of a Lanchester combat model, which starts with a system and ends with aseparable ODE. Some people are put off by the use of mathematics in this setting. Finally, take alook at the background material on Einstein, general relativity, and the big bang.

1. Our basic strategy is to find integral curves ofN(x, y)y′ +M(x, y)= 0 by finding solutionsof the systemdx/dt = N(x, y), dy/dt = −M(x, y). The system can be used to gener-ate plots on a computer solver.

∫N(y)dy+ ∫ M(x)dx is an integral of the ODE when

N(x, y) = N(y) andM(x, y) = M(x).

(a). y− 1/3y3+ 1/3x3− x is an integral of the separable ODE(1− y2)y′ + x2− 1= 0.Plots of some integral curves are shown in Fig. 1(a).

x

y

Problem1(a).

Page 25: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.7/ Planar Systems and First-Order ODEs 25

3. (a). From Fig. 3(a), we see thaty loses if x(0) = 10 andy(0) = 7 sincey(t)→ 0 astincreases, whilex(t)→ 4.4.

x (units of strength)

y(u

nits

ofst

reng

th)

Problem3(a).

5. (a). Let y′ = v, y′′ = vdv/dy. The ODE 2yy′′ + (y′)2 = 0 becomes 2yvdv/dy+ v2 = 0.Sov = 0 for all t, or 2y dv/dy+ v = 0. If v = 0 for all t, theny is a constant, but the initialcondition y′(0) = −1 implies thaty is nonconstant. So,v is not always 0. Separatingvariables, we have 2v−1dv + y−1dy= 0. Integrating, ln|v2y| = K, so v2y = ±eK. So,v = y′ = K1y−1/2. Separating variables,y1/2dy= K1 dt. Integrating, 2y3/2/3= K1t+ K2

or y= (C1t + C2)2/3, whereC1 andC2 are constants to be determined by the initial data

y(0) = 1, y′(0) = −1. So,C2 = 1, C1 = −3/2. The solution isy= (−3t/2+ 1)2/3.

(c). Let y′ = v, y′′ = v′. The ODEy′′ = −g− y′ becomesv′ = −g− v or (g+ v)−1dv =−dt. Integrating, ln|g+ v| = −t + K, so g+ v = C1e−t. Sincev = y′, we havey′ =C1e−t − g. Integrating,y= −C1e−t − gt+C2. Sincey= h andy′ = 0, at t = 0, we havey= −ge−t − gt+ h+ g.

7. The normalized ODE isy′′ +4t−1y′ +2t−2y= t−2 sint, t > 0. Following the technique de-scribed in Problem 6 and using the fact thatz= t−2 is a solution ofz′′ +4t−1z′ +2t−2z= 0(check by direct substitution), we see thaty= t−2u(t), whereu(t) solvest−2u′′ + (−4t−3+4t−3)u′ = t−2 sint, solves the normalized ODE. This last equation simplifies tou′′ = sint.After two integrations, we haveu=−sint+C1t+C2, whereC1 andC2 are any constants.So y= −t−2 sint+C1t−1+C2t−2, t > 0, gives a family of solutions of the ODE.

9. (a). The mass of the object times its acceleration equals the net force acting on the object.The equation of motion ismz′′ = −mMG̃/(z+ R)3. Letv= z′, vdv/dz= z′′ and separatethezandv variables to obtainvdv=−MG̃(z+ R)−3dz, which integrates tov2= MG̃(z+R)−2+ v2

0− MG̃R−2 where it is assumed that att = 0, v = v0 andz= 0. So,v remainspositive for allz if v0 > (MG̃)1/2/R, which is the escape velocity.

11. Group project.

Background Material: Einstein’s Field Equations of General Relativity

These equations are a complicated system of nonlinear partial differential equations. In1922, the Soviet mathematician Alexander Alexandrovich Friedmann succeeded in obtain-

Page 26: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

26 Chapter 1/ First-Order Differential Equations and Models

ing cosmological solutions governing the behavior of the universe as a whole. He assumedthat on a broad scale the universe is homogeneous and isotropic and that pressure can beignored (a dubious hypothesis if the universe is “small”). The PDEs reduce to a singlenonlinear IVP

2RR′′ + R′2+ kc2 = 0, R(t0) = R0 > 0, R′(t0) = v0 > 0 (i)

whereR is the “radius of the universe,”k=+1 (spherical geometry), 0 (Euclidean geome-try), or−1 (pseudospherical geometry),c is the speed of light, and the derivatives are withrespect to time.

For each of the three cases,k= 0,+1,−1, decide whether the universe is born with a“big bang” [i.e., at some timet1, ast→ t+1 , R(t)→ 0+, andR′(t)→+∞]. In each case,what happens to the universe ast increases? Does the universe die in a “big crunch” [i.e.,for somet2, ast→ t−2 , R(t)→ 0+, andR′(t)→−∞]. In carrying out this project, addressthe following points.

• Multiply the ODE in (i) by R′ and rewrite as [R(R′)2 + kc2R] ′ = 0. Show thatR(R′)2+ kc2R= R0v

20+ kc2R0 = C0.

• Setk= 0 (a Euclidean universe) and show thatR3/2= R3/20 ± 1.5C1/2

0 (t− t0). Showthat the minus sign leads to the eventual collapse of the universe (the “big crunch”) atsome timeT > t0, while the plus sign leads to perpetual expansion. What happens inboth cases asR0→ 0+?

• Setk = 1 (a spherical universe). Solve the ODE,R(R′)2+ c2R= C0, in terms of aparameteru, by settingR= C0c−2 sin2 u, rewriting the ODE withu as the dependentvariable, and solving to findt in terms ofu. Explain whyt = t(u), R= R(u) are theparametric equations of a cycloid in thetR-plane. Interpret each arch of the cycloidin terms of a big bang and big crunch cosmology.

• Setk = −1 (a pseudospherical universe). Follow the steps of the spherical case, butsetR= C0c−2 sinh2 u. Interpret the solution in cosmological terms.

• Rewrite the original ODE as a system of ODEs in dimensionless variables:dx/ds=2y, dy/ds= −x−1(k+ y2), wherex(s0) = 1, y(s0) = v0/c, x= R/R0, y= R′/c,s= ct/2R0. Now use an ODE solver/graphics package to plot solutionsx= x(s) andy = y(s) as functions ofs for k = 0, +1, −1. Interpret the graphs in cosmologicalterms. Discuss the advantage of scaling the original variables as indicated beforecomputing.

1.8 Cold Pills

CommentsMathematically speaking, the solution techniques of this section are all based on the integratingfactor method for a first-order linear ODE (see Section 1.4). These are now applied to a cascade of

Page 27: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.8/ Cold Pills 27

two or more first-order linear ODEs, where the ODEs can be solved from the top down, one ODE ata time. Subsequent ODEs in the cascade make use of the solutions of some of the preceding ODEs.This process shows that these systems of ODEs are not at all fearsome, even though the algebra canbe a little bit complicated.

On a modeling level, the first-order systems of ODEs that represent the flow of medicationsthrough the compartments of the body seem quite natural to many people, who find these systemseasier to understand than the mechanical, gravitational, or electrical systems traditionally used inODE courses. We like to introduce systems of ODEs naturally and early in the course, but infor-mally. This approach accustoms everyone to seeing, using, and solving systems, but without all thevocabulary and theory of the full treatment of a system ofn ODEs (which we do in Chapter 5). Wetalk about systems in other sections of Chapter 1, but this is the only section of the chapter devotedentirely to phenomena that can only be modeled using systems.

We give informal definitions of a general compartment system and a linear cascade compart-ment system, and note how they can be represented by labeled boxes and arrows. By careful exam-ination of the assemblage, a system of rate equations can be written for the flow of the substancebeing tracked through the compartments. There is a different interpretation of a compartmental sys-tem where there is just one physical compartment containing a substance which decays over timeinto other substances [e.g., radioactive decay (see Problem 14 in Section 1.5 or chemical reactions(see Chapter 5)].

The sensitivity of a system to changes in a rate coefficient is shown in the cold pill models.The clearance coefficient for removing medication from the blood may be much lower for olderpeople than for the young, and we discuss the consequences (see also Problems 5–7). The modelthat represents taking a fast-dissolving cold pill every four or six hours leads naturally to a systemof linear ODEs with a periodic pulse input function of the form A sqw(t,d,T). Functions like thisappear throughout the applications and we introduce them here in a natural setting. The system ismost easily solved by using a numerical solver with piecewise continuous functions in its predefinedlist.

1. All the algebraic steps are given for part(a).

(a). Analysis of the cascade model as in Example 1.8.8 produces the linear systemx′ =−3x, y′ = x, z′ = 2x. The system is solved from the top down. Using the techniques ofSection 1.4, we see that the general solution to the first ODE isx= Ce−3t. Sincex(0) = 1,C = 1 and the solution to the IVP isx = e−3t. Substituting this into the other equationsof the system, we havey′ = e−3t and z′ = 2e−3t. Integrating each of these givesy =−e−3t/3+C1 andz= −2e−3t/3+C2. Using the initial data,y(0) = 0= −1/3+C1, soC1 = 1/3; andz(0) = 0 = −2/3+ C2, so C2 = 2/3. The solutions arex = e−3t, y =(1− e−3t)/3, andz= 2(1− e−3t )/3. As t→+∞, x→ 0, y→ 1/3, andz→ 2/3.

(c). The system, now with a sinusoidal input, isx′ = 1+ sint− 3x, y′ = 3x− y. We willsolve from the top down. Using the integrating factore3t, (xe3t )′ = (1+ sint)e3t. Inte-grating,x = 1/3+ (3sint − cost)/10+ Ce−3t. Using x(0) = 0, we getC = −7/30 andx= 1/3+ (3sint− cost)/10−7e−3t/30. Sincey′ = 3x− y, another use of the integratingfactor method (after replacingx by the expression int just derived) givesy= 1+ 3(sint−2cost)/10+7e−3t/20+Ce−t. So, sincey(0)= 0, y= 1+3(sint−2cost)/10+7e−3t/20−3e−t/4. As t→+∞, x oscillates about 1/3 andy oscillates about 1.

3. (a). Using integrating factors, solve the first ODE of system (3), and then the other.

Page 28: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

28 Chapter 1/ First-Order Differential Equations and Models

The IVP, dx/dt = −k1x, x(0) = A, gives x = Ae−k1t. Substituting this into the ODE,dy/dt= k1x− k2y, and rearranging,y′ + k2y= Ak1e−k1t. Using the integrating factorek2t,(yek2t)′ = Ak1e(k2−k1)t, giving y= Ak1e−k1t/(k2− k1)+Ce−k2t, whereC is constant. Us-ing y(0) = B, we getB= Ak1/(k2− k1)+C, soC= B− Ak1/(k2− k1). So,x= Ae−k1t

andy= Ak1(e−k1t − e−k2t)/(k2− k1)+ Be−k2t.

5. (a). See Fig. 5(a) for antihistamine levels (the bottom curve corresponds to the smallestvalue ofk1, 0.0691, and the top curve to the largest, 1.5). The curves for the larger valuesof k1 eventually cross the curves for the smaller values. This models the fact that effectiveclearance of the antihistamine from the blood occurs only after the medication level in theblood has peaked; ifk1 is small, it takes longer to peak.

Time in hours

Ant

ihis

tam

ine

inbl

ood

Problem5(a).

7. (a). The model IVP for the amountsx(t) and y(t) of continuous-acting medication in theGI tract and bloodstream, respectively, isx′(t)= I − k1x, x(0)= 0, andy′(t)= k1x− k2y,y(0) = 0.

(c). As t→∞, x(t)→ I/k1 andy(t)→ I/k2.

(e). See Fig. 7(e), Graph 1 for decongestant levels and Fig. 7(e), Graph 2 for antihistaminelevels. As expected, the levels of both medications in the blood continue to rise, particularlythe antihistamine.

Time in hours

Dec

onge

stan

t

GI tract

Bloodstream

Problem7(e), Graph 1.

Time in hours

Ant

ihis

tam

ine

GI tract

Bloodstream

Problem7(e), Graph 2.

Page 29: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.9/ Change of Variables and Pursuit Models 29

1.9 Change of Variables and Pursuit Models

CommentsA widely used method to deal with a difficult equation is to change the variables, hoping that thetransformed equation will be simpler (and more easily solvable) in the new variables. There arehundreds of changes of variables for dealing with complicated (often nonlinear) ODEs; see, forexample,Handbook of Exact Solutions for Ordinary Differential Equations, A.D. Polyanin, V.F.Zaitsev; CRC Press Inc., 1995, Boca Raton. See also D. Zwillinger’sHandbook of DifferentialEquations, 2nd ed., 1992; Academic Press, San Diego. In this section, we consider a few variablechanges that reduce some simple (but nonlinear) first-order ODEs to forms that can be solved bymethods of this chapter. Bernoulli ODEs (Problem 9), Riccati ODEs (Problem 10), ODEs involvinga function that is homogeneous of order 0 (Example 1.9.2)—these are all transformed to simplerODEs by a variable change. Applications of variable changes are made to rescaling a model ofvertical motion (Example 1.9.5, and Problem 8).

An interesting sidelight to the pursuit problem: from Example 1.9.4 and Problem 11 we seethat when the goose reaches the nest it is flying directly into the wind. Is this always true?

As in Section 1.6, it often happens that solutions can only be defined by implicit formulas. Sowe get integral curves as graphs, rather than solution curves. A solution curve is an arc of an integralcurve with no vertical tangents.

1. In the solutions below, each ODE is written in the formy′ = f (x, y), and it is shown thatfis homogeneous of order 0 by verifying thatf (kx, ky) = f (x, y). The change of variabley = xz converts the ODE into a separable ODE inx and z, and this new ODE is given,along with its solutions. Finally, the solutions of the original ODE are given, sometimesimplicitly, by replacingz by y/x. Caution: There is a lot of algebraic manipulation here,so watch your steps!

(a). The ODE isy′ = (y+ x)/x. The rate function is homogeneous of order 0, because

f (kx, ky) = kx+ kykx

= x+ yx= f (x, y)

If y = xz, then y′ = xz′ + z= (xz+ x)/x = z+ 1, andxz′ = 1. The solutions arez=ln |x| + C. Using y = xz, y = x ln |x| + Cx, where the domain is restricted tox > 0 orx< 0.

(c). The ODE may be written asy′ = (x2− xy− y2)/(xy), and we have that

f (kx, ky) = k2x2− k2xy− k2y2

k2xy= f (x, y)

So the rate function is homogeneous of order 0. The variable changey= xz leads to theODE xz′ + z= (x2− x2z− x2z2)/x2z= (1− z− z2)/z, or z′z/(1− z− 2z2) = 1/x. ThisODE integrates (after using partial fractions or integral tables) to−1

6 ln |1− 2z| − 13 ln |1+

z| = ln |x| +C. Let z= y/x, rearrange, exponentiate, and obtainx3(x− 2y)(x+ y)2 = C,whereC is a constant.

(e). The ODE isy′ = 4+ 7y/x+ 2y2/x2, and we have thatf is homogeneous of order 0

Page 30: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

30 Chapter 1/ First-Order Differential Equations and Models

because

f (kx, ky) = 4+ 7kykx+ 2k2y2

k2x2 = f (x, y)

Let y = xz; xz′ + z= 4+ 7z+ 2z2 and dz/(4+ 6z+ 2z2) = dx/x, which integrates to[ln |(z+1)/(z+2)|]/2= ln |x|+ K, which in terms ofx andy reduces to ln|(x+ y)/(2x+y)|1/2 − ln |x| = K or ln |(x+ y)/(2x+ y) · (1/x2)|1/2 = K. Exponentiating,x+ y =Cx2(2x+ y), whereC is any constant, ory= (2Cx3− x)/(1−Cx2), wherex is such that1−Cx2 6= 0.

3. In each case we find a “general” implicit solution in the formH(x, y) = C. We don’talways attempt to solve fory in terms ofx andC.

(a). Let z= x+ y, in the ODE,dy/dx= cos(x+ y). Thendz/dx= 1+dy/dx= 1+ cosz,so(1+ cosz)−1 dz= dx. Using a table of integrals, we have tan(z/2)= x+C, so tan[(x+y)/2] = x+ C. Thenx+ y= 2arctan(x+ C)+ nπ, so y= −x+ 2arctan(x+ C)+ nπ,whereC is any constant andn is any integer.

(c). Let z= x+ 2y, sodz/dx= 1+ 2dy/dx. Then the ODE,(x+ 2y− 1)dx+ 3(x+2y)dy= 0, becomes(z− 1)+ 3z(dz/dx− 1)/2= 0 or 3z dz/(z+ 2) = dx, which inte-grates to 3(z− 2 ln|z+ 2|) = x+C. In terms ofx andy, 3(x+ 2y− 2 ln|x+ 2y+ 2|) =x+C, whereC is any constant and|x+ 2y+ 2| 6= 0.

5. (a). Make the change of variablez= 1/y in the logistic equationy′ = r(1− y/K)y. Sincey= 1/z, we see thaty′ = −z−2z′, so

−z−2z′ = r

(1− 1

Kz

)(1z

)−z′ = r

(z− 1

K

)z′ = −rz+ r

K

which is a linear ODE.

7. Setx(t) = P(t)/K and t = s/r in the logistic ODEP′(t) = r(1− P(t)/k)P(t). By thechain rule,

dxds= 1

KdPdt

dtds= 1

Kr(1− p/K)p/r

= 1K(1− x)Kx= (1− x)x

The advantage of using the scaled ODE is that there are no parameters in the rate function.This means that a solution of the scaled equation can be used to describe the behavior ofsolutions of the unscaled ODE regardless of the values of the positive constants r and K.

9. The Bernoulli ODE isdy/dt+ p(t)y= q(t)yb.

(a). Let b 6= 0, 1 and divide the ODEdz/dt+ (1− b)p(t)z= (1− b)q(t) through byyb.

Page 31: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.9/ Change of Variables and Pursuit Models 31

Then multiply by 1− b and the ODE can be written as

ddt(y1−b)+ (1− b)p(t)y1−b = (1− b)q(t)

Now make the change of variablesz= y1−b and the ODE takes the form

dzdt+ (1− b)p(t)z= (1− b)q(t) (i)

which is a linear ODE. Ify(t) solves the original ODE, thenz(t) = (y(t))1−b solves thelinear ODE (i). Conversely, ifz is any solution to the last ODE, theny = z1/(1−b) is asolution of the original ODE, or perhaps several solutions after taking the root 1/(1− b).

(c). We may transform the Bernoulli ODE,y′ + t−1y = y−4, to a linear ODE using thevariable changez= y5. We obtainz′ + 5t−1z= 5, where an integrating factor ise5 ln t = t5,and the solutions are given byz= 5t/6+C/t5. Theny= z1/5 = (5t/6+C/t5)1/5, wheret > 0 andC is an arbitrary constant. See Fig. 9(c) for solution curves.

t

y

Problem9(c).

11. (a). The problem may be set up exactly as the pursuit problem in the text, except thatthe wind’s velocity has component−b/2 along thex-axis andb/2 along they-axis. So,x′ = −bcosθ− b/2 andy′ = −bsinθ+ b/2. Dividing, we have

y′

x′= dy

dx= 2sinθ− 1

2cosθ+ 1= 2y− (x2+ y2)1/2

2x+ (x2+ y2)1/2

Since this quotient is a homogeneous function of order 0 inx and y, we may introducey= xz to obtain the separable ODExdz/dx+ z= [2z− (1+ z2)1/2]/[2+ (1+ z2)1/2], or

2− (1+ z2)1/2

(z+ 1)(1+ z2)1/2dz= 1

xdx

Let z= u− 1 to reduce the left side to a form found in integral tables. After solvingand returning tox, y variables and simplifying, we obtain [

√2(x2 + y2)1/2+ x− y]2 =

a√

2(3+ 2√

2)|x+ y|2−√

2, where the initial data are used. The goose follows the path de-fined by this expression if it heads towards its nest while the wind blows from the southeast.

Page 32: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

32 Chapter 1/ First-Order Differential Equations and Models

Background Material: ODEs in Polar Coordinates

The ODE in rectangular coordinatesx andy

dy/dx= f (x, y) (i)

can be transformed into an equivalent ODE in polar coordinatesr andθ. First recall therelations between polar and rectangular coordinates:

x= r cosθ, y= r sinθ, r = (x2+ y2)1/2, tanθ = y/x

Now suppose thaty = g(x) defines a solution curve of the ODE (i). This solution curvecan also be defined (perhaps only in part) by specifyingr as a function of the polar angleθ,that is,r = r(θ). In polar coordinates the relationy= g(x) becomes

r sinθ = g(r cosθ) (ii)

Differentiating each side with respect toθ and using the Chain Rule, we have

drdθ

sinθ+ r cosθ = g′(r cosθ)

(drdθ

cosθ− r sinθ

)Sincey= g(x) solvesy′ = f (x, y), theng′(r cosθ)= f (r cosθ, r sinθ). So

drdθ

sinθ+ r cosθ = f (r cosθ, r sinθ)(

drdθ

cosθ− r sinθ)

(iii)

The ODE in (iii) is equivalent toy′ = f (x, y). Although ODE (iii) looks complicated, it isactually simpler than (i) for some functionsf (x, y). Let’s look at an example.

-

6

3

]

(x, y)r

θ

x

y

Applying formula (iii) to the ODE

dydx= y− 2x

2y+ x(iv)

we have the equivalent ODE in polar coordinates:

drdθ

sinθ+ r cosθ = r sinθ− 2r cosθ2r sinθ+ r cosθ

(drdθ

cosθ− r sinθ)

(v)

After canceling the common factorr in the quotient, multiplying each side by 2sinθ +cosθ, simplifying, and again canceling a common factor, ODE (v) reduces, after somealgebra, to the linear ODE inr :

drdθ= − r

2(vi)

The solutions of ODE (vi) are given by

r = Ce−θ/2

whereC is any nonnegative constant.

Page 33: Time (sec) First-Order Differential Equations and Models2 Chapter 1/ First-Order Differential Equations and Models 1.1 A Modeling Adventure Comments In this introductorysection we

1.9/ Change of Variables and Pursuit Models 33

x

y

The corresponding curves in thexy-plane are spirals around the origin. The five solu-tion curves shown are arcs of one of these spirals, arcs that have no vertical tangent linebecause only such arcs can be graphs of functions ofx. The “top” arcs of the spiral are alsosolution curves, but they are not shown. Finally, note that taking logarithms of each side ofthe equationr = Ce−θ/2 and returning to thexy-variables, the solutionsy(x) of ODE (iv)satisfy the equation

12

ln(x2+ y2) = ln C− 12

arctan(y/x) (vii)