Skip to main content
Logo image

Section Separation of Variables (SOV) Method

When a differential equation is both first-order and separable, we can reliably find its general solution using the separation of variables method. At its core, this technique involves rewriting the equation so that all \(y\) terms are grouped on one side and all \(x\) terms on the other. Once separated, integrating both sides reveals the general solution that needs a bit of clean-up.
The primary challenge in applying this method is often the algebraic steps before and after the integration. First, to get the equation separable form and then isolating the dependent variable down to a clean solution.
This section lays out the general steps of the method and provides several examples to help you master the process, as well as the algebraic and calculus skills that go with it.

Subsection Separation of Variable Method Steps

Once you’ve verified that an equation is separable, solving it becomes a systematic process. Here’s the step-by-step outline to follow:

✍🏻 Method 2. Steps for Using Separation of Variables.

Step 1: Verify Separability
(i) Check that your equation is first-order and (ii) can be rearranged into the form
\begin{equation*} \frac{dy}{dx} = f(x) \cdot g(y). \end{equation*}
Step 2: Separate and Integrate
(i) Rearrange so that all \(y\) terms are on one side (with \(dy\)) and \(x\) terms are on the other (with \(dx\)), then (ii) integrate:
\begin{equation*} \int \frac{1}{g(y)}\, dy = \int f(x)\, dx. \end{equation*}
(iii) Compute the integrals on both sides.
Step 3: Solve for \(y\)
If possible, explicitly solve the resulting equation for \(y\text{.}\) If not, leave the solution in implicit form. Remember to combine integration constants when appropriate.

Checkpoint 59.

(a) πŸ€”πŸ’­ When Does SOV Apply?
Which two properties must a differential equation satisfy in order to solve it using the separation of variables method?
  • The equation must be linear and separable.
  • Incorrect. Separable is required, but the equation does not need to be linear.
  • The equation must be first-order and linear.
  • Incorrect. First-order is required, but the equation does not need to be linear for the separation of variables method to be applied.
  • The equation must be second-order and separable.
  • Incorrect. Separable is required, but the equation cannot be second-order for the separation of variables method to be applied.
  • The equation must be first-order and separable.
  • Correct! The separation of variables method applies only to first-order differential equations thatare separable.
(b) πŸ€”πŸ’­ Place the SOV Tasks in the Correct Order.
A common practice when using separation of variables is to treat \(\frac{dy}{dx}\) like a fraction, moving \(dx\) and \(dy\) around as if they separate objects. Although not strictly rigorous, this practice is often justified and consistently leads to valid results.
Specifically, when we present the separated integrals in Step 2 as
\begin{equation*} \int \frac{1}{g(y)}\ dy = \int f(x)\ dx\text{,} \end{equation*}
where it appears as though we integrate one side with respect to \(y\) and the other with respect to \(x\text{.}\) But more accurately, we are integrating both sides with respect to \(x\text{,}\) using the substitution \(dy = \frac{dy}{dx}\,dx\text{.}\)
To see this clearly, start from the separable form:
\begin{equation*} \frac{dy}{dx} = f(x)\,g(y). \end{equation*}
Divide both sides by \(g(y)\) to obtain:
\begin{equation*} \frac{1}{g(y)}\,\frac{dy}{dx} = f(x). \end{equation*}
Integrating both sides with respect to \(x\) gives:
\begin{align*} \int \frac{1}{g(y(x))}\,\ob{\frac{dy}{dx}\,dx}^{dy} \amp = \int f(x)\,dx\\ \int \frac{1}{g(y)}\,dy \amp = \int f(x)\,dx. \end{align*}
This justifies the informal integration with respect to different variables.

Checkpoint 60. πŸ€”πŸ’­ Integrating Both Sides.

    Part of the separation of variables method involves integrating each side of the equation with respect to a different variable.
  • True.

  • This is false. Although it looks like this is true in SOV: Step 2, both sides are actually integrated with respect to the same variable, \(x\) or whatever the independent variable happens to be in the context of the problem.
  • False.

  • This is false. Although it looks like this is true in SOV: Step 2, both sides are actually integrated with respect to the same variable, \(x\) or whatever the independent variable happens to be in the context of the problem.

Subsection Basic Examples

Let’s begin with a few warm-up problems to build confidence in using separation of variables. The examples that follow are intentionally straightforward, each equation is either already separable or requires minimal algebraic manipulation. As you work through them, keep your focus on identifying the separable form, carefully separating variables, integrating both sides, and explicitly solving for \(y\) when possible.

