# 7. Separable differential equations

### Motivating Questions

In this section, we strive to understand the ideas generated by the following important questions:

• What is a separable differential equation?

• How can we find solutions to a separable differential equation?

• Are some of the differential equations that arise in applications separable?

• How can we use differential equations to describe and understand phenomena in the world around us?

### Introduction

Given the frequency with which differential equations arise in the world around us, we would like to have some techniques for finding explicit algebraic solutions of certain initial value problems. In this section, we focus on a particular class of differential equations (called separable) and develop a method for finding algebraic formulas for solutions to these equations.

A separable differential equation is a differential equation whose algebraic structure permits the variables present to be separated in a particular way. For instance, consider the equation

We would like to separate the variables t and y so that all occurrences of t appear on the right-hand side, and all occurrences of y appears on the left and multiply dy/dt. We may do this in the preceding differential equation by dividing both sides by y:

Note particularly that when we attempt to separate the variables in a differential equation, we require that the left-hand side be a product in which the derivative dy/ dt is one term.

Not every differential equation is separable. For example, if we consider the equation

it may seem natural to separate it by writing

As we will see, this will not be helpful since the left-hand side

is not a product of a function of y with

### Preview Activity 7

In this preview activity, we explore whether certain differential equations are separable or not, and then revisit some key ideas from earlier work in integral calculus.

(a) Which of the following differential equations are separable? If the

equation is separable, write the equation in the revised form *g(y]*

=

*h(t).*

(a)

*= -*^{3y.}

(b)

= ^{ty} ^{—} ^{y.}

(c)

= t + 1.

(d)

= t^{2} — y^{2}.

(b) Explain why any autonomous differential equation is guaranteed to be separable.

(c) Why do we include the term "+C" in the expression

(d) Suppose we know that a certain function f satisfies the equation

What can you conclude about f ?

Solving separable differential equations

Before we discuss a general approach to solving a separable differential equation, it is instructive to consider an example.

Example 1

Find all functions y that are solutions to the differential equation

Solution. We begin by separating the variables and writing

Integrating both sides of the equation with respect to the independent variable t shows that

Next, we notice that the left-hand side allows us to change the variable

of antidifferentiation from *t* to *y.* In particular, *dy =*

*dt,* so we now have

This is why we required that the left-hand side be written as a product in which dy/ dt is one of the terms. This most recent equation says that two families of antiderivatives are equal to one another. Therefore, when we find representative antiderivatives of both sides, we know they must differ by arbitrary constant C. Antidifferentiating and including the integration constant C on the right, we find that

Again, note that it is not necessary to include an arbitrary constant on both sides of the equation; we know that y^{3}/3 and t^{2}/2 are in the same family of antiderivatives and must therefore differ by a single constant.

Finally, we may now solve the last equation above for y as a function of t, which gives

y(t) =

Of course, the term 3C on the right-hand side represents 3 times an unknown constant. It is, therefore, still an unknown constant, which we will rewrite as C. We thus conclude that the function

y(t) =

is a solution to the original differential equation for any value of C.

Notice that because this solution depends on the arbitrary constant C, we have found an infinite family of solutions. This makes sense because we expect to find a unique solution that corresponds to any given initial value.

For example, if we want to solve the initial value problem

y(0) = 2,

we know that the solution has the form y( t) =

for some con-

stant C. We therefore must find the appropriate value for C that gives the initial value y(0) = 2. Hence,

which shows that C = 2^{3} = 8. The solution to the initial value problem is then

The strategy of Example 1 may be applied to any differential equation of the form

and any differential

equation of this form is said to be separable. We work to solve a separable differential equation by writing

and then integrating both sides with respect to *t.* After integrating, we strive to solve algebraically for *y* in order to write *y* as a function of *t.*

We consider one more example before doing further exploration in some activities.

Example 2

Solve the differential equation

= 3*y.*

Solution. Following the same strategy as in Example 1, we have

Integrating both sides with respect to *t,*

and thus

Antidifferentiating and including the integration constant, we find that

*= 3t + C.*

Finally, we need to solve for *y.* Here, one point deserves careful attention. By the definition of the natural logarithm function, it follows that

*= e ^{3t+C} = e^{3t}e^{C}.*

