Skip to main content
Logo image

Coordinated Calculus

Section 8.4 Separable differential equations

In Sections 8.2 and 8.3, we have seen several ways to approximate the solution to an initial value problem. 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 their solutions.

Separable differential equations.

A first-order separable differential equation is a differential equation of the form
dydt=g(y)h(t).
This structure allows the variables to be separated so that expressions involving t can be collected on one side, and expressions involving y can be collected on the other side, multiplied by dydt.
For instance, consider the equation
dydt=ty.
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 appear on the left, multiplied by dy/dt. For this example, we divide both sides by y so that
1ydydt=t.
Note that when we attempt to separate the variables in a differential equation, we require that one side is a product in which the derivative dy/dt is one factor and the other factor is solely an expression involving y.
Not every differential equation is separable. For example, if we consider the equation
dydt=tβˆ’y,
it may seem natural to separate it by writing
y+dydt=t.
As we will see, this will not be helpful, since the left-hand side is not a product of a function of y with dydt.

Example 8.39.

In this example, we explore whether certain differential equations are separable or not, and then revisit some key ideas from earlier work in integral calculus.
  1. Which of the following differential equations are separable? If the equation is separable, write the equation in the revised form g(y)dydt=h(t).
    1. dydt=βˆ’3y.
    2. dydt=tyβˆ’y.
    3. dydt=t+1.
    4. dydt=t2βˆ’y2.
  2. Explain why any autonomous differential equation is guaranteed to be separable.
  3. Why do we include the term β€œ+C” in the expression
    ∫x dx=x22+C?
  4. Suppose we know that a certain function f satisfies the equation
    ∫fβ€²(x) dx=∫x dx.
    What can you conclude about f?

Subsection 8.4.1 Solving separable differential equations

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

Example 8.40.

Find all functions y that are solutions to the differential equation
dydt=ty2.
Solution.
We begin by separating the variables and writing
y2dydt=t.
Integrating both sides of the equation with respect to the independent variable t shows that
∫y2dydt dt=∫t dt.
Next, we notice that the left-hand side allows us to change the variable of antidifferentiation
 4 
This is why we required that the left-hand side be written as a product in which dy/dt is one of the terms.
from t to y. In particular, dy=dydt dt, so we now have
∫y2 dy=∫t dt.
This equation says that two families of antiderivatives are equal to each other. Therefore, when we find representative antiderivatives of both sides, we know they must differ by an arbitrary constant C. Antidifferentiating and including the integration constant C on the right, we find that
y33=t22+C.
It is not necessary to include an arbitrary constant on both sides of the equation; we know that y3/3 and t2/2 are in the same family of antiderivatives and must therefore differ by a single constant.
Finally, we solve the last equation above for y as a function of t, which gives
y(t)=32t2+3C3.
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)=32t2+C3
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
dydt=ty2, y(0)=2,
we know that the solution has the form y(t)=32t2+C3 for some constant C. We therefore must find the appropriate value for C that gives the initial value y(0)=2. Hence,
2=y(0)=3202+C3=C3,
which shows that C=23=8. The solution to the initial value problem is then
y(t)=32t2+83.
The strategy of Example 8.40 may be applied to any differential equation of the form dydt=g(y)β‹…h(t), and any differential equation of this form is said to be separable. We work to solve a separable differential equation by writing
1g(y)dydt=h(t),
and then integrating both sides with respect to t. After integrating, we try to solve algebraically for y in order to write y as a function of t.

Example 8.41.

Solve the differential equation
dydt=3y.
Solution.
Following the same strategy as in Example 8.40, we have
1ydydt=3.
Integrating both sides with respect to t,
∫1ydydt dt=∫3 dt,
and thus
∫1y dy=∫3 dt.
Antidifferentiating and including the integration constant, we find that
ln⁑|y|=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
|y|=e3t+C=e3teC.
Since C is an unknown constant, eC is as well, though we do know that it is positive (because ex is positive for any x). When we remove the absolute value in order to solve for y, however, this constant may be either positive or negative. To account for a possible + or βˆ’, we denote this updated constant by C to obtain
y(t)=Ce3t.
There is one more 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 should consider the equilibrium solutions separately. In this case, notice that the final form of our solution captures the equilibrium solution by allowing C=0.

