# 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)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)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:

- 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)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)Thus our solutions are $y - \frac{y^3}{3} - \frac{x^3}{3} = C$.