Separable Equations

We now examine a solution technique for finding exact solutions to a class of differential equations known as separable differential equations. These equations are common in a wide variety of disciplines, including physics, chemistry, and engineering. We illustrate a few applications at the end of the section.

Separation of Variables

We start with a definition and some examples.

Definition

A separable differential equation is any equation that can be written in the form

y=f(x)g(y).

The term ‘separable’ refers to the fact that the right-hand side of the equation can be separated into a function of x

times a function of y.

Examples of separable differential equations include

y=(x24)(3y+2)y=6x2+4xy=secy+tanyy=xy+3x2y6.

The second equation is separable with f(x)=6x2+4x

and g(y)=1,

the third equation is separable with f(x)=1

and g(y)=secy+tany,

and the right-hand side of the fourth equation can be factored as (x+3)(y2),

so it is separable as well. The third equation is also called an autonomous differential equation because the right-hand side of the equation is a function of y

alone. If a differential equation is separable, then it is possible to solve the equation using the method of separation of variables.

Problem-Solving Strategy: Separation of Variables
  1. Check for any values of y

    that make

    g(y)=0.

    These correspond to constant solutions.

  2. Rewrite the differential equation in the form dyg(y)=f(x)dx.
  3. Integrate both sides of the equation.
  4. Solve the resulting equation for y

    if possible.

  5. If an initial condition exists, substitute the appropriate values for x

    and

    y

    into the equation and solve for the constant.

Note that Step 4. states “Solve the resulting equation for y

if possible.” It is not always possible to obtain y

as an explicit function of x.

Quite often we have to be satisfied with finding y

as an implicit function of x.

Using Separation of Variables

Find a general solution to the differential equation y=(x24)(3y+2)

using the method of separation of variables.

Follow the five-step method of separation of variables.

  1. In this example, f(x)=x24

    and

    g(y)=3y+2.

    Setting

    g(y)=0

    gives

    y=23

    as a constant solution.

  2. Rewrite the differential equation in the form
    dy3y+2=(x24)dx.
  3. Integrate both sides of the equation:
    dy3y+2=(x24)dx.

    Let

    u=3y+2.

    Then

    du=3dydxdx,

    so the equation becomes


    131udu=13x34x+C13ln\|u\|=13x34x+C13ln\|3y+2\|=13x34x+C.
  4. To solve this equation for y,

    first multiply both sides of the equation by

    3.
    ln\|3y+2\|=x312x+3C

    Now we use some logic in dealing with the constant

    C.

    Since

    C

    represents an arbitrary constant,

    3C

    also represents an arbitrary constant. If we call the second arbitrary constant

    C1,

    the equation becomes


    ln\|3y+2\|=x312x+C1.

    Now exponentiate both sides of the equation (i.e., make each side of the equation the exponent for the base

    e).
    eln\|3y+2\|=ex312x+C1\|3y+2\|=eC1ex312x

    Again define a new constant

    C2=ec1

    (note that

    C2>0):
    \|3y+2\|=C2ex312x.

    This corresponds to two separate equations:

    3y+2=C2ex312x

    and

    3y+2=C2ex312x.

    The solution to either equation can be written in the form

    y=−2±C2ex312x3.

    Since

    C2>0,

    it does not matter whether we use plus or minus, so the constant can actually have either sign. Furthermore, the subscript on the constant

    C

    is entirely arbitrary, and can be dropped. Therefore the solution can be written as


    y=−2+Cex312x3.
  5. No initial condition is imposed, so we are finished.

Use the method of separation of variables to find a general solution to the differential equation y=2xy+3y4x6.

y=2+Cex2+3x
Hint

First factor the right-hand side of the equation by grouping, then use the five-step strategy of separation of variables.

Solving an Initial-Value Problem

Using the method of separation of variables, solve the initial-value problem

y=(2x+3)(y24),y(0)=−3.

