Differential Equations

First Order Equations

1st Order Diff Equations Logo

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

\[f\left( {x,y} \right) = p\left( x \right)h\left( y \right),\]

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

\[\frac{{dy}}{{dx}} = p\left( x \right)h\left( y \right),\;\; \Rightarrow \frac{{dy}}{{h\left( y \right)}} = p\left( x \right)dx.\]

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

\[q\left( y \right)dy = p\left( x \right)dx.\]

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

\[\int {q\left( y \right)dy} = \int {p\left( x \right)dx} + C,\]

where \(C\) is an integration constant.

Calculating the integrals, we get the expression

\[Q\left( y \right) = P\left( x \right) + C,\]

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:

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

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,

\[y = 0,\;\;dy = 0.\]

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:

\[\int {\frac{{dy}}{{y\left( {y + 2} \right)}}} = \int {dx} + C.\]

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

\[ \frac{1}{{y\left( {y + 2} \right)}} = \frac{A}{y} + \frac{B}{{y + 2}},\;\; \Rightarrow \frac{1}{{y\left( {y + 2} \right)}} = \frac{{A\left( {y + 2} \right) + By}}{{y\left( {y + 2} \right)}},\;\; \Rightarrow 1 \equiv Ay + 2A + By,\;\; \Rightarrow 1 \equiv \left( {A + B} \right)y + 2A,\;\; \Rightarrow \left\{ {\begin{array}{*{20}{c}} {A + B = 0}\\ {2A = 1} \end{array}} \right.,\;\; \Rightarrow \left\{ {\begin{array}{*{20}{c}} {A = \frac{1}{2}}\\ {B = - \frac{1}{2}} \end{array}} \right..\]

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

\[\frac{1}{{y\left( {y + 2} \right)}} = \frac{1}{2}\left( {\frac{1}{y} - \frac{1}{{y + 2}}} \right).\]

Hence,

\[\frac{1}{2}\int {\left( {\frac{1}{y} - \frac{1}{{y + 2}}} \right)dy} = \int {dx} + C,\;\; \Rightarrow \frac{1}{2}\left( {\int {\frac{{dy}}{y}} - \int {\frac{{dy}}{{y + 2}}} } \right) = \int {dx} + C,\;\; \Rightarrow \frac{1}{2}\left( {\ln \left| y \right| - \ln \left| {y + 2} \right|} \right) = x + C,\;\; \Rightarrow \frac{1}{2}\ln \left| {\frac{y}{{y + 2}}} \right| = x + C,\;\; \Rightarrow \ln \left| {\frac{y}{{y + 2}}} \right| = 2x + 2C.\]

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

\[\ln \left| {\frac{y}{{y + 2}}} \right| = 2x + {C_1},\;\; y = 0,\;\; y = - 2.\]

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:

\[\left( {{x^2} + 4} \right)dy = 2xydx.\]

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

\[\frac{{dy}}{y} = \frac{{2xdx}}{{\left( {{x^2} + 4} \right)}}.\]

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:

\[\int {\frac{{dy}}{y}} = \int {\frac{{2xdx}}{{\left( {{x^2} + 4} \right)}}} + C,\;\; \Rightarrow \ln \left| y \right| = \int {\frac{{d\left( {{x^2}} \right)}}{{{x^2} + 4}}} + C.\]

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

\[\ln \left| y \right| = \int {\frac{{d\left( {{x^2} + 4} \right)}}{{{x^2} + 4}}} + C,\;\; \Rightarrow \ln \left| y \right| = \ln \left( {{x^2} + 4} \right) + C.\]

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

\[\ln \left| y \right| = \ln \left( {{x^2} + 4} \right) + \ln {C_1},\;\; \Rightarrow \ln \left| y \right| = \ln \left( {{C_1}\left( {{x^2} + 4} \right)} \right),\;\; \Rightarrow \left| y \right| = {C_1}\left( {{x^2} + 4} \right),\;\; \Rightarrow y = \pm {C_1}\left( {{x^2} + 4} \right).\]

Thus, the given differential equation has the following solutions:

\[y = \pm {C_1}\left( {{x^2} + 4} \right),\;\; y = 0,\;\; \text{where}\;\; {C_1} \gt 0.\]

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:

\[y = C\left( {{x^2} + 4} \right).\]

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

See more problems on Page 2.

Page 1 Page 2