Differential Equations

First Order Equations

1st Order Diff Equations Logo

Separable Equations

Solved Problems

Example 3.

Find all solutions of the differential equation \[y' = - x{e^y}.\]

Solution.

We transform this equation in following way:

\[\frac{{dy}}{{dx}} = - x{e^y},\;\; \Rightarrow \frac{{dy}}{{{e^y}}} = - xdx,\;\; \Rightarrow {e^{ - y}}dy = - xdx.\]

Obviously, that division by \({e^y}\) does not cause the loss of solutions as \({e^y} \gt 0.\) After integrating we have

\[\int {{e^{ - y}}dy} = \int {\left( { - x} \right)dx} + C,\;\; \Rightarrow - {e^{ - y}} = - \frac{{{x^2}}}{2} + C\;\; \Rightarrow \text{or}\;\; \kern0pt {e^{ - y}} = \frac{{{x^2}}}{2} + C.\]

This answer can be expressed in the explicit form:

\[- y = \ln \left( {\frac{{{x^2}}}{2} + C} \right)\;\; \text{or}\;\; y = - \ln \left( {\frac{{{x^2}}}{2} + C} \right).\]

We assume in the latter expression that \(C \gt 0\) in order to satisfy the domain of the logarithmic function.

Example 4.

Find a particular solution of the differential equation \[x\left( {y + 2} \right)y' = \ln x + 1\] provided \(y\left( 1 \right) = - 1.\)

Solution.

We divide both sides of the equation by \(x:\)

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

We suppose that \(x \ne 0,\) because the domain of the given equation is \(x \gt 0.\)

Integrating this equation yields:

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

The integral in the right side is calculated as follows:

\[\int {\frac{{\left( {\ln x + 1} \right)dx}}{x}} = \int {\left( {\ln x + 1} \right)d\left( {\ln x} \right)} = \int {\left( {\ln x + 1} \right)d\left( {\ln x + 1} \right)} = \frac{{{{\left( {\ln x + 1} \right)}^2}}}{2}.\]

Hence, the general solution in the implicit form is given by

\[\frac{1}{2}{y^2} + 2y = \frac{{{{\left( {\ln x + 1} \right)}^2}}}{2} + C,\;\; \Rightarrow {y^2} + 4y = {\left( {\ln x + 1} \right)^2} + {C_1},\]

where \({C_1} = 2C\) is an integration constant. Next, we find the values of \({C_1}\) to satisfy the initial condition \(y\left( 1 \right) = - 1:\)

\[\left( { - 1} \right)^2 + 4\left( { - 1} \right) = {\left( {\ln 1 + 1} \right)^2} + {C_1},\;\; \Rightarrow {C_1} = - 4.\]

Thus, the particular solution satisfying the initial condition is written in the following way:

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

Example 5.

Solve the differential equation \[y'{\cot ^2}x + \tan y = 0.\]

Solution.

We write this equation as follows:

\[\frac{{dy}}{{dx}}{\cot ^2}x = - \tan y,\;\; \Rightarrow {\cot ^2}xdy = - \tan ydx.\]

Divide both sides of the equation by \(\tan y\,{\cot ^2}x:\)

\[\frac{{\cancel{{\cot }^2}xdy}}{{\tan y\,\cancel{{\cot }^2}x}} = - \frac{{\cancel{\tan y} dx}}{{\cancel{\tan y}\,{{\cot }^2}x}},\;\; \Rightarrow \frac{{dy}}{{\tan y}} = - \frac{{dx}}{{{{\cot }^2}x}}.\]

Check for possible missed solutions when dividing. Consider \(\tan y = 0:\)

\[\tan y = 0,\;\;\Rightarrow y = \pi n,\; n \in Z,\;\; \Rightarrow dy = 0.\]

Substituting this into the initial equation, we see that \(y = \pi n, \,n \in Z\) is a solution.

The other factor \({\cot ^2}x\) means that

\[{\cot ^2}x = 0, \;\;\Rightarrow x = \pi n,\; n \in Z, \;\;\Rightarrow dx = 0,\]

which does not satisfy the initial differential equation.

Now we can integrate the given equation and find its general solution:

\[\int {\frac{{dy}}{{\tan y}}} = - \int {\frac{{dx}}{{{{\cot }^2}x}}} + C,\;\; \Rightarrow \int {\frac{{dy}}{{\frac{{\sin y}}{{\cos y}}}}} = - \int {\frac{{dx}}{{\frac{{{{\cos }^2}x}}{{{{\sin }^2}x}}}}} + C,\;\; \Rightarrow \int {\frac{{\cos ydy}}{{\sin y}}} = - \int {\frac{{{{\sin }^2}xdx}}{{{{\cos }^2}x}}} + C,\;\; \Rightarrow \int {\frac{{d\left( {\sin y} \right)}}{{\sin y}}} = - \int {\frac{{1 - {\cos^2}x}}{{{{\cos }^2}x}}dx} + C,\;\; \Rightarrow \ln \left| {\sin y} \right| = - \int {\left( {\frac{1}{{{{\cos }^2}x}} - 1} \right)dx} + C,\;\; \Rightarrow \ln \left| {\sin y} \right| = - \left( {\tan x - x} \right) + C,\;\; \Rightarrow \ln \left| {\sin y} \right| = - \tan x + x + C.\]

The final answer is given by

\[\ln \left| {\sin y} \right| + \tan x - x = C,\;\; y = \pi n,\;\; n \in Z.\]

Example 6.

Find a particular solution of the equation \[\left( {1 + {e^x}} \right)y' = {e^x}\] satisfying the initial condition \(y\left( 0 \right) = 0.\)

Solution.

We write this equation in the following way:

\[\left( {1 + {e^x}} \right)dy = {e^x}dx.\]

Divide both sides by \({1 + {e^x}}:\)

\[dy = \frac{{{e^x}}}{{1 + {e^x}}}dx.\]

Since \({1 + {e^x}} \gt 0,\) then we did not miss solutions of the original equation. Integrating this equation yields:

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

Determine the constant \(C\) from the initial condition \(y\left( 0 \right) = 0.\)

\[0 = \ln \left( {{e^0} + 1} \right) + C,\;\; \Rightarrow 0 = \ln 2 + C,\;\; \Rightarrow C = - \ln 2.\]

So the final answer is

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

Example 7.

Solve the equation

\[y\left( {1 + xy} \right)dx = x\left( {1 - xy} \right)dy.\]

Solution.

The product \(xy\) in each side does not allow separating the variables. Therefore, we make the replacement:

\[xy = t\;\;\text{or}\;\;y = \frac{t}{x}.\]

The relationship for differentials is given by

\[dy = \frac{{xdt - tdx}}{{{x^2}}}.\]

Substituting this into the equation, we can write:

\[\frac{t}{x}\left( {1 + t} \right)dx = x\left( {1 - t} \right)\frac{{xdt - tdx}}{{{x^2}}}.\]

By multiplying both sides by \(x\) and then canceling the corresponding fractions in the left and right side, we get

\[t\left( {1 + t} \right)dx = \left( {1 - t} \right)\left( {xdt - tdx} \right).\]

Take into account that \(x = 0\) is a solution of the equation, which can be verified by direct substitution.

Simplify the latter expression:

\[tdx + \cancel{{t^2}dx} = xdt - tdx - xtdt + \cancel{{t^2}dx},\;\; \Rightarrow 2tdt = x\left( {1 - t} \right)dt.\]

Now the variables \(x\) and \(t\) are separated:

\[\frac{{2dx}}{x} = \frac{{\left( {1 - t} \right)dt}}{t}\;\; \text{or}\;\;2\frac{{dx}}{x} = \left( {\frac{1}{t} - 1} \right)dt.\]

After integrating we have

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

By making the reverse substitution \(t = xy,\) we find the general solution of the equation:

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

The complete answer is written in the form:

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

Example 8.

Find the general solution of the differential equation

\[\left( {x + y + 1} \right)dx + \left( {4x + 4y + 10} \right)dy = 0.\]

Solution.

We make the following substitution:

\[ x + y = u,\;\; \Rightarrow y = u - x,\;\; \kern0pt dy = du - dx.\]

Substituting this in the equation gives

\[\left( {u + 1} \right)dx + \left( {4u + 10} \right)\left( {du - dx} \right) = 0.\]

Hence,

\[udx + dx + 4udu + 10du - 4udx - 10dx = 0,\]
\[ - 3udx - 9dx + 4udu + 10du = 0,\]
\[- 3\left( {u + 3} \right)dx + 2\left( {2u + 5} \right)du = 0,\]
\[\frac{{3dx}}{2} = \frac{{2u + 5}}{{u + 3}}du.\]

Integrate the last equation:

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

As \(u = x + y,\) the final answer in the implicit form is written in the following way:

\[\frac{3}{2}x = 2\left( {x + y} \right) - \ln \left| {x + y + 3} \right| + C\;\; \text{or}\;\;\frac{x}{2} + 2y - \ln \left| {x + y + 3} \right| + C = 0.\]
Page 1 Page 2