Follow the five-step method of separation of variables.

  1. In this example, f(x)=2x+3

    and

    g(y)=y24.

    Setting

    g(y)=0

    gives

    y=±2

    as constant solutions.

  2. Divide both sides of the equation by y24

    and multiply by

    dx.

    This gives the equation


    dyy24=(2x+3)dx.
  3. Next integrate both sides:
    1y24dy=(2x+3)dx.

    To evaluate the left-hand side, use the method of partial fraction decomposition. This leads to the identity


    1y24=14(1y21y+2).

    Then [link] becomes


    14(1y21y+2)dy=(2x+3)dx14(ln\|y2\|ln\|y+2\|)=x2+3x+C.

    Multiplying both sides of this equation by

    4

    and replacing

    4C

    with

    C1

    gives


    ln\|y2\|ln\|y+2\|=4x2+12x+C1ln\|y2y+2\|=4x2+12x+C1.
  4. It is possible to solve this equation for y. First exponentiate both sides of the equation and define C2=eC1:
    \|y2y+2\|=C2e4x2+12x.

    Next we can remove the absolute value and let

    C2

    be either positive or negative. Then multiply both sides by

    y+2.
    y2=C2(y+2)e4x2+12xy2=C2ye4x2+12x+2C2e4x2+12x.

    Now collect all terms involving y on one side of the equation, and solve for

    y:
    yC2ye4x2+12x=2+2C2e4x2+12xy(1C2e4x2+12x)=2+2C2e4x2+12xy=2+2C2e4x2+12x1C2e4x2+12x.
  5. To determine the value of C2,

    substitute

    x=0

    and

    y=−1

    into the general solution. Alternatively, we can put the same values into an earlier equation, namely the equation

    y2y+2=C2e4x2+12.

    This is much easier to solve for

    C2:
    y2y+2=C2e4x2+12x−12−1+2=C2e4(0)2+12(0)C2=−3.

    Therefore the solution to the initial-value problem is


    y=26e4x2+12x1+3e4x2+12x.

    A graph of this solution appears in [link].


    A graph of the solution over [-5, 3] for x and [-3, 2] for y. It begins as a horizontal line at y = -2 from x = -5 to just before -3, almost immediately steps up to y = 2 from just after x = -3 to just before x = 0, and almost immediately steps back down to y = -2 just after x = 0 to x = 3.

Find the solution to the initial-value problem

6y=(2x+1)(y22y8),y(0)=−3

using the method of separation of variables.

y=4+14ex2+x17ex2+x
Hint

Follow the steps for separation of variables to solve the initial-value problem.

Applications of Separation of Variables

Many interesting problems can be described by separable equations. We illustrate two types of problems: solution concentrations and Newton’s law of cooling.

Solution concentrations

Consider a tank being filled with a salt solution. We would like to determine the amount of salt present in the tank as a function of time. We can apply the process of separation of variables to solve this problem and similar problems involving solution concentrations.

Determining Salt Concentration over Time

A tank containing 100L

of a brine solution initially has 4kg

of salt dissolved in the solution. At time t=0,

another brine solution flows into the tank at a rate of 2L/min.

This brine solution contains a concentration of 0.5kg/L

of salt. At the same time, a stopcock is opened at the bottom of the tank, allowing the combined solution to flow out at a rate of 2L/min,

so that the level of liquid in the tank remains constant ([link]). Find the amount of salt in the tank as a function of time (measured in minutes), and find the limiting amount of salt in the tank, assuming that the solution in the tank is well mixed at all times.

A diagram of a cylinder filled with water with input and output. It is a 100 liter tank which initially contains 4 kg of salt. The input is 0.5 kg salt / liter and 2 liters / minute. The output is 2 liters / minute.

First we define a function u(t)

that represents the amount of salt in kilograms in the tank as a function of time. Then dudt

represents the rate at which the amount of salt in the tank changes as a function of time. Also, u(0)

represents the amount of salt in the tank at time t=0,

which is 4

kilograms.

The general setup for the differential equation we will solve is of the form

dudt=INFLOW RATEOUTFLOW RATE.

INFLOW RATE represents the rate at which salt enters the tank, and OUTFLOW RATE represents the rate at which salt leaves the tank. Because solution enters the tank at a rate of 2

L/min, and each liter of solution contains 0.5

kilogram of salt, every minute 2(0.5)=1kilogram

of salt enters the tank. Therefore INFLOW RATE = 1.

To calculate the rate at which salt leaves the tank, we need the concentration of salt in the tank at any point in time. Since the actual amount of salt varies over time, so does the concentration of salt. However, the volume of the solution remains fixed at 100 liters. The number of kilograms of salt in the tank at time t

is equal to u(t).

Thus, the concentration of salt is u(t)100

kg/L, and the solution leaves the tank at a rate of 2

L/min. Therefore salt leaves the tank at a rate of u(t)100·2=u(t)50