Since *C* is an unknown constant, *e ^{C}* is as well, though we do know that it is positive (because

*e*is positive for any

^{x}*x).*When we remove the absolute value in order to solve for

*y,*however, this constant may be either positive or negative. We will denote this updated constant (that accounts for a possible + or —) by

*C*to obtain

*y(t) =* Ce^{3t}.

There is one more slightly technical point to make. Notice that *y =* 0 is an equilibrium solution to this differential equation. In solving the equation above, we begin by dividing both sides by *y,* which is not allowed if *y =* 0. To be perfectly careful, therefore, we will typically consider the equilibrium solutions separably. In this case, notice that the final form of our solution captures the equilibrium solution by allowing *C =* 0.

### Activity 7-1

Suppose that the population of a town is increases by 3% every year.

(a) Let *P(t)* be the population of the town in year t. Write a differential equation that describes the annual growth rate.

(b) Find the solutions of this differential equation.

(c) If you know that the town's population in year 0 is 10,000, find the population *P( t).*

(d) How long does it take for the population to double? This time is called the *doubling time.*

(e) Working more generally, find the doubling time if the annual growth rate is *k* times the population.

### Activity 7-2

Suppose that a cup of coffee is initially at a temperature of 105° F and is placed in a 75° F room. Newton's law of cooling says that

*= —k(T —* 75),

where *k* is a constant of proportionality.

(a) Suppose you measure that the coffee is cooling at one degree per minute at the time the coffee is brought into the room. Use the differential equation to determine the value of the constant *k.*

(b) Find all the solutions of this differential equation.

(c) What happens to all the solutions as

Explain how this

agrees with your intuition.

(d) What is the temperature of the cup of coffee after 20 minutes?

(e) How long does it take for the coffee to cool to 80^{°}?

### Activity 7-3

Solve each of the following differential equations or initial value problems.

(a)

— (2 — *t)y =* 2 — t

(b)

= e^{t2—2y}

(c)

= 2y + 2, y(0)= 2

(d)

= 2y^{2}, *y(—*1)= 2

(e)

y(0) = 4

### Developing a differential equation

In our work to date, we have seen several ways that differential equations arise in the natural world, from the growth of a population to the temperature of a cup of coffee. Now, we will look more closely at how differential equations give us a natural way to describe various phenoma. As we'll see, the key is to focus on understanding the different factors that cause a quantity to change.

### Activity 7-4

Any time that the rate of change of a quantity is related to the amount of a quantity, a differential equation naturally arises. In the following two problems, we see two such scenarios; for each, we want to develop a differential equation whose solution is the quantity of interest.

(a) Suppose you have a bank account in which money grows at an annual rate of 3%.

(i) If you have $10,000 in the account, at what rate is your money growing?

(ii) Suppose that you are also withdrawing money from the account at $1,000 per year. What is the rate of change in the amount of money in the account? What are the units on this rate of change?

(b) Suppose that a water tank holds 100 gallons and that a salty solution, which contains 20 grams of salt in every gallon, enters the tank at 2 gallons per minute.

(i) How much salt enters the tank each minute?

(ii) Suppose that initially there are 300 grams of salt in the tank. How much salt is in each gallon at this point in time?

(iii) Finally, suppose that evenly mixed solution is pumped out of the tank at the rate of 2 gallons per minute. How much salt leaves the tank each minute?

(iv) What is the total rate of change in the amount of salt in the tank?

Activity7-4 demonstrates the kind of thinking we will be doing. In each of the two examples we considered, there is a quantity, such as the amount of money in the bank account or the amount of salt in the tank, that is changing due to several factors. The governing differential equation results from the total rate of change being the difference between the rate of increase and the rate of decrease.

Figure 6.49: Plot of

vs. P.

Example 3

In the Great Lakes region, rivers flowing into the lakes carry a great deal of pollution in the form of small pieces of plastic averaging 1 millimeter in diameter. In order to understand how the amount of plastic in Lake Michigan is changing, construct a model for how this type pollution has built up in the lake.

Solution. First, some basic facts about Lake Michigan.

• The volume of the lake is 5 • 10^{12} cubic meters.

• Water flows into the lake at a rate of 5 • 10^{10} cubic meters per year. It flows out of the lake at the same rate.

• Each cubic meter flowing into the lake contains roughly 3 • 10^{—} ^{8} cubic meters of plastic pollution.