Checkpoint 61. πŸ€”πŸ’­ Review Separability.

Which of the following differential equations are separable?
  • \(\quad\ds \frac{dy}{dx} = x e^y\)
  • Is this the product of a function of \(x\) and \(y\text{?}\)
  • \(\quad\ds \frac{dy}{dx} = \frac{x}{1 + y^2}\)
  • Note: \(\frac{x}{1 + y^2} = x \cdot \frac{1}{1 + y^2}\text{.}\)
  • \(\quad\ds \frac{dy}{dx} - y = x\)
  • Moving \(y\) over you get
    \begin{equation*} \frac{dy}{dx} = x + y\text{.} \end{equation*}
    Can a sum like this be converted into the form \(f(x) \cdot g(y)\text{?}\)
  • \(\quad\ds y'' = \ln(x)\ln(y)\)
  • Note, this is a second-order differential equation...

🌌 Example 62. Warm-Up: Basic Separable Equations.

Find the general solution to each of the following differential equations using the separation of variables method.
\begin{equation*} 1.\quad \frac{dy}{dx} = x^2, \qquad 2.\quad \frac{dy}{dx} = y^2, \qquad 3.\quad \frac{dy}{dx} + \frac{x}{y^2} = 0 \end{equation*}
Solution.
We’ll first solve equations (1) and (2) side-by-side to clearly demonstrate each step of the separation of variables method.
\(1.\quad\ds\frac{dy}{dx} = x^2\)
\(2.\quad\ds\frac{dy}{dx} = y^2\)
Step 1 – Verify separability:
\begin{equation*} \frac{dy}{dx} = \underset{\large f(x)}{\underset{\uparrow}{\textcolor{BurntOrange}{\ul{x^2}}}} \cdot \underset{\large g(y)}{\underset{\uparrow}{\textcolor{green}{\ul{1}}}} \end{equation*}
\begin{equation*} \frac{dy}{dx} = \underset{\large f(x)}{\underset{\uparrow}{\textcolor{BurntOrange}{\ul{1}}}} \cdot \underset{\large g(y)}{\underset{\uparrow}{\textcolor{green}{\ul{y^2}}}} \end{equation*}
Step 2 – Separate and integrate:
\begin{align*} dy \amp = x^2\,dx\\ \int dy \amp = \int x^2\,dx\\ y + c_1 \amp = \frac{1}{3}x^3 + c_2 \end{align*}
\begin{align*} y^{-2}\,dy \amp = dx\\ \int y^{-2}\,dy \amp = \int dx\\ -\frac{1}{y} + c_1 \amp = x + c_2 \end{align*}
Step 3 – Solve for \(y\) and combine constants:
\begin{equation*} \boxed{y = \frac{1}{3}x^3 + c} \quad\text{where } c = c_2 - c_1 \end{equation*}
\begin{gather*} \frac{1}{y} = -x + c,\quad c = c_2 - c_1\\ \boxed{y = \frac{1}{-x + c}} \end{gather*}
\(3.\quad\ds\frac{dy}{dx} + \frac{x}{y^2} = 0\).
Step 1 – Rewrite clearly:
\begin{equation*} \frac{dy}{dx} = -\frac{x}{y^2}. \end{equation*}
Check separability explicitly:
\begin{equation*} \frac{dy}{dx} = (-x)\cdot\frac{1}{y^2}. \end{equation*}
Step 2 – Separate variables and integrate:
\begin{align*} y^2\,dy \amp = -x\,dx\\ \int y^2\,dy \amp = \int -x\,dx\\ \frac{y^3}{3} + c_1 \amp = -\frac{x^2}{2} + c_2 \end{align*}
Step 3 – Combine constants and solve explicitly for \(y\text{:}\)
\begin{equation*} \frac{y^3}{3} = -\frac{x^2}{2} + c \quad\Rightarrow\quad \boxed{y = \left(-\frac{3}{2}x^2 + c\right)^{1/3}}. \end{equation*}

Subsection Initial-Value Problems

After finding a general solution to a separable equation, you often need to use an initial condition to identify a specific, or particular, solution. The next example demonstrates clearly how initial conditions help determine the integration constant after applying separation of variables.

🌌 Example 63. Finding a Particular Solution.

