8.3__Separable_Differential_Equations
8.3__Separable_Differential_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.
The term ‘separable’ refers to the fact that the right-hand side of Equation 8.3.1 can be separated into a function of x times a
function of y . Examples of separable differential equations include
′ 2
y = (x − 4)(3y + 2) (8.3.2)
′ 2
y = 6x + 4x (8.3.3)
′
y = sec y + tan y (8.3.4)
′
y = xy + 3x − 2y − 6. (8.3.5)
Equation 8.3.3 is separable with f (x) = 6x + 4x and g(y) = 1 , Equation 8.3.4 is separable with f (x) = 1 and
2
g(y) = sec y + tan y, and the right-hand side of Equation 8.3.5 can be factored as (x + 3)(y − 2) , so it is separable as well.
Equation 8.3.4 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.
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.
Solution
Follow the five-step method of separation of variables.
8.3.1 https://math.libretexts.org/@go/page/10784
2
1. In this example, f (x) = x 2
−4 and g(y) = 3y + 2 . Setting g(y) = 0 gives y = − as a constant solution.
3
dy
Let u = 3y + 2 . Then du = 3 dx , so the equation becomes
dx
1 1 1
3
∫ du = x − 4x + C
3 u 3
1 1 3
ln |u| = x − 4x + C
3 3
1 1
3
ln |3y + 2| = x − 4x + C .
3 3
4. To solve this equation for y , first multiply both sides of the equation by 3.
3
ln |3y + 2| = x − 12x + 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 C , where C = 3C , the equation becomes
1 1
3
ln |3y + 2| = x − 12x + C1 .
Now exponentiate both sides of the equation (i.e., make each side of the equation the exponent for the base e ).
3
ln |3y+2| x −12x+C1
e =e
3
C1 x −12x
|3y + 2| = e e
Because of the absolute value on the left side of the equation, this corresponds to two separate equations:
3
x −12x
3y + 2 = C2 e
and
3
x −12x
3y + 2 = −C2 e .
Since C > 0 , it does not matter whether we use plus or minus, so the constant can actually have either sign. Furthermore, the
2
subscript on the constant C is entirely arbitrary, and can be dropped. Therefore the solution can be written as
3
x −12x
−2 + C e
y = , where C = ±C2 or C = 0.
3
Note that in writing a single general solution in this way, we are also allowing C to equal 0. This gives us the singular solution,
2
y =− , for the given differential equation. Check that this is indeed a solution of this differential equation!
3
8.3.2 https://math.libretexts.org/@go/page/10784
5. No initial condition is imposed, so we are finished.
Exercise 8.3.1
Use the method of separation of variables to find a general solution to the differential equation
′
y = 2xy + 3y − 4x − 6.
Hint
First factor the right-hand side of the equation by grouping, then use the five-step strategy of separation of variables.
Answer
2
x +3x
y = 2 + Ce
Solution
Follow the five-step method of separation of variables.
1. In this example, f (x) = 2x + 3 and g(y) = y 2
−4 . Setting g(y) = 0 gives y = ±2 as constant solutions.
2. Divide both sides of the equation by y 2
−4 and multiply by dx. This gives the equation
dy
= (2x + 3) dx.
2
y −4
To evaluate the left-hand side, use the method of partial fraction decomposition. This leads to the identity
1 1 1 1
= ( − ).
2
y −4 4 y −2 y +2
1
2
(ln |y − 2| − ln |y + 2|) = x + 3x + C .
4
2
ln |y − 2| − ln |y + 2| = 4 x + 12x + C1
∣ y −2 ∣ 2
ln∣ ∣ = 4 x + 12x + C1 .
∣ y +2 ∣
4. It is possible to solve this equation for y. First exponentiate both sides of the equation and define C 2 =e
C1
:
∣ y −2 ∣ 2
4 x +12x
∣ ∣ = C2 e .
∣ y +2 ∣
Next we can remove the absolute value and let a new constant C be positive, negative, or zero, i.e., C
3 3 = ±C2 or C
3 = 0.
8.3.3 https://math.libretexts.org/@go/page/10784
2
4 x +12x
y − 2 = C3 (y + 2)e
2 2
4 x +12x 4 x +12x
y − 2 = C3 y e + 2 C3 e .
Now collect all terms involving y on one side of the equation, and solve for y :
2 2
4 x +12x 4 x +12x
y − C3 y e = 2 + 2 C3 e
2 2
4 x +12x 4 x +12x
y(1 − C3 e ) = 2 + 2 C3 e
2
4 x +12x
2 + 2C3 e
y = .
2
4 x +12x
1 − C3 e
5. To determine the value of C3 , substitute x =0 and y = −1 into the general solution. Alternatively, we can put the same
y −2
values into an earlier equation, namely the equation . This is much easier to solve for C :
2
4 x +12
= C3 e 3
y +2
y −2 2
4 x +12x
= C3 e
y +2
−1 − 2 2
4(0 ) +12(0)
= C3 e
−1 + 2
C3 = −3.
Exercise 8.3.2
Find the solution to the initial-value problem
′ 2
6y = (2x + 1)(y − 2y − 8)
Hint
Follow the steps for separation of variables to solve the initial-value problem.
Answer
2
x +x
4 + 14e
y =
x2 +x
1 − 7e
8.3.4 https://math.libretexts.org/@go/page/10784
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.
A tank containing 100 L of a brine solution initially has 4 kg of salt dissolved in the solution. At time t = 0 , another brine
solution flows into the tank at a rate of 2 L/min. This brine solution contains a concentration of 0.5 kg/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 2 L/min, so that the
level of liquid in the tank remains constant (Figure 8.3.2). 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.
Figure 8.3.2 : A brine tank with an initial amount of salt solution accepts an input flow and delivers an output flow. How does
the amount of salt change with time?
Solution
du
First we define a function u(t) that represents the amount of salt in kilograms in the tank as a function of time. Then
dt
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
du
= INFLOW RATE − OUTFLOW RATE.
dt
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) = 1 kilogram 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
u(t)
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 kg/L,
100
u(t) u(t)
and the solution leaves the tank at a rate of 2 L/min. Therefore salt leaves the tank at a rate of ⋅2 = kg/min, and
100 50
u(t) du u
OUTFLOW RATE is equal to . Therefore the differential equation becomes =1− , and the initial condition is
50 dt 50
u(0) = 4. The initial-value problem to be solved is
du u
=1− , u(0) = 4.
dt 50
8.3.5 https://math.libretexts.org/@go/page/10784
The differential equation is a separable equation, so we can apply the five-step strategy for solution.
u
Step 1. Setting 1 − =0 gives u = 50 as a constant solution. Since the initial amount of salt in the tank is 4 kilograms, this
50
solution does not apply.
Step 2. Rewrite the equation as
du 50 − u
= .
dt 50
t
− ln |50 − u| = + C.
50
ln |50−u| −(t/50)−C
e =e
−t/50 −C
|50 − u| = C1 e , where C1 = e .
Eliminate the absolute value by allowing the constant to be positive, negative, or zero, i.e., C 1 = ±e
−C
or C
1 =0 :
−t/50
50 − u = C1 e .
−0/50
u(0) = 50 − C1 e
4 = 50 − C1
C1 = 46.
= 50 − 46(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.
Exercise 8.3.3
A tank contains 3 kilograms of salt dissolved in 75 liters of water. A salt solution of 0.4 kg salt/L is pumped into the tank at a
rate of 6 L/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.
Hint
8.3.6 https://math.libretexts.org/@go/page/10784
Follow the steps in Example 8.3.3 and determine an expression for INFLOW and OUTFLOW. Formulate an initial-value
problem, and then solve it.
Initial value problem:
du 2u
= 2.4 − , u(0) = 3
dt 25
Answer
−t/50
u(t) = 30 − 27e
dT
= k(T (t) − Ts )
dt
or simply
dT
= k(T − Ts ).
dt
The temperature of the object at the beginning of any experiment is the initial value for the initial-value problem. We call this
temperature T . Therefore the initial-value problem that needs to be solved takes the form
0
dT
= k(T − Ts ) (8.3.7)
dt
with T (0) = T , where k is a constant that needs to be either given or determined in the context of the problem. We use these
0
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 (Figure 8.3.3). How much longer will we have to wait?
Figure 8.3.3 : From Newton’s law of cooling, if the pizza cools 10°F in 5 minutes, how long before it cools to 300°F ?
Solution
The ambient temperature (surrounding temperature) is 75°F , so T = 75 . The temperature of the pizza when it comes out of
s
the oven is 350°F, which is the initial temperature (i.e., initial value), so T = 350 . Therefore Equation 8.3.7 becomes
0
dT
= k(T − 75)
dt
8.3.7 https://math.libretexts.org/@go/page/10784
with 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 T − 75 :
dT
= k dt.
T − 75
ln |T − 75| = kt + C .
kt C
|T − 75| = C1 e , where C1 = e .
kt
T − 75 = ±C1 e
kt
T − 75 = C e , where C = ±C1 or C = 0.
kt
T (t) = 75 + C e .
k(0)
T (0) = 75 + C e
350 = 75 + C
C = 275.
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
kt
T (t) = 75 + 275e
5k
T (5) = 340 = 75 + 275e
5k
265 = 275e
53
5k
e =
55
5k
53
ln e = ln( )
55
53
5k = ln( )
55
1 53
k = ln( ) ≈ −0.007408.
5 55
−0.007048t
300 = 75 + 275e
−0.007048t
225 = 275e
8.3.8 https://math.libretexts.org/@go/page/10784
−0.007048t
9
e =
11
9
−0.007048t
ln e = ln
11
9
−0.007048t = ln
11
1 9
t =− ln ≈ 28.5.
0.007048 11
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.
Exercise 8.3.4
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.
a. Write the appropriate initial-value problem to describe this situation.
b. Solve the initial-value problem for T (t) .
c. How long will it take until the temperature of the cake is within 5°F of room temperature?
Hint
Determine the values of T and T then use Equation 8.3.7.
s 0
Answer a
Initial-value problem
dT
= k(T − 70), T (0) = 450
dt
Answer b
kt
T (t) = 70 + 380e
Answer c
Approximately 114 minutes.
Key Concepts
A separable differential equation is any equation that can be written in the form y = f (x)g(y).′
The method of separation of variables is used to find the general solution to a separable differential equation.
Key Equations
Separable differential equation
y' = f (x)g(y)
Solution concentration
du
= INFLOW RATE − OUTFLOW RATE
dt
8.3.9 https://math.libretexts.org/@go/page/10784
Glossary
autonomous differential equation
an equation in which the right-hand side is a function of y alone
separation of variables
a method used to solve a separable differential equation
This page titled 8.3: Separable Differential Equations is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by
OpenStax.
8.3: Separable Equations by Edwin “Jed” Herman, Gilbert Strang is licensed CC BY-NC-SA 4.0. Original source:
https://openstax.org/details/books/calculus-volume-1.
8.3.10 https://math.libretexts.org/@go/page/10784