kg/min, and OUTFLOW RATE is equal to u(t)50.

Therefore the differential equation becomes dudt=1u50,

and the initial condition is u(0)=4.

The initial-value problem to be solved is

dudt=1u50,u(0)=4.

The differential equation is a separable equation, so we can apply the five-step strategy for solution.

Step 1. Setting 1u50=0

gives u=50

as a constant solution. Since the initial amount of salt in the tank is 4

kilograms, this solution does not apply.

Step 2. Rewrite the equation as

dudt=50u50.

Then multiply both sides by dt

and divide both sides by 50u:

du50u=dt50.

Step 3. Integrate both sides:

du50u=dt50ln\|50u\|=t50+C.

Step 4. Solve for u(t):

ln\|50u\|=t50Celn\|50u\|=e(t/50)C\|50u\|=C1et/50.

Eliminate the absolute value by allowing the constant to be either positive or negative:

50u=C1et/50.

Finally, solve for u(t):

u(t)=50C1et/50.

Step 5. Solve for C1:

u(0)=50C1e−0/504=50C1C1=46.

The solution to the initial value problem is u(t)=5046et/50.

To find the limiting amount of salt in the tank, take the limit as t

approaches infinity:

limtu(t)=5046et/50=5046(0)=50.

Note that this was the constant solution to the differential equation. If the initial amount of salt in the tank is 50

kilograms, then it remains constant. If it starts at less than 50 kilograms, then it approaches 50 kilograms over time.

A tank contains 3

kilograms of salt dissolved in 75

liters of water. A salt solution of 0.4kg salt/L

is pumped into the tank at a rate of 6L/min

and is drained at the same rate. Solve for the salt concentration at time t.

Assume the tank is well mixed at all times.

Initial value problem:

dudt=2.42u25,u(0)=3 Solution:u(t)=3027et/50
Hint

Follow the steps in [link] and determine an expression for INFLOW and OUTFLOW. Formulate an initial-value problem, and then solve it.

Newton’s law of cooling

Newton’s law of cooling states that the rate of change of an object’s temperature is proportional to the difference between its own temperature and the ambient temperature (i.e., the temperature of its surroundings). If we let T(t)

represent the temperature of an object as a function of time, then dTdt

represents the rate at which that temperature changes. The temperature of the object’s surroundings can be represented by Ts.

Then Newton’s law of cooling can be written in the form

dTdt=k(T(t)Ts)

or simply

dTdt=k(TTs).

The temperature of the object at the beginning of any experiment is the initial value for the initial-value problem. We call this temperature T0.

Therefore the initial-value problem that needs to be solved takes the form

dTdt=k(TTs),T(0)=T0,

where k

is a constant that needs to be either given or determined in the context of the problem. We use these equations in [link].

Waiting for a Pizza to Cool

A pizza is removed from the oven after baking thoroughly, and the temperature of the oven is 350°F.

The temperature of the kitchen is 75°F,

and after 5

minutes the temperature of the pizza is 340°F.

We would like to wait until the temperature of the pizza reaches 300°F

before cutting and serving it ([link]). How much longer will we have to wait?

A diagram of a pizza pie. The room temperature is 75 degrees, and the pizza temperature is 350 degrees.

The ambient temperature (surrounding temperature) is 75°F,

so Ts=75.

The temperature of the pizza when it comes out of the oven is 350°F,

which is the initial temperature (i.e., initial value), so T0=350.

Therefore [link] becomes

dTdt=k(T75),T(0)=350.

To solve the differential equation, we use the five-step technique for solving separable equations.

  1. Setting the right-hand side equal to zero gives T=75

    as a constant solution. Since the pizza starts at

    350°F,

    this is not the solution we are seeking.

  2. Rewrite the differential equation by multiplying both sides by dt

    and dividing both sides by

    T75:
    dTT75=kdt.
  3. Integrate both sides:
    dTT75=kdtln\|T75\|=kt+C.
  4. Solve for T

    by first exponentiating both sides:


    eln\|T75\|=ekt+C\|T75\|=C1ektT75=C1ektT(t)=75+C1ekt.
  5. Solve for C1

    by using the initial condition

    T(0)=350:
    T(t)=75+C1ektT(0)=75+C1ek(0)350=75+C1C1=275.

    Therefore the solution to the initial-value problem is


    T(t)=75+275ekt.

    To determine the value of

    k,

    we need to use the fact that after

    5

    minutes the temperature of the pizza is

    340°F.

    Therefore

    T(5)=340.

    Substituting this information into the solution to the initial-value problem, we have


    T(t)=75+275ektT(5)=340=75+275e5k265=275e5ke5k=5355lne5k=ln(5355)5k=ln(5355)k=15ln(5355)0.007408.

    So now we have

    T(t)=75+275e−0.007048t.

    When is the temperature

    300°F?

    Solving for

    t,

    we find


    T(t)=75+275e−0.007048t300=75+275e−0.007048t225=275e−0.007048te−0.007048t=911lne−0.007048t=ln911−0.007048t=ln911t=10.007048ln91128.5.

    Therefore we need to wait an additional

    23.5

    minutes (after the temperature of the pizza reached

    340°F).

    That should be just enough time to finish this calculation.