Find the particular solution to the initial-value problem
\begin{equation*} z' - 1 = z^2, \quad z(4) = 9 \end{equation*}
Solution.
This differential equation is first order and separable since
\begin{align*} z' - 1 \amp = z^2 \\ z' \amp = z^2 + 1 = \big( 1 \big) \big( z^2 + 1 \big) \end{align*}
So separation of variables applies.
\begin{equation*} \frac{1}{z^2+1}dz = 1\ dt \end{equation*}
Separate
\begin{equation*} \int\frac{1}{z^2+1}\ dz = \int 1\ dt \end{equation*}
Integrate
\begin{equation*} \arctan z = t + c \end{equation*}
So, the general solution is
\begin{equation*} z = \tan(t+c) \text{.} \end{equation*}
Substituting, \(z(4) = 9\text{,}\) into the general solution, we get
\begin{align*} 9 = \tan(4+c) \implies \amp\ \arctan(9) = 4 + c \\ \amp\ \arctan(9) - 4 = c \end{align*}
Therefore, the solution to the intial-valued problem is
\begin{equation*} z = \tan(t + \arctan(9) - 4) \end{equation*}
Be cautious about rewriting constants in decimal form. For instance, if you approximate \(\arctan(9) - 4 \approx -2.54\text{,}\) the solution becomes:
\begin{equation*} z = \tan(t - 2.54), \end{equation*}
which may not exactly satisfy the original initial condition due to rounding errors. It’s usually better to leave constants in exact form.

Subsection Implicit Solutions

Sometimes, after integration, it may not be possible or practical to isolate \(y\) explicitly. Solutions presented in such forms are known as implicit solutions. Although they don’t isolate one variable completely, implicit solutions still provide a complete description of the relationship between variables. Let’s look at a few examples demonstrating how to handle these situations clearly.

🌌 Example 64. An Implicit Solution.