Let's denote the amount of pollution in the lake by P(t), where *P* is measured in cubic meters of plastic and *t* in years. Our goal is to describe the rate of change of this function; in other words, we want to develop a differential equation describing *P( t)* .

First, we will measure how *P(t)* increases due to pollution flowing into the lake. We know that 5 • 10^{10} cubic meters of water enters the lake every year and each cubic meter of water contains 3 • 10^{—8} cubic meters of pollution. Therefore, pollution enters the lake at the rate of

cubic meters of plastic per year.

Second, we will measure how *P(t)* decreases due to pollution flowing out of the lake. If the total amount of pollution is *P* cubic meters and the volume of Lake Michigan is 5 • 10^{12} cubic meters, then the concentration of plastic pollution in Lake Michigan is

cubic meters of plastic per cubic meter of water.

Since 5 • 10^{10} cubic meters of water flow out each year,and we assume that each cubic meter of water that flows out carries with it the plastic pollution it contains, then the plastic pollution leaves the lake at the rate

of

cubic meters of plastic per year.

The total rate of change of *P* is thus the difference between the rate at which pollution enters the lake minus the rate at which pollution leaves the lake; that is,

We have now found a differential equation that describes the rate at which the amount of pollution is changing. To better understand the behavior of *P( t)* , we now apply some of the techniques we have recently developed.

Since this is an autonomous differential equation, we can sketch *dP/ dt* as a function of *P* and then construct a slope field, as shown in Figure 6.49 and Figure 6.50.

These plots both show that *P =* 1.5 • 10^{5} is a stable equilibrium. Therefore, we should expect that the amount of pollution in Lake Michigan will stabilize near 1.5 • 10^{5} cubic meters of pollution.

Next, assuming that there is initially no pollution in the lake, we will solve the initial value problem

(1.5 • 10^{5} — P), P(0) = 0.

Separating variables, we find that

Figure 6.50: The slope field for the differential

equation

(1.5 • 10^{5} — P).

Figure 6.51: The solution P(t) and the slope field

for the differential equation

(1.5 • 10^{5} — P).

Integrating with respect to t, we have

and thus changing variables on the left and antidifferentiating on both sides, we find that

Finally, multiplying both sides by —1 and using the definition of the logarithm, we find that

1.5 • 10^{5} — P = *Ce ^{—}*

^{1/100}. (6.2)

This is a good time to determine the constant C. Since P = 0 when t = 0, we have

1.5 • 10^{5} — 0 = Ce^{0} = C.

In other words, C = 1.5 • 10^{5}.

Using this value of C in Equation (6.2) and solving for P, we arrive at the solution

P(t) = 1.5 • 10^{5}(1 — *e ^{—}*

^{1/100}).

Superimposing the graph of P on the slope field we saw in Figure 6.49 and Figure 6.50, we see, as shown in Figure 6.51.

We see that, as expected, the amount of plastic pollution stabilizes around 1.5 • 10^{5} cubic meters.

There are many important lessons to learn from Example 3. Foremost is how we can develop a differential equation by thinking about the "total rate = rate in - rate out" model. In addition, we note how we can bring together all of our available under-

standing (plotting

vs. P, creating a slope field, solving the

differential equation) to see how the differential equation describes the behavior of a changing quantity.

Of course, we can also explore what happens when certain aspects of the problem change. For instance, let's suppose we are at a time when the plastic pollution entering Lake Michigan has stabilized at 1.5 • 10^{5} cubic meters, and that new legislation is passed to prevent this type of pollution entering the lake. So, there is no longer any inflow of plastic pollution to the lake. How does the amount of plastic pollution in Lake Michigan now change? For example, how long does it take for the amount of plastic pollution in the lake to halve?

Restarting the problem at time t = 0, we now have the modified initial value problem

P(0) = 1.5 • 10^{5}.

It is a straightforward and familiar exercise to find that the solution to this equation is P(t) = 1.5 • 10^{5}e^{—1/100}. The time that it takes for half of the pollution to flow out of the lake is given by T where P(T) = 0.75 • 10^{5}. Thus, we must solve the equation

0.75 • 10^{5} = 1.5 • 10^{5}e^{-T/100},

or

= e^{-T/100}

It follows that

T = -100 ln

69.3 years.