Example 8.42.

Suppose that the population of a town is growing continuously at an annual rate of 3% per year.
  1. Let P(t) be the population of the town in year t. Write a differential equation that describes the annual growth rate.
  2. Find the solutions of this differential equation.
  3. If you know that the town’s population in year 0 is 10,000, find the population P(t).
  4. How long does it take for the population to double? This time is called the doubling time.
  5. Working more generally, find the doubling time if the annual growth rate is k times the population.
Hint.
  1. Small hints for each of the prompts above.
Answer.
  1. dPdt=0.03P
  2. P=Ce0.03t.
  3. P=10000e0.03t.
  4. The doubling time is t=ln⁑(2)0.03β‰ˆ23.105 years.
  5. The doubling time is t=1kln⁑(2).
Solution.
  1. Since the population P(t) of the town is growing at an annual rate of 3% per year, this means that dPdt=0.03P
  2. We use separation of variables and write 1PdPdt=1.03. We then have
    ∫1PdPdtdt=∫0.03dt
    and thus ∫1PdP=∫0.03dt. Evaluating the integrals on each side, we have ln⁑|P|=0.03t+c By definition of the logarithm function, it follows that
    |P|=e0.03t+c=ece0.03t=Ce0.03t.
    Incorporating the Β± that follows from the absolute value sign into the constant C, we conclude that P=Ce0.03t.
  3. Given that P(0)=10000, we see that 10000=Ce0=C. So
    P=10000e0.03t.
  4. The population will have doubled when P=200000. To determine the time it takes the population to double, we solve the equation
    10000e0.03t=20000.
    Thus e0.03t=2, so t=ln⁑(2)0.03β‰ˆ23.105. It will take about 23.1 years for the population to double in size.
  5. If the annual growth rate is k, then the differential equation for the population is
    dPdt=kP.
    We can use separation of variables to show that P=P0ekt, where P0 is the population at time t=0. We then find the doubling time by solving the equation P0ekt=2P0. We first solve for ekt and get ekt=2. Taking natural logs, kt=ln⁑(2), and dividing by k, t=1kln⁑(2). The doubling time for the population is thus 1kln⁑(2).

Example 8.43.

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
dTdt=βˆ’k(Tβˆ’75),
where k is a constant of proportionality.
  1. 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.
  2. Find all the solutions of this differential equation.
  3. What happens to all the solutions as tβ†’βˆž? Explain how this agrees with your intuition.
  4. What is the temperature of the cup of coffee after 20 minutes?
  5. How long does it take for the coffee to cool to 80∘?
Hint.
  1. Small hints for each of the prompts above.
Answer.
  1. k=130
  2. T=75+Ceβˆ’t/30
  3. The temperature of the coffee tends to 75 degrees.
  4. T(20)=75+30eβˆ’2/3β‰ˆ90.4∘F.
  5. t=βˆ’30ln⁑(16)β‰ˆ53.75 minutes.
Solution.
We have
dTdt=βˆ’k(Tβˆ’75),
where k is a constant. We also have T(0)=105.
  1. Since the coffee is cooling at a rate of one degree per minute at time 0, it follows that dTdt=βˆ’1 at this instant. From the given differential equation, we know βˆ’k(T(0)βˆ’75)=βˆ’1. Next, T(0)=105, so βˆ’k(105βˆ’75)=βˆ’1, and thus k=130.
  2. We use separation of variables to solve the differential equation dTdt=βˆ’130(Tβˆ’75). Separating variables and integrating both sides with respect to t,
    ∫1Tβˆ’75dT=βˆ’βˆ«130dt
    Integrating both sides,
    ln⁑|Tβˆ’75|=βˆ’130t+c
    Using the definition of the logarithm function and writing ec=C, we see that
    |Tβˆ’75|=eβˆ’t/30+c=Ceβˆ’t/30
    Finally, including the absolute value in C and solving for T, Tβˆ’75=Ceβˆ’t/30, so T=75+Ceβˆ’t/30.
  3. As tβ†’βˆž, eβˆ’t/30β†’0. So
    limtβ†’βˆž(75+Ceβˆ’t/30)=75.
    This means that as tβ†’βˆž, Tβ†’75, or the temperature of the coffee tends to 75 degrees.
  4. In order to determine the temperature of the coffee after 20 minutes, we need to first determine the value of the constant C in the solution T=75+Ceβˆ’t/30. To do this, we use the fact that the temperature of the coffee at t=0 is 105∘F. Thus, 105=75+Ce0, so C=30. Now we know that T=75+30eβˆ’t/30, and when t=20, T(20)=75+30eβˆ’2/3. The temperature of the coffee after 20 minutes is approximately 90.4∘F.
  5. To determine how long it will take the coffee to cool to 80∘F, we solve the equation 80=75+30eβˆ’t/30 for t. Solving first for eβˆ’t/30, we subtract 75 from both sides and divide by 30 to get eβˆ’t/30=530. Taking logarithms and solving for t, βˆ’t30=ln⁑(16), and thus t=βˆ’30ln⁑(16). We conclude that it will take about 53.75 minutes for the coffee to cool to 80∘F.

Example 8.44.

Solve each of the following differential equations or initial value problems.
  1. dydtβˆ’(2βˆ’t)y=2βˆ’t
  2. 1tdydt=et2βˆ’2y
  3. yβ€²=2y+2,  y(0)=2
  4. yβ€²=2y2,  y(βˆ’1)=2
  5. dydt=βˆ’2tyt2+1,   y(0)=4
Hint.
  1. Small hints for each of the prompts above.
Answer.
  1. y=βˆ’1+Ce(2tβˆ’t22).
  2. y=12ln⁑(et2+C).
  3. y=βˆ’1+3e2t.
  4. y=βˆ’12t+32=βˆ’24t+3.
  5. y=4t2+1.
Solution.
  1. We are given that dydtβˆ’(2βˆ’t)y=2βˆ’t. We first separate the variables by writing dydt=(2βˆ’t)y+(2βˆ’t)=(2βˆ’t)(y+1) and then dividing both sides by (y+1) to find
    11+ydydt=2βˆ’t.
    Integrating both sides with respect to t, we have
    ∫11+ydy=∫(2βˆ’t)dt.
    Evaluating the integrals,
    ln⁑|1+y|=(2tβˆ’12t2)+c
    Rewriting without logarithms,
    |1+y|=e(2tβˆ’t22)ec
    Writing ec=C and including the sign from the absolute value in this constant,
    1+y=Ce(2tβˆ’t22),
    and therefore y=βˆ’1+Ce(2tβˆ’t22).
  2. Given that 1tdydt=et2βˆ’2y, we first observe that et2βˆ’2y=et2eβˆ’2y. Separating the variables,
    e2ydydt=tet2.
    Integrating with respect to t,
    ∫e2ydy=∫tet2dt.
    Using standard substitution techniques on both sides, we find that
    12e2y=12et2+c
    Writing 2c=C, we then have e2y=et2+C, and taking logarithms to solve for y, we find 2y=ln⁑(et2+C), and thus
    y=12ln⁑(et2+C).
  3. For the initial value problem yβ€²=2y+2, y(0)=2, we first solve the differential equation. Noting that 2y+2=2(y+1), we have
    dydt=2(y+1),
    so
    1y+1dydt=2
    Integrating with respect to t,
    ∫1y+1dy=∫2dt
    and thus evaluating the integrals, ln⁑|y+1|=2t+c. It follows that |y+1|=e2t+c=ece2t, so in the usual way we can write y+1=Ce2t, and therefore
    y=βˆ’1+Ce2t.
    Using y(0)=2 to solve the IVP, we obtain 2=βˆ’1+Ce0 and so C=3. The solution to the initial value problem is
    y=βˆ’1+3e2t.
  4. For the initial value problem yβ€²=2y2, y(βˆ’1)=2, we first separate variables and write
    1y2dydt=2.
    Next, integrating with respect to t,
    ∫1y2dy=∫2dt,
    and thus βˆ’yβˆ’1=2t+c. Solving for y, it follows
    y=βˆ’12t+c.
    We now use the initial value y(βˆ’1)=2 and obtain 2=βˆ’1βˆ’2+c. Solving for c gives c=32. The solution of the initial value problem is thus
    y=βˆ’12t+32=βˆ’24t+3.
  5. For the IVP dydt=βˆ’2tyt2+1, y(0)=4, we first separate variables and write
    1ydydt=βˆ’2tt2+1.
    Integrating with respect to t we find
    ∫1ydy=βˆ’βˆ«2tt2+1dt.
    Using the substitution u=t2+1 on the right, it follows that
    ln⁑|y|=βˆ’ln⁑|t2+1|+c.
    By definition and properties of the logarithm,
    |y|=eβˆ’ln⁑|t2+1|ec=eln⁑|t2+1|βˆ’1ec=|t2+1|βˆ’1ec.
    Writing C=ec and absorbing the absolute value from the left side, we have
    y=Ct2+1.
    Using the initial condition y(0)=4, we obtain 4=C1 or C=4. Thus, the solution to the initial value problem is
    y=4t2+1.

