Separation of Variables

Learning Outcomes

  • Use separation of variables to solve a differential equation
  • Solve applications using 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

[latex]y^{\prime} =f\left(x\right)g\left(y\right)[/latex].

 

The term ‘separable’ refers to the fact that the right-hand side of the equation can be separated into a function of [latex]x[/latex] times a function of [latex]y[/latex]. Examples of separable differential equations include

[latex]\begin{array}{}\\ \\ y^{\prime} =\left({x}^{2}-4\right)\left(3y+2\right)\hfill \\ y^{\prime} =6{x}^{2}+4x\hfill \\ y^{\prime} =\sec{y}+\tan{y}\hfill \\ y^{\prime} =xy+3x - 2y - 6.\hfill \end{array}[/latex]

 

The second equation is separable with [latex]f\left(x\right)=6{x}^{2}+4x[/latex] and [latex]g\left(y\right)=1[/latex], the third equation is separable with [latex]f\left(x\right)=1[/latex] and [latex]g\left(y\right)=\sec{y}+\tan{y}[/latex], and the right-hand side of the fourth equation can be factored as [latex]\left(x+3\right)\left(y - 2\right)[/latex], 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 [latex]y[/latex] 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 [latex]y[/latex] that make [latex]g\left(y\right)=0[/latex]. These correspond to constant solutions.
  2. Rewrite the differential equation in the form [latex]\frac{dy}{g\left(y\right)}=f\left(x\right)dx[/latex].
  3. Integrate both sides of the equation.
  4. Solve the resulting equation for [latex]y[/latex] if possible.
  5. If an initial condition exists, substitute the appropriate values for [latex]x[/latex] and [latex]y[/latex] into the equation and solve for the constant.

Note that Step 4. states “Solve the resulting equation for [latex]y[/latex] if possible.” It is not always possible to obtain [latex]y[/latex] as an explicit function of [latex]x[/latex]. Quite often we have to be satisfied with finding [latex]y[/latex] as an implicit function of [latex]x[/latex].

Example: Using Separation of Variables

Find a general solution to the differential equation [latex]y^{\prime} =\left({x}^{2}-4\right)\left(3y+2\right)[/latex] using the method of separation of variables.

Watch the following video to see the worked solution to Example: Using Separation of Variables

For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.

You can view the transcript for this segmented clip of “4.3.1” here (opens in new window).

try it

Use the method of separation of variables to find a general solution to the differential equation [latex]y^{\prime} =2xy+3y - 4x - 6[/latex].

Example: Solving an Initial-Value Problem

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

[latex]y^{\prime} =\left(2x+3\right)\left({y}^{2}-4\right),y\left(0\right)=-3[/latex].

 

try it

Find the solution to the initial-value problem

[latex]6y^{\prime} =\left(2x+1\right)\left({y}^{2}-2y - 8\right),y\left(0\right)=-3[/latex]

 

using the method of separation of variables.

Try It

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.

Example: Determining Salt Concentration over Time

A tank containing [latex]100\text{L}[/latex] of a brine solution initially has [latex]4\text{kg}[/latex] of salt dissolved in the solution. At time [latex]t=0[/latex], another brine solution flows into the tank at a rate of [latex]2\text{L/min}\text{.}[/latex] This brine solution contains a concentration of [latex]0.5\text{kg/L}[/latex] 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 [latex]2\text{L/min}[/latex], so that the level of liquid in the tank remains constant (Figure 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.

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.

Figure 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?

Watch the following video to see the worked solution to Example: Determining Salt Concentration over Time

For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.

You can view the transcript for this segmented clip of “4.3.2” here (opens in new window).

try it

A tank contains [latex]3[/latex] kilograms of salt dissolved in [latex]75[/latex] liters of water. A salt solution of [latex]0.4\text{kg salt/L}[/latex] is pumped into the tank at a rate of [latex]6\text{L/min}[/latex] and is drained at the same rate. Solve for the salt concentration at time [latex]t[/latex]. Assume the tank is well mixed at all times.

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 [latex]T\left(t\right)[/latex] represent the temperature of an object as a function of time, then [latex]\frac{dT}{dt}[/latex] represents the rate at which that temperature changes. The temperature of the object’s surroundings can be represented by [latex]{T}_{s}[/latex]. Then Newton’s law of cooling can be written in the form

[latex]\frac{dT}{dt}=k\left(T\left(t\right)-{T}_{s}\right)[/latex]

 

or simply

[latex]\frac{dT}{dt}=k\left(T-{T}_{s}\right)[/latex].

 

The temperature of the object at the beginning of any experiment is the initial value for the initial-value problem. We call this temperature [latex]{T}_{0}[/latex]. Therefore the initial-value problem that needs to be solved takes the form

[latex]\frac{dT}{dt}=k\left(T-{T}_{s}\right),T\left(0\right)={T}_{0}[/latex],

 

where [latex]k[/latex] is a constant that needs to be either given or determined in the context of the problem. We use these equations in the next example.

Example: Waiting for a Pizza to Cool

A pizza is removed from the oven after baking thoroughly, and the temperature of the oven is [latex]350^\circ\text{F}\text{.}[/latex] The temperature of the kitchen is [latex]75^\circ\text{F}[/latex], and after [latex]5[/latex] minutes the temperature of the pizza is [latex]340^\circ\text{F}\text{.}[/latex] We would like to wait until the temperature of the pizza reaches [latex]300^\circ\text{F}[/latex] before cutting and serving it (Figure 3). 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.

Figure 3. From Newton’s law of cooling, if the pizza cools [latex]10^\circ\text{F}[/latex] in [latex]5[/latex] minutes, how long before it cools to [latex]300^\circ\text{F?}[/latex]

Watch the following video to see the worked solution to Example: Waiting for a Pizza to Cool

For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.

You can view the transcript for this segmented clip of “4.3.2” here (opens in new window).

try it

A cake is removed from the oven after baking thoroughly, and the temperature of the oven is [latex]450^\circ\text{F}\text{.}[/latex] The temperature of the kitchen is [latex]70^\circ\text{F}[/latex], and after [latex]10[/latex] minutes the temperature of the cake is [latex]430^\circ\text{F}\text{.}[/latex]

  1. Write the appropriate initial-value problem to describe this situation.
  2. Solve the initial-value problem for [latex]T\left(t\right)[/latex].
  3. How long will it take until the temperature of the cake is within [latex]5^\circ\text{F}[/latex] of room temperature?

Try It