In the activities that follow, we explore some other natural settings in which differential equation model changing quantities.

### Activity 7-5

Suppose you have a bank account that grows by 5% every year.

(a) Let A(t) be the amount of money in the account in year t. What is the rate of change of A?

(b) Suppose that you are also withdrawing $10,000 per year. Write a differential equation that expresses the total rate of change of A.

(c) Sketch a slope field for this differential equation, find any equilibrium solutions, and identify them as either stable or unstable. Write a sentence or two that describes the significance of the stability of the equilibrium solution.

(d) Suppose that you initially deposit $100,000 into the account. How long does it take for you to deplete the account?

(e) What is the smallest amount of money you would need to have in the account to guarantee that you never deplete the money in the account?

(f) If your initial deposit is $300, 000, how much could you withdraw every year without depleting the account?

### Activity 7-6

A dose of morphine is absorbed from the bloodstream of a patient at a rate proportional to the amount in the bloodstream.

(a) Write a differential equation for *M(t),* the amount of morphine in the patient's bloodstream, using k as the constant proportionality.

(b) Assuming that the initial dose of morphine is M0, solve the initial value problem to find M(t). Use the fact that the half-life for the absorption of morphine is two hours to find the constant k.

(c) Suppose that a patient is given morphine intraveneously at the rate of 3 milligrams per hour. Write a differential equation that combines the intraveneous administration of morphine with the body's natural absorption.

(d) Find any equilibrium solutions and determine their stability.

(e) Assuming that there is initially no morphine in the patient's bloodstream, solve the initial value problem to determine M( t) .

(f) What happens to M(t) after a very long time?

(g) Suppose that a doctor asks you to reduce the intraveneous rate so that there is eventually 7 milligrams of morphine in the patient's bloodstream. To what rate would you reduce the intraveneous flow?

### Population Growth

We will now begin studying the earth's population. To get started, some data for the earth's population in recent years that we will use in our investigations is given in Table 6.3.

Table 6.3: The earth's recent population (in billions).

Year | Population |
---|---|

1998 | 5.932 |

1999 | 6.008 |

2000 | 6.084 |

2001 | 6.159 |

2002 | 6.234 |

2005 | 6.456 |

2006 | 6.531 |

2007 | 6.606 |

2008 | 6.681 |

2009 | 6.756 |

2010 | 6.831 |

### Activity 7-7

Our first model will be based on the following assumption:

The rate of change of the population is proportional to the population.

On the face of it, this seems pretty reasonable. When there is a relatively small number of people, there will be fewer births and deaths so the rate of change will be small. When there is a larger number of people, there will be more births and deaths so we expect a larger rate of change.

If P( t) is the population t years after the year 2000, we may express this assumption as

= kP

where k is a constant of proportionality. (a) Use the data in the table to estimate the derivative

using a

central difference. Assume that t = 0 corresponds to the year 2000.

(b) What is the population P(0)?

(c) Use these two facts to estimate the constant of proportionality k in the differential equation.

(d) Now that we know the value of k, we have the initial value problem

= kP, P(0) = 6.084.

Find the solution to this initial value problem.

(e) What does your solution predict for the population in the year 2010? Is this close to the actual population given in the table?

(f) When does your solution predict that the population will reach 12 billion?

(g) What does your solution predict for the population in the year 2500?

(h) Do you think this is a reasonable model for the earth's population? Why or why not? Explain your thinking using a couple of complete sentences.

Our work in Activity7-7 shows that that the exponential model is fairly accurate for years relatively close to 2000. However, if we go too far into the future, the model predicts increasingly large rates of change, which causes the population to grow arbitrarily large. This does not make much sense since it is unrealistic to expect that the earth would be able to support such a large population.

The constant k in the differential equation has an important interpretation. Let's rewrite the differential equation

= kP

by solving for k, so that we have

k=

Viewed in this light, k is the ratio of the rate of change to the population; in other words, it is the contribution to the rate of change from a single person. We call this the per capita growth rate.

In the exponential model we introduced in Activity7-7, the per capita growth rate is constant. In particular, we are assuming that when the population is large, the per capita growth rate is the same as when the population is small. It is natural to think that the per capita growth rate should decrease when the population becomes large, since there will not be enough resources to support so many people. In other words, we expect that a more realistic model would hold if we assume that the per capita growth rate depends on the population P.