A cake is removed from the oven after baking thoroughly, and the temperature of the oven is 450°F.

The temperature of the kitchen is 70°F,

and after 10

minutes the temperature of the cake is 430°F.

  1. Write the appropriate initial-value problem to describe this situation.
  2. Solve the initial-value problem for T(t).
  3. How long will it take until the temperature of the cake is within 5°F

    of room temperature?

  1. Initial-value problem
    dTdt=k(T70),T(0)=450
  2. T(t)=70+380ekt
  3. Approximately 114

    minutes.

Hint

Determine the values of Ts

and T0

then use [link].

Key Concepts

Key Equations

Solve the following initial-value problems with the initial condition y0=0

and graph the solution.

dydt=y+1
y=et1
dydt=y1
dydt=y+1
y=1et
dydt=y1

Find the general solution to the differential equation.

x2y=(x+1)y
y=Cxe−1/x
y=tan(y)x
y=2xy2
y=1Cx2
dydt=ycos(3t+2)
2xdydx=y2
y=2C+lnx
y=eyx2
(1+x)y=(x+2)(y1)
y=Cex(x+1)+1
dxdt=3t2(x2+4)
tdydt=1y2
y=sin(lnt+C)
y=exey

Find the solution to the initial-value problem.

y=eyx,y(0)=0
y=ln(ex)
y=y2(x+1),y(0)=2
dydx=y3xex2,y(0)=1
y=12ex2
dydt=y2exsin(3x),y(0)=1
y=xsech2y,y(0)=0
y=tanh−1(x22)
y=2xy(1+2y),y(0)=−1
dxdt=ln(t)1x2,x(0)=0
x=sin(ttlnt)
y=3x2(y2+4),y(0)=0
y=ey5x,y(0)=ln(ln(5))
y=ln(ln(5))ln(25x)
y=−2xtan(y),y(0)=π2

For the following problems, use a software program or your calculator to generate the directional fields. Solve explicitly and draw solution curves for several initial conditions. Are there some critical initial conditions that change the behavior of the solution?

[T] y=12y

y=Ce−2x+12

A direction field with horizontal arrows pointing to the right at y = 0.5. Above 0.5, the arrows slope down and to the right and are increasingly vertical the further they are from y = 0.5 Below0.5, the arrows slope up and to the right and are increasingly vertical the further they are from y = 0.5.

[T] y=y2x3

[T] y=y3ex

y=12Cex

A direction field with arrows pointing to the right. They are horizontal at the y axis. The further the arrows are from the axis, the more vertical they become. They point up above the x axis and down below the x axis.

[T] y=ey

[T] y=yln(x)

y=Cexxx

A direction field with arrows pointing to the right. The arrows are flat on y = 1. The further the arrows are from that, the steeper they become. They point up above that line and down below that line.

Most drugs in the bloodstream decay according to the equation y=cy,

where y

is the concentration of the drug in the bloodstream. If the half-life of a drug is 2

hours, what fraction of the initial dose remains after 6

hours?

A drug is administered intravenously to a patient at a rate r

mg/h and is cleared from the body at a rate proportional to the amount of drug still present in the body, d

Set up and solve the differential equation, assuming there is no drug initially present in the body.

y=rd(1edt)

[T] How often should a drug be taken if its dose is 3

mg, it is cleared at a rate c=0.1

mg/h, and 1

mg is required to be in the bloodstream at all times?

A tank contains 1

kilogram of salt dissolved in 100

liters of water. A salt solution of 0.1