Subsection 8.4.2 Summary

  • 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. Later, we will learn in Section 8.6 that the important logistic differential equation is also separable.

Exercises 8.4.3 Exercises

1. Initial value problem for dy/dx=x8y.

Find the equation of the solution to dydx=x4y through the point (x,y)=(1,3).

4. Initial value problem for du/dt=e6u+10t.

Solve the separable differential equation for u
dudt=e3u+8t.
Use the following initial condition: u(0)=8.

6. Radioactive decay.

The mass of a radioactive sample decays at a rate that is proportional to its mass.
  1. Express this fact as a differential equation for the mass M(t) using k for the constant of proportionality.
  2. If the initial mass is M0, find an expression for the mass M(t).
  3. 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.
  4. How long does it take for a sample of Carbon-14 to be reduced to one-quarter its original mass?
  5. 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.
     5 
    This approach is the basic idea behind radiocarbon dating.

7. Initial value problem for dy/dt=βˆ’ty.

Consider the initial value problem
dydt=βˆ’ty, y(0)=8
  1. Find the solution of the initial value problem and sketch its graph.
  2. For what values of t is the solution defined?
  3. What is the value of y at the last time that the solution is defined?
  4. By looking at the differential equation, explain why we should not expect to find solutions with the value of y you noted in (c).

8. Torricelli’s Law.

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.
  1. Express this fact using k as the constant of proportionality.
  2. Suppose you have two tanks, one with k=βˆ’1 and another with k=βˆ’10. What physical differences would you expect to find?
  3. 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.
  4. Solve the initial value problem for the tank in part (c), and graph the solution you determine.
  5. How long does it take for the water to run out of the tank?
  6. Is the solution that you found valid for all time t? If so, explain how you know this. If not, explain why not.

9. The Gompertz equation.

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
dPdt=βˆ’Pln⁑(P3)=βˆ’P(ln⁑Pβˆ’ln⁑3).
  1. Sketch a slope field for P(t) over the range 0≀P≀6.
  2. Identify any equilibrium solutions and determine whether they are stable or unstable.
  3. Find the population P(t) assuming that P(0)=1 and sketch its graph. What happens to P(t) after a very long time?
  4. Find the population P(t) assuming that P(0)=6 and sketch its graph. What happens to P(t) after a very long time?
  5. Verify that the long-term behavior of your solutions agrees with what you predicted by looking at the slope field.