Differential Equations

First Order Equations

1st Order Diff Equations Logo

Homogeneous Equations

Solved Problems

Example 3.

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

Solution.

Here we deal with a homogeneous equation. In fact, we can rewrite it in the form:

\[y' = \frac{{{y^2}}}{{xy + {y^2}}} = \frac{{\frac{{{y^2}}}{{{x^2}}}}}{{\frac{{xy}}{{{x^2}}} + \frac{{{y^2}}}{{{x^2}}}}} = \frac{{{{\left( {\frac{y}{x}} \right)}^2}}}{{\frac{y}{x} + {{\left( {\frac{y}{x}} \right)}^2}}} = f\left( {\frac{y}{x}} \right).\]

Make the substitution \(y = ux.\) Then \(y' = u'x + u.\) Substituting \(y\) and \(y'\) into the original equation, we have

\[\left( {xux + {u^2}{x^2}} \right)\left( {u'x + u} \right) = {u^2}{x^2},\;\; \Rightarrow u{x^2}\left( {u + 1} \right)\left( {u'x + u} \right) = {u^2}{x^2}.\]

Divide both sides by \(u{x^2}.\) We notice that \(x = 0\) is not the solution of the equation. However, one can check that \(u = 0\) or \(y = 0\) is one of the solutions of the differential equation.

As a result, we have

\[\left( {u + 1} \right)\left( {u'x + u} \right) = u,\;\; \Rightarrow u'x\left( {u + 1} \right) + {u^2} + u = u,\;\; \Rightarrow u'x\left( {u + 1} \right) = - {u^2},\;\; \Rightarrow \left( {\frac{1}{u} + \frac{1}{{{u^2}}}} \right)du = - \frac{{dx}}{x}.\]

Integrating, we find the general solution:

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

Taking into account that \(u = \frac{y}{x},\) we can write the last expression in the form

\[\ln \left| {\frac{y}{x}} \right| - \frac{1}{{\frac{y}{x}}} = - \ln \left| x \right| + C,\;\; \Rightarrow \ln \left| y \right| - \cancel{\ln \left| x \right|} - \frac{x}{y} = - \cancel{\ln \left| x \right|} + C,\;\; \Rightarrow y\ln \left| y \right| = Cy + x.\]

The given expression can be represented as an explicit inverse function \(x\left( y \right):\)

\[x = y\ln \left| y \right| - Cy.\]

Since \(C\) is an arbitrary real number, we can replace the "minus" sign before the constant to the "plus" sign. Then

\[x = y\ln \left| y \right| + Cy.\]

Thus, the given differential equation has the solutions:

\[x = y\ln \left| y \right| + Cy,\;\; y = 0.\]

Example 4.

Solve the differential equation \[y' = \frac{y}{x} - \frac{x}{y}.\]

Solution.

As it follows from the right side of the equation, \(x \ne 0\) and \(y \ne 0.\) We can make the substitution \(y = ux,\) \(y' = u'x + u.\) This yields:

\[u'x + u = \frac{{u\cancel{x}}}{\cancel{x}} - \frac{\cancel{x}}{{u\cancel{x}}},\;\; \Rightarrow u'x + \cancel{u} = \cancel{u} - \frac{1}{u},\;\; \Rightarrow \frac{{du}}{{dx}}x = - \frac{1}{u},\;\; \Rightarrow udu = - \frac{{dx}}{x}.\]

Integrating this equation, we obtain:

\[\int {udu} = - \int {\frac{{dx}}{x}} ,\;\; \Rightarrow \frac{{{u^2}}}{2} = - \ln \left| x \right| + C,\;\; \Rightarrow {u^2} = 2C - 2\ln \left| x \right|. \]

Let the constant \(2C\) be denoted by just \(C.\) Hence,

\[{u^2} = C - 2\ln \left| x \right|\;\;\text{or}\;\; u = \pm \sqrt {C - 2\ln \left| x \right|} .\]

Thus, the general solution is written in the form

\[y = ux = \pm x\sqrt {C - 2\ln \left| x \right|} .\]

Example 5.

Find the general solution of the differential equation \[\left( {{x^3} + x{y^2}} \right)y' = {y^3}.\]

Solution.

It is easy to see that the given equation is homogeneous. Therefore, we can use the substitution \(y = ux,\) \(y' = u'x + u.\) As a result, the equation is converted into the separable differential equation:

\[\left( {{x^3} + x{{\left( {ux} \right)}^2}} \right)\left( {u'x + u} \right) = {\left( {ux} \right)^3},\;\; \Rightarrow \left( {{x^3} + {x^3}{u^2}} \right)\left( {u'x + u} \right) = {u^3}{x^3},\;\; \Rightarrow {x^3}\left( {1 + {u^2}} \right)\left( {u'x + u} \right) = {u^3}{x^3}.\]

Divide both sides by \({x^3}\). (Notice that \(x = 0\) is not the solution).

\[\left( {1 + {u^2}} \right)\left( {u'x + u} \right) = {u^3},\;\; \Rightarrow \left( {1 + {u^2}} \right)u'x + u + \cancel{u^3} = \cancel{u^3},\;\; \Rightarrow \left( {1 + {u^2}} \right)u'x = - u,\;\; \Rightarrow \frac{{\left( {1 + {u^2}} \right)du}}{u} = - \frac{{dx}}{x},\;\; \Rightarrow \left( {\frac{1}{u} + u} \right)du = - \frac{{dx}}{x}.\]

Now we can integrate the last equation:

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

Since \(u = {\frac{y}{x}},\) the solution can be written in the form:

\[\ln \left| {\frac{y}{x}} \right| + \frac{{{y^2}}}{{2{x^2}}} = - \ln \left| x \right| + C,\;\; \Rightarrow \ln \left| y \right| - \cancel{\ln \left| x \right|} + \frac{{{y^2}}}{{2{x^2}}} = - \cancel{\ln \left| x \right|} + C,\;\; \Rightarrow \ln \left| y \right| = C - \frac{{{y^2}}}{{2{x^2}}}.\]

It follows from here that

\[y = {e^{C - \frac{{{y^2}}}{{2{x^2}}}}} = {e^C}{e^{ - \frac{{{y^2}}}{{2{x^2}}}}}.\]

We can denote \({e^C} = {C_1}\) \(\left( {{C_1} \gt 0} \right).\) Then the solution in the implicit form is given by the equation

\[y = {C_1}{e^{ - \frac{{{y^2}}}{{2{x^2}}}}},\]

where the constant \({C_1} \gt 0.\)

Example 6.

Solve the equation \[y' = \frac{{2x + 1}}{{3y + x + 2}}.\]

Solution.

Here the numerator and denominator are the equations of intersecting straight lines. This differential equation can be converted into homogeneous after transformation of coordinates. Let the new and the old coordinates be connected by the relations

\[x = X + \alpha ,\; y = Y + \beta .\]

We determine the constants \(\alpha\) and \(\beta\) later. By substituting these relations into the equation, we get

\[y' = \frac{{dy}}{{dx}} = \frac{{d\left( {Y + \beta } \right)}}{{d\left( {X + \alpha } \right)}} = \frac{{dY}}{{dX}},\]

The differential equation in the new coordinates becomes

\[\frac{{dY}}{{dX}} = \frac{{2\left( {X + \alpha } \right) + 1}}{{3\left( {Y + \beta } \right) + X + \alpha + 2}} = \frac{{2X + 2\alpha + 1}}{{3Y + X + \alpha + 3\beta + 2}}.\]

This equation will be homogeneous if we choose the constants \(\alpha\) and \(\beta\) such that

\[\left\{ \begin{array}{l} 2\alpha + 1 = 0\\ \alpha + 3\beta + 2 = 0 \end{array} \right..\]

Solving the last system for \(\alpha\) and \(\beta,\) we find:

\[\left\{ \begin{array}{l} \alpha = - \frac{1}{2}\\ \beta = - \frac{1}{2} \end{array} \right..\]

At these values of \(\alpha\) and \(\beta\) the differential equation is written in the following way:

\[\frac{{dY}}{{dX}} = \frac{{2X}}{{3Y + X}}.\]

This equation is homogeneous, so we can make the replacement \(Y = uX,\) where \(u\) is a function of \(X.\) Hence, \(dY =\) \( Xdu + udX.\) As a result, we have

\[\frac{{Xdu + udX}}{{dX}} = \frac{{2X}}{{3Y + X}},\;\; \Rightarrow X\frac{{du}}{{dX}} + u = \frac{2}{{3u + 1}}.\]

We divided the numerator and denominator in the right side by \(X.\) One can check that \(X = 0\) or \(x = X + \alpha \) \(= - {\frac{1}{2}}\) is not the solution of the differential equation.

Some easy transformations give

\[X\frac{{du}}{{dX}} = \frac{2}{{3u + 1}} - u,\;\; \Rightarrow X\frac{{du}}{{dX}} = \frac{{2 - 3{u^2} - u}}{{3u + 1}}.\]

We can factor the quadratic function in the numerator of the right side into the product of monomials:

\[2 - 3{u^2} - u = 0,\;\; \Rightarrow D = 1 - 4 \cdot \left( { - 3} \right) \cdot 2 = 25,\;\; \Rightarrow {u_{1,2}} = \frac{{1 \pm \sqrt {25} }}{{ - 6}} = \frac{{1 \pm 5}}{{ - 6}} = - 1,\,\frac{2}{3}.\]

Hence,

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

Then

\[X\frac{{du}}{{dX}} = \frac{{\left( {u + 1} \right)\left( {2 - 3u} \right)}}{{3u + 1}}.\]

By separating the variables, we can write:

\[\frac{{3u + 1}}{{\left( {u + 1} \right)\left( {2 - 3u} \right)}}du = \frac{{dX}}{X}.\]

Integrate the given equation:

\[\int {\frac{{3u + 1}}{{\left( {u + 1} \right)\left( {2 - 3u} \right)}}du} = \int {\frac{{dX}}{X}} .\]

Now we should convert the integrand in the left side. We use the method of uncertain coefficients (partial fraction decomposition) to represent the integrand as the sum of proper rational fractions:

\[\frac{{3u + 1}}{{\left( {u + 1} \right)\left( {2 - 3u} \right)}} = \frac{A}{{u + 1}} + \frac{B}{{2 - 3u}},\;\; \Rightarrow 3u + 1 = A\left( {2 - 3u} \right) + B\left( {u + 1} \right),\;\; \Rightarrow 3u + 1 = 2A - 3Au + Bu + B,\;\; \Rightarrow 3u + 1 = \left( {B - 3A} \right)u + 2A + B.\]

Hence,

\[\left\{ \begin{array}{l} B - 3A = 3\\ 2A + B = 1 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} A = -\frac{2}{5}\\ B = \frac{9}{5} \end{array} \right..\]

As a result, the differential equation is written as follows:

\[-\frac{2}{5}\int {\frac{{du}}{{u + 1}}} + \frac{9}{5}\int {\frac{{du}}{{2 - 3u}}} = \int {\frac{{dX}}{X}} .\]

Upon integrating both sides, we get

\[-\frac{2}{5}\ln \left| {u + 1} \right| + \frac{9}{5} \cdot \left( { - \frac{1}{3}} \right)\ln \left| {2 - 3u} \right| = \ln \left| X \right| + \ln C,\]
\[\Rightarrow \;-\frac{2}{5}\ln \left| {u + 1} \right| - \frac{3}{5}\ln \left| {2 - 3u} \right| = \ln \left| X \right| + \ln C,\]

where the constant \(C\) is a positive real number.

Rewrite the solution in terms of the variables \(X\) and \(Y:\)

\[-\frac{2}{5}\ln \left| {\frac{Y}{X} + 1} \right| - \frac{3}{5}\ln \left| {2 - 3\frac{Y}{X}} \right| = \ln \left| X \right| + \ln C,\]
\[\Rightarrow -\frac{2}{5}\ln \left| {\frac{{Y + X}}{X}} \right| - \frac{3}{5}\ln \left| {\frac{{2X - 3Y}}{X}} \right| = \ln \left| X \right| + \ln C,\]
\[\Rightarrow -\frac{2}{5}\ln \left| {Y + X} \right| + \cancel{\frac{2}{5}\ln \left| X \right|} - \frac{3}{5}\ln \left| {2X - 3Y} \right| + \cancel{\frac{3}{5}\ln \left| X \right|} = \cancel{\ln \left| X \right|} + \ln C,\]
\[\Rightarrow 2\ln \left| {Y + X} \right| + 3\ln \left| {2X - 3Y} \right| = -5\ln C.\]

Further, it is convenient to denote \(-5\ln C = \ln {C_1},\) where \({C_1}\) is an arbitrary positive number. Then we can write the solution in the form:

\[2\ln\left| {Y + X} \right| + 3\ln \left| {2X - 3Y} \right| = \ln {C_1}.\]

Now we return to the initial variables \(x, y.\) As

\[X = x - \alpha = x + \frac{1}{2},\;\; Y = y - \beta = y + \frac{1}{2},\]

we obtain:

\[2\ln\left| {y + \frac{1}{2} + x + \frac{1}{2}} \right| + 3\ln \left| {2\left( {x + \frac{1}{2}} \right) - 3\left( {y + \frac{1}{2}} \right)} \right| = \ln {C_1},\]
\[\Rightarrow 2\ln\left| {x + y + 1} \right| + 3\ln \left| {2x - 3y - \frac{1}{2}} \right| = \ln {C_1},\]
\[\Rightarrow 2\ln\left| {x + y + 1} \right| + 3\ln \left| {\frac{{4x - 6y - 1}}{2}} \right| = \ln {C_1},\]
\[\Rightarrow 2\ln\left| {x + y + 1} \right| + 3\ln \left| {4x - 6y - 1} \right| - 3\ln 2 = \ln {C_1},\]
\[\Rightarrow \ln \left| {{{\left( {x + y + 1} \right)}^2} {{\left( {4x - 6y - 1} \right)}^3}} \right| = \ln {C_1} + 3\ln 2.\]

The right side can be written again in simpler form:

\[\ln {C_1} + 3\ln 2 = \ln {C_2}\;\; \left( {{C_2} \gt 0} \right).\]

Then the final general solution of the original differential equation in the implicit form is given by

\[{\left( {x + y + 1} \right)}^2 {\left( {4x - 6y - 1} \right)}^3 = \pm {C_2} = {C_3}.\]

where the constant \({C_3}\) is any nonzero number.

Example 7.

Find the general solution of the differential equation \[y' = \frac{{x - y + 3}}{{x - y}}.\]

Solution.

We can notice that the equations of the lines in the numerator and denominator correspond to the parallel straight lines. Therefore we make the following change of variables:

\[z = x - y,\;\; \Rightarrow y = x - z,\;\; y' = 1 - z'.\]

As a result, the differential equation becomes

\[1 - z' = \frac{{z + 3}}{z},\;\; \Rightarrow 1 - z' = 1 + \frac{3}{z},\;\; \Rightarrow z' = - \frac{3}{z}.\]

We get the simple separable equation. By solving it, we find the answer:

\[\frac{{dz}}{{dx}} = - \frac{3}{z},\;\; \Rightarrow zdz = - 3dx,\;\; \Rightarrow \int {zdz} = - 3\int {dx} ,\;\; \Rightarrow \frac{{{z^2}}}{2} = - 3x + C,\;\; \Rightarrow \left( {x - y} \right)^2 = 2C - 6x.\]

We can derive the explicit function \(y\left( x \right)\) from the last expression:

\[x - y = \pm \sqrt {2C - 6x} .\]

Thus,

\[y = x \pm \sqrt {C - 6x} .\]
Page 1 Page 2