kg salt/L is pumped into the tank at a rate of 2

L/min and is drained at the same rate. Solve for the salt concentration at time t.

Assume the tank is well mixed.

y(t)=109ex/50

A tank containing 10

kilograms of salt dissolved in 1000

liters of water has two salt solutions pumped in. The first solution of 0.2

kg salt/L is pumped in at a rate of 20

L/min and the second solution of 0.05

kg salt/L is pumped in at a rate of 5

L/min. The tank drains at 25

L/min. Assume the tank is well mixed. Solve for the salt concentration at time t.

[T] For the preceding problem, find how much salt is in the tank 1

hour after the process begins.

134.3

kilograms

Torricelli’s law states that for a water tank with a hole in the bottom that has a cross-section of A

and with a height of water h

above the bottom of the tank, the rate of change of volume of water flowing from the tank is proportional to the square root of the height of water, according to dVdt=A2gh,

where g

is the acceleration due to gravity. Note that dVdt=Adhdt.

Solve the resulting initial-value problem for the height of the water, assuming a tank with a hole of radius 2

ft. The initial height of water is 100

ft.

For the preceding problem, determine how long it takes the tank to drain.

720

seconds

For the following problems, use Newton’s law of cooling.

The liquid base of an ice cream has an initial temperature of 200°F

before it is placed in a freezer with a constant temperature of 0°F.

After 1

hour, the temperature of the ice-cream base has decreased to 140°F.

Formulate and solve the initial-value problem to determine the temperature of the ice cream.

[T] The liquid base of an ice cream has an initial temperature of 210°F

before it is placed in a freezer with a constant temperature of 20°F.

After 2

hours, the temperature of the ice-cream base has decreased to 170°F.

At what time will the ice cream be ready to eat? (Assume 30°F

is the optimal eating temperature.)

12

hours 14

minutes

[T] You are organizing an ice cream social. The outside temperature is 80°F

and the ice cream is at 10°F.

After 10

minutes, the ice cream temperature has risen by 10°F.

How much longer can you wait before the ice cream melts at 40°F?

You have a cup of coffee at temperature 70°C

and the ambient temperature in the room is 20°C.

Assuming a cooling rate kof0.125,

write and solve the differential equation to describe the temperature of the coffee with respect to time.

T(t)=20+50e−0.125t

[T] You have a cup of coffee at temperature 70°C

that you put outside, where the ambient temperature is 0°C.

After 5

minutes, how much colder is the coffee?

You have a cup of coffee at temperature 70°C

and you immediately pour in 1

part milk to 5

parts coffee. The milk is initially at temperature 1°C.

Write and solve the differential equation that governs the temperature of this coffee.

T(t)=20+38.5e−0.125t

You have a cup of coffee at temperature 70°C,

which you let cool 10

minutes before you pour in the same amount of milk at 1°C

as in the preceding problem. How does the temperature compare to the previous cup after 10

minutes?

Solve the generic problem y=ay+b

with initial condition y(0)=c.

y=(c+ba)eaxba

Prove the basic continual compounded interest equation. Assuming an initial deposit of P0

and an interest rate of r,

set up and solve an equation for continually compounded interest.

Assume an initial nutrient amount of I

kilograms in a tank with L

liters. Assume a concentration of c

kg/L being pumped in at a rate of r

L/min. The tank is well mixed and is drained at a rate of r

L/min. Find the equation describing the amount of nutrient in the tank.

y(t)=cL+(IcL)ert/L

Leaves accumulate on the forest floor at a rate of 2

g/cm2/yr and also decompose at a rate of 90%

per year. Write a differential equation governing the number of grams of leaf litter per square centimeter of forest floor, assuming at time 0

there is no leaf litter on the ground. Does this amount approach a steady value? What is that value?

Leaves accumulate on the forest floor at a rate of 4

g/cm2/yr. These leaves decompose at a rate of 10%

per year. Write a differential equation governing the number of grams of leaf litter per square centimeter of forest floor. Does this amount approach a steady value? What is that value?

y=40(1e−0.1t),40

g/cm2

Glossary

autonomous differential equation
an equation in which the right-hand side is a function of y

alone

separable differential equation
any equation that can be written in the form y=f(x)g(y)
separation of variables
a method used to solve a separable differential equation

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

You can also download for free at http://cnx.org/contents/9a1df55a-b167-4736-b5ad-15d996704270@5.1

Attribution: