# Separable Equations

A first order differential equation \(y' = f\left( {x,y} \right)\) is called a separable equation if the function \(f\left( {x,y} \right)\) can be factored into the product of two functions of \(x\) and \(y:\)

where \(p\left( x \right)\) and \(h\left( y \right)\) are continuous functions.

Considering the derivative \({y'}\) as the ratio of two differentials \({\frac{{dy}}{{dx}}},\) we move \(dx\) to the right side and divide the equation by \(h\left( y \right):\)

Of course, we need to make sure that \(h\left( y \right) \ne 0.\) If there's a number \({y_0}\) such that \(h\left( {{y_0}} \right) = 0,\) then this number will also be a solution of the differential equation. Division by \(h\left( y \right)\) causes loss of this solution.

By denoting \(q\left( y \right) = {\frac{1}{{h\left( y \right)}}},\) we write the equation in the form

We have separated the variables so now we can integrate this equation:

where \(C\) is an integration constant.

Calculating the integrals, we get the expression

representing the general solution of the separable differential equation.

## Solved Problems

Click or tap a problem to see the solution.

### Example 1

Solve the differential equation \[\frac{{dy}}{{dx}} = y\left( {y + 2} \right).\]

### Example 2

Solve the differential equation \[\left( {{x^2} + 4} \right)y' = 2xy.\]

### Example 1.

Solve the differential equation \[\frac{{dy}}{{dx}} = y\left( {y + 2} \right).\]

Solution.

In the given case \(p\left( x \right) = 1\) and \(h\left( y \right) = y\left( {y + 2} \right).\) We divide the equation by \(h\left( y \right)\) and move \(dx\) to the right side:

One can notice that after dividing we can lose the solutions \(y = 0\) and \(y = -2\) when \(h\left( y \right)\) becomes zero. In fact, let's see that \(y = 0\) is a solution of the differential equation. Obviously,

Substituting this into the equation gives \(0 = 0.\) Hence, \(y = 0\) is one of the solutions. Similarly, we can check that \(y = -2\) is also a solution.

Returning to the differential equation, we integrate it:

We can calculate the left integral using the fractional decomposition of the integrand:

Thus, we get the following decomposition of the rational integrand:

Hence,

We can rename the constant: \(2C = {C_1}.\) Thus, the final solution of the equation is written in the form

Here the general solution is expressed in implicit form. In the given case we can transform the expression to obtain the answer as an explicit function \(y = f\left( {x,{C_1}} \right),\) where \({C_1}\) is a constant. However, it is possible to do not for all differential equations.

### Example 2.

Solve the differential equation \[\left( {{x^2} + 4} \right)y' = 2xy.\]

Solution.

We can rewrite this equation in the following way:

Divide both sides by \(\left( {{x^2} + 4} \right)y\) to get

Obviously, that \({{x^2} + 4} \ne 0\) for all real \(x.\) Check if \(y = 0\) is a solution of the equation. Substituting \(y = 0\) and \(dy = 0\) into the differential equation, we see that the function \(y = 0\) is one of the solutions of the equation.

Now we can integrate it:

Notice that \(d\left( {{x^2}} \right) = d\left( {{x^2} + 4} \right).\) Hence,

We can represent the constant \(C\) as \(\ln {C_1},\) where \({C_1} \gt 0.\) Then

Thus, the given differential equation has the following solutions:

This answer can be simplified. Indeed, if using an arbitrary constant \(C,\) which takes values from \(-\infty\) to \(\infty,\) the solution can be written in the form:

When \(C = 0\), it becomes \(y = 0.\)