In the previous activity, we computed the per capita growth rate in a single year by computing k, the quotient of ^ and P (which we did for t = 0). If we return data and compute the per capita growth rate over a range of years, we generate the data shown in Figure 6.52-(a), which shows how the per capita growth rate is a function of the population, P.

Figure 6.52: The data and approximations of the per capita growth as a function of population, P.

From the data, we see that the per capita growth rate appears to decrease as the population increases. In fact, the points seem to lie very close to a line, which is shown at two different scales in Figure 6.52-(b) and Figure 6.52-(c).

Looking at this line carefully, we can find its equation to be

= 0.025 — 0.002P.

If we multiply both sides by P, we arrive at the differential equation

= P(0.025 — 0.002P).

Graphing the dependence of dP/dt on the population P, we see that this differential equation demonstrates a quadratic relation-

ship between

and P, as shown in Figure 6.53.

The equation

*= P*(0.025 — 0.002P) is an example of the *logistic equation,* and is the second model for population growth that we will consider. We have reason to believe that it will be more realistic since the per capita growth rate is a decreasing function of the population.

Figure 6.53: A plot of

vs. *P* for the differential

equation

= P(0.025 — 0.002P).

Indeed, the graph in Figure 6.53 shows that there are two equilibrium solutions, *P =* 0, which is unstable, and *P =* 12.5, which is a stable equilibrium. The graph shows that any so-

lution with

will eventually stabilize around 12.5. In

other words, our model predicts the the world's population will eventually stabilize around 12.5 billion.

A prediction for the long-term behavior of the population is a valuable conclusion to draw from our differential equation. We would, however, like to answer some quantitative questions. For instance, how long will it take to reach a population of 10 billion? To determine this, we need to find an explicit solution of the equation.

Solving the logistic differential equation

Since we would like to apply the logistic model in more general situations, we state the logistic equation in its more general form,

*= kP( N — P).* (6.3)

The equilibrium solutions here are when *P =* 0 and 1 —

= 0,

which shows that *P = N.* The equilibrium at *P = N* is called the *carrying capacity* of the population for it represents the stable population that can be sustained by the environment.

We now solve the logistic equation (6.3). The equation is separable, so we separate the variables

and integrate to find that

To find the antiderivative on the left, we use the partial fraction decomposition

Now we are ready to integrate, with

On the left, observe that *N* is constant, so we can remove the

factor of

and antidifferentiate to find that

Multiplying both sides of this last equation by *N* and using an important rule of logarithms, we next find that

*= kNt + C.*

From the definition of the logarithm, replacing *e ^{C}* with C, and letting

*C*absorb the absolute value signs, we now know that

*= Ce ^{kNt}.*

At this point, all that remains is to determine *C* and solve algebraically for *P.*

If the initial population is P(0) = P_{0}, then it follows that *C =*

so

We will solve this most recent equation for *P* by multiplying both sides by *(N — P)(N — P _{0})* to obtain

*P( N — P _{0}) = P_{0} (N — P)e^{kNt}*

*= P _{0} Ne^{kNt} — P_{0} Pe^{kNt}*.

Swapping the left and right sides, expanding, and factoring, it follows that

P0 *Ne ^{kNt} = P( N — P0*)+ P0

*Pe*+ P0

^{kNt}= P( N — P0*e*).

^{kNt}Dividing to solve for *P,* we see that

Finally, we choose to multiply the numerator and denominator

by

to obtain

While that was a lot of algebra, notice the result: we have found an explicit solution to the initial value problem

= kP(N — P), P(0) = P0,

and that solution is

P(t) =

(6.4)

For the logistic equation describing the earth's population that we worked with earlier in this section, we have

k = 0.002, N = 12.5, and P_{0} = 6.084.

This gives the solution

whose graph is shown in Figure 6.54

Figure 6.54: The solution to the logistic equation modeling the earth's population.

Notice that the graph shows the population leveling off at 12.5 billion, as we expected, and that the population will be around 10 billion in the year 2050. These results, which we have found using a relatively simple mathematical model, agree fairly well with predictions made using a much more sophisticated model developed by the United Nations.