Solve the initial-value problem
\begin{equation*} Q Q' + e^Q Q' = t, \quad Q(2) = 0 \end{equation*}
Solution.
Notice the equation already separates naturally once we factor out \(Q'\text{:}\)
\begin{equation*} (Q + e^Q)Q' = t \quad\Rightarrow\quad (Q + e^Q)\frac{dQ}{dt} = t\text{.} \end{equation*}
\begin{equation*} (Q + e^Q)\,dQ = t\,dt \end{equation*}
Separate variables
\begin{equation*} \int(Q + e^Q)\,dQ = \int t\,dt \end{equation*}
Integrate
\begin{align*} \frac{Q^2}{2} + e^Q \amp = \frac{t^2}{2} + c_1\\ Q^2 + 2e^Q \amp = t^2 + c,\quad c=2c_1 \end{align*}
Combine constants
The general implicit solution is:
\begin{equation*} Q^2 + 2e^Q = t^2 + c. \end{equation*}
Although we can’t isolate \(Q\) neatly, we can still find the particular constant using the initial condition \(Q(2) = 0\text{.}\) Substitute \(t=2\) and \(Q=0\text{:}\)
\begin{align*} (0)^2 + 2e^0 \amp = 2^2 + c\\ 2 \amp = 4 + c \quad\Rightarrow\quad c=-2. \end{align*}
Thus, the particular implicit solution is:
\begin{equation*} Q^2 + 2e^Q = t^2 - 2. \end{equation*}

🌌 Example 65. β€œ\(\pm\)” in the Solution.

Using separation of variables, solve the differential equation
\begin{equation*} \frac{dy}{dx} = \frac{\cos x}{y}, \quad y(0) = -5\text{.} \end{equation*}
Solution.
The given equation is clearly separable, as we can rewrite it in product form:
\begin{equation*} \frac{dy}{dx} = (\cos x)\cdot\frac{1}{y}. \end{equation*}
\begin{equation*} y\,dy = \cos(x)\,dx \end{equation*}
Separate variables
\begin{equation*} \int y\,dy = \int \cos(x)\,dx \end{equation*}
Integrate
\begin{align*} \frac{y^2}{2} \amp = \sin(x) + c_1\\ y^2 \amp = 2\sin(x) + c,\quad c=2c_1 \end{align*}
Combine constants
This yields the implicit general solution:
\begin{equation*} y^2 = 2\sin(x) + c. \end{equation*}
Before explicitly solving for \(y\text{,}\) it’s simpler to use the initial condition \(y(0) = -5\) to find the constant \(c\) first:
\begin{align*} (-5)^2 = 2\sin(0) + c \amp\Rightarrow 25 = c. \end{align*}
Thus, the implicit particular solution is:
\begin{equation*} y^2 = 2\sin(x) + 25. \end{equation*}
Solving explicitly for \(y\text{,}\) we introduce a \(\pm\text{:}\)
\begin{equation*} y(x) = \pm\sqrt{2\sin(x) + 25}. \end{equation*}
To determine the correct sign, apply the initial condition again:
\begin{equation*} y(0) = \pm\sqrt{2\sin(0) + 25} = \pm5. \end{equation*}
Since we know \(y(0)=-5\text{,}\) the solution must take the negative branch:
\begin{equation*} \boxed{\ y(x) = -\sqrt{2\sin(x) + 25}\ }. \end{equation*}

Checkpoint 66. πŸ€”πŸ’­ Select the Implicit Solutions.

Subsection Absolute Values in General Solutions

Checkpoint 67. πŸ€”πŸ’­ Solutions to an Equation with an Absolute Value.

Select the solutions to the equation
\begin{equation*} |x| = 14\text{.} \end{equation*}
  • \(14\)
  • If you plug \(14\) into the equation, do you get a true statement?
  • \(-14\)
  • If you plug \(-14\) into the equation, do you get a true statement?
  • \(7\)
  • If you plug \(7\) into the equation, do you get a true statement?
  • \(1\)
  • If you plug \(1\) into the equation, do you get a true statement?
  • \(0\)
  • If you plug \(0\) into the equation, do you get a true statement?
When solving differential equations, it’s common to encounter absolute values, particularly when integrating expressions involving the natural logarithm. For instance, you might arrive at a step like:
\begin{equation} |y| = e^{\sin(x) + c}.\tag{10} \end{equation}
To isolate \(y\) fully, you need to carefully address the absolute value. This is typically handled by rewriting the equation as:
\begin{equation} y = \pm e^{\sin(x) + c}.\tag{11} \end{equation}
But why introduce the \(\pm\text{?}\) Think about a simpler example:
\begin{equation*} |y| = 5. \end{equation*}
Clearly, this equation has two possible solutions: \(y=5\) and \(y=-5\text{.}\) The same logic gives the possible solutions to equation (10):
\begin{equation*} y = e^{\sin(x) + c} \quad\text{and}\quad y = -e^{\sin(x) + c}. \end{equation*}
We use \(\pm\) as a shorthand in equation (11) to represent both solutions.

🌌 Example 68. Absolute Value from Algebra.

Find the general solution to the differential equation
\begin{equation*} x\frac{dy}{dx} + 10x^2y = 6x^2 \end{equation*}
Solution.
Start by checking that the equation is separable. First, simplify the given equation:
\begin{align*} x\frac{dy}{dx} + 10x^2y \amp= 6x^2\\ \frac{dy}{dx} + 10xy \amp= 6x\\ \frac{dy}{dx} \amp= 6x - 10xy = 2x(3 - 5y). \end{align*}
Now, we apply the separation of variables method.
\begin{equation*} \frac{1}{3 - 5y}dy = 2x\ dx \end{equation*}
Separate variables
\begin{equation*} \left. \begin{array}{c} u = 3-5y\\ du = -5dx \end{array} \right| \rightarrow \end{equation*}
\begin{equation*} \int \frac{1}{3 - 5y}dy = \int 2x\ dx \end{equation*}
Integrate
\begin{align*} \ln|3 - 5y| \amp = x^2 + c_1 \\ |3 - 5y| \amp = e^{x^2 + c_1} \end{align*}
Isolate up to \(|3 - 5y|\)
Here is where we resolve the absolute value by converting it to \(\pm\text{,}\) then absorbing the \(\pm\) into the integration constant. This is ok since multiplying a constant by \(\pm 1\) just creates another constant.
\begin{align*} 3 - 5y \amp = \pm e^{x^2 + c_1} \\ 3 - 5y \amp= c_2 e^{x^2},\quad c_2=\pm e^{c_1} \end{align*}
Introduce \(\pm\)
& absorb it into \(c_2\)
We are now ready to solve explicitly for \(y\text{:}\)
\begin{align*} 5y = 3 - c_2 e^{x^2} \amp\\ \boxed{\ y = c\,e^{x^2} + \frac{3}{5}\ }\amp , \quad c=-\frac{c_2}{5}. \end{align*}
Isolate \(y\) &
combine
constants
The separation of variables method is a flexible and powerful tool for solving a wide range of differential equations, including nonlinear ones. As you’ve seen, the method is systematic: separate, integrate, and isolate. While the mechanics of the method are straightforward, the complexity often lies in the algebraic manipulation and integration.

Subsection πŸ“€ Wrap-Up

Check Your Understanding.

Checkpoint 69. πŸ€”πŸ’­ Separation of Variables Reading Questions.
(a) πŸ€”πŸ’­ SOV and Nonlinear Equations.
    The separation of variables method cannot be applied to non-linear differential equations.
  • True.

  • Being able to solve non-linear differential equations is one of the strengths of the separation of variables method.
  • False.

  • Being able to solve non-linear differential equations is one of the strengths of the separation of variables method.
(b) πŸ€”πŸ’­ Sort the Steps in Order.
(c) πŸ€”πŸ’­ Combining Constants.
Which of the following are valid ways to combine constants when finalizing your solution? Select ALL that apply.
  • \(\quad \left\{ \begin{align} |y| \amp = e^{2x + c_1}\\ y \amp = c_2 e^{2x} \end{align} \right.\qquad\) where \(c_2=\pm e^{c_1}\text{.}\)
  • Correct, since
    \begin{align*} |y| \amp =, e^{2x + c_1} \\ y \amp =, \pm e^{2x + c_1} \\ y \amp =, \pm e^{2x} \cdot e^{c_1} \\ y \amp =, c_2 e^{2x} \quad \text{where } c_2 = \pm e^{c_1} \end{align*}
  • \(\quad \left\{ \begin{align} \frac{y^2}{2} \amp = \sin(x) + c_1\\ y^2 \amp = 2\sin(x) + c_2 \end{align} \right.\qquad\) where \(c_2 = 2c_1\text{.}\)
  • Correct, since
    \begin{align*} \frac{y^2}{2} \amp =, \sin(x) + c_1 \\ y^2 \amp =, \sin(x) + 2c_1 \\ y^2 \amp =, 2\sin(x) + c_2 \quad \text{where } c_2 = 2c_1 \end{align*}
  • \(\quad \left\{ \begin{align} y^2 \amp = 2\sin(x) + c_2\\ y \amp = \pm\sqrt{2\sin(x)} + c_3 \end{align} \right.\qquad\) where \(c_3=\pm \sqrt{c_2}\text{.}\)
  • Incorrect, you should not combine constants here since \(\quad\sqrt{A + B} \neq \sqrt{A} + \sqrt{B}\text{.}\)
    Your solution should be written as
    \begin{align*} y^2 \amp =, 2\sin(x) + c_2 \\ y \amp =, \pm\sqrt{2\sin(x) + c_2}\quad \leftarrow\text{ done} \end{align*}
  • \(\quad \left\{ \begin{align} e^y \amp = 3y + c_1\\ y \amp = \ln(3y) + c_2 \end{align} \right.\qquad\) where \(c_2= \ln(c_1)\text{.}\)
  • Incorrect, you should not combine constants here since \(\ln(A + B) \neq \ln(A) + \ln(B)\text{.}\)
    Your solution should be
    \begin{align*} e^y \amp =, 3y + c_1 \\ y \amp =, \ln(3y + c_1)\quad \leftarrow\text{ done} \end{align*}
  • \(\quad \left\{ \begin{align} xy \amp = e^x + c_1\\ y \amp = \frac{e^x}{x} + c_2 \end{align} \right.\qquad\) where \(\ds c_2=\frac{c_1}{x}\text{.}\)
  • Incorrect, you should not combine constants here since \(\frac{c_1}{x}\) is not constant. Instead your solution should be left as
    \begin{align*} xy \amp =, e^x + c_1 \\ y \amp =, \frac{e^x + c_1}{x} \\ y \amp =, \frac{e^x}{x} + \frac{c_1}{x}\quad \leftarrow\text{ done} \end{align*}
  • \(\quad \left\{ \begin{align} \sqrt{y} \amp = c_1e^{3x}\\ y \amp = c_2\, e^{6x} \end{align} \right.\qquad\) where \(c_2= c_1^2\text{.}\)
  • Correct, since
    \begin{align*} \sqrt{y} \amp =, c_1e^{3x} \\ y \amp =, (c_1e^{3x})^2 \\ y \amp =, c_1^2(e^{3x})^2 \\ y \amp =, c_2\, e^{6x}\quad \text{where } c_2 = c_1^2 \end{align*}
You have attempted of activities on this page.