Solving Separable Differential Equations

# Solving Separable Differential Equations

We are now going to look at another method of solving differential equations. This method will be applicable to differential equations that are separable which we define below.

 Definition: A differential equation is said to be Separable if it can be written in the form $M(x) + N(y) \frac{dy}{dx} = 0$ where $M(x)$ is a function of $x$ and $N(y)$ is a function of $y$.

One prime example of a separable differential equation is $\frac{dy}{dx} = \frac{y^2 + 3y}{x + 2x} - 6$ which we rearrange as follows:

(1)
\begin{align} \quad \frac{dy}{dx} = \frac{x^2 + 3x}{y + 2y^2} \\ \quad (y + 2y^2)\frac{dy}{dx} = x^2 + 3x \\ \quad \underbrace{(-x^2 - 3x)}_{M(x)} + \underbrace{(y + 2y^2)}_{N(y)} \frac{dy}{dx} = 0 \end{align}

If we have a separable differential equation $M(x) + N(y) \frac{dy}{dx} = 0$, then rearranging the differential equation and using differentials we have that:

(2)
\begin{align} \quad N(y) \frac{dy}{dx} = -M(x) \\ \quad N(y) \: dy = -M(x) \: dx \\ \quad \int N(y) \: dy = \int -M(x) \: dx \end{align}

Note that the integration on the lefthand side of the equation is with respect to $y$ while the integration on the righthand side of the equation is with respect to $x$. If we can evaluate both of these integrals, then the lefthand side of the equation above will yield the variable $y$ and we will obtain solutions to our differential equation. In particular, solving separable differential equations in this manner is useful provided that both $M(x)$ and $N(y)$ are relatively easy to integrate.

In fact, the differential equations of the form $\frac{dy}{dt} = ay + b$ from The Method of Direct Integration page were separable which we will prove in the following proposition.

 Proposition 1: Differential equations in the form $\frac{dy}{dt} = ay + b$ where $a$ and $b$ are constants are separable.
• Proof: We can rewrite $\frac{dy}{dt} = ay + b$ as follows:
(3)
\begin{align} \quad \frac{dy}{dt} = ay + b \\ \quad \frac{1}{ay + b} \frac{dy}{dt} = 1 \\ \quad \underbrace{-1}_{M(t)} + \underbrace{\frac{1}{ay + b}}_{N(y)} \frac{dy}{dt} = 0 \end{align}
• Therefore $\frac{dy}{dt} = ay + b$ is a separable differential equation. $\blacksquare$

Before we look at some examples of solving separable differential equations, we will first look at an important definition.

 Definition: The Interval of Validity of a solution to a differential equation is the largest interval that contains the initial value of the problem.

Let's look at some examples of solving separable differential equations.

## Example 1

Find the general solutions to the separable differential equation $\frac{dy}{dx} = \frac{x^2 + 2x + 1}{y^2 - 3}$.

We note that this is a separable differential equation since it can be rewritten as $-(x^2 + 2x + 1) + (y^2 - 3) \frac{dy}{dx} = 0$, and so we have that for $C$ as a constant:

(4)
\begin{align} \quad (y^2 - 3) \frac{dy}{dx} = x^2 + 2x + 1 \\ \quad (y^2 - 3) \: dy = (x^2 + 2x + 1) \: dx \\ \quad \int (y^2 - 3) \: dy = \int (x^2 + 2x + 1) \: dx \\ \quad \frac{y^3}{3} - 3y = \frac{x^3}{3} + x^2 + x + C \end{align}

In this example, we cannot nicely write the solution explicitly as $y$ in terms of $x$. Of course, that is perfectly fine, and we will leave our answer as $\frac{y^3}{3} - 3y - \frac{x^3}{3} - x^2 - x + C = 0$

## Example 2

Find the general solutions to the separable differential equation $\frac{dy}{dx} = \frac{x^2}{1 - y^2}$.

We note that the differential equation above can be rewritten as $(1 - y^2) \frac{dy}{dx} = x^2$, and so for $C$ as a constant we have that:

(5)
\begin{align} \quad (1 - y^2) \frac{dy}{dx} = x^2 \\ \quad (1 - y^2) dy = x^2 dx \\ \quad \int (1 - y^2) \: dy = \int x^2 \: dx \\ \quad y - \frac{y^3}{3} = \frac{x^3}{3} + C \end{align}

Thus our solutions are $y - \frac{y^3}{3} - \frac{x^3}{3} = C$.