The logistic equation is useful in other situations, too, as it is good for modeling any situation in which limited growth is possible. For instance, it could model the spread of a flu virus through a population contained on a cruise ship, the rate at which a rumor spreads within a small town, or the behavior of an animal population on an island. Again, it is important to realize that through our work in this section, we have completely solved the logistic equation, regardless of the values of the constants N, k, and P0. Anytime we encounter a logistic equation, we can apply the formula we found in Equation (6.4).

### Activity 7-8

Consider the logistic equation

= kP(N — P)

with the graph of

vs. P shown below.

(a) At what value of *P* is the rate of change greatest?

(b) Consider the model for the earth's population that we created. At what value of *P* is the rate of change greatest? How does that compare to the population in recent years?

(c) According to the model we developed, what will the population be

in the year 2100?

(d) According to the model we developed, when will the population reach 9 billion?

(e) Now consider the general solution to the general logistic initial value problem that we found, given by

*P(t) =*

Verify algebraically that P(0) = Pq and that

### Summary

*In this section, we encountered the following important ideas:*

• A separable differential equation is one that may be rewritten with all occurrences of the dependent variable multiplying the derivative and all occurrences of the independent variable on the other side of the equation.

• We may find the solutions to certain separable differential equations by separating variables, integrating with respect to *t,* and ultimately solving the resulting algebraic equation for *y.*

• This technique allows us to solve many important differential equations that arise in the world around us. For instance, questions of growth and decay and Newton's Law of Cooling give rise to separable differential equations.

• If we assume that the rate of growth of a population is proportional to the population, we are led to a model in which the population grows without bound and at a rate that grows without bound.

• By assuming that the per capita growth rate decreases as the population grows, we are led to the logistic model of population growth, which predicts that the population will eventually stabilize at the carrying capacity.

### Exercises

Problems

1) The mass of a radioactive sample decays at a rate that is proportional to its mass.

(a) Express this fact as a differential equation for the mass M( t) using k for the constant of proportionality.

(b) If the initial mass is M0, find an expression for the mass M(t).

(c) The half-life of the sample is the amount of time required for half of the mass to decay. Knowing that the half-life of Carbon-14 is 5730 years, find the value of k for a sample of Carbon-14.

(d) How long does it take for a sample of Carbon-14 to be reduced to one-quarter its original mass?

(e) Carbon-14 naturally occurs in our environment; any living organism takes in Carbon-14 when it eats and breathes. Upon dying, however, the organism no longer takes in Carbon-14. Suppose that you find remnants of a pre-historic firepit. By analyzing the charred wood in the pit, you determine that the amount of Carbon-14 is only 30% of the amount in living trees. Estimate the age of the firepit. Note this approach is the basic idea behind radiocarbon dating.

2) Consider the initial value problem

y(0) = 8

(a) Find the solution of the initial value problem and sketch its graph.

(b) For what values of t is the solution defined?

(c) What is the value of y at the last time that the solution is defined?

(d) By looking at the differential equation, explain why we should not expect to find solutions with the value of y you noted in (c).

3) Suppose that a cylindrical water tank with a hole in the bottom is filled with water. The water, of course, will leak out and the height of the water will decrease. Let h( t) denote the height of the water. A physical principle called Torricelli's Law implies that the height decreases at a rate proportional to the square root of the height.

(a) Express this fact using k as the constant of proportionality.

(b) Suppose you have two tanks, one with k = 1 and another with k = 10. What physical differences would you expect to find?

(c) Suppose you have a tank for which the height decreases at 20 inches per minute when the water is filled to a depth of 100 inches. Find the value of k.

(d) Solve the initial value problem for the tank in part (c), and graph the solution you determine.

(e) How long does it take for the water to run out of the tank?

(f) Is the solution that you found valid for all time t? If so, explain how you know this. If not, explain why not.

4) The Gompertz equation is a model that is used to describe the growth of certain populations. Suppose that P( t) is the population of some organism and that

= —P(ln P — ln3).

(a) Sketch a slope field for P(t) over the range 0

P

6.

(b) Identify any equilibrium solutions and determine whether they are stable or unstable.

(c) Find the population P(t) assuming that P(0) = 1 and sketch its graph. What happens to P( t) after a very long time?

(d) Find the population P(t) assuming that P(0) = 6 and sketch its graph. What happens to P( t) after a very long time?

(e) Verify that the long-term behavior of your solutions agrees with what you predicted by looking at the slope field.