Exact Differential Equations
Solved Problems
Example 3.
Solve the differential equation \[{e^y}dx + \left( {2y + x{e^y}} \right)dy = 0.\]
Solution.
First we check this equation for exactness:
\[\frac{{\partial Q}}{{\partial x}} = \frac{\partial }{{\partial x}}\left( {2y + x{e^y}} \right) = {e^y},\;\; \frac{{\partial P}}{{\partial y}} = \frac{\partial }{{\partial y}}\left( {{e^y}} \right) = {e^y}.\]
We see that \(\frac{{\partial Q}}{{\partial x}} = \frac{{\partial P}}{{\partial y}},\) so that this equation is exact. Find the function \(u\left( {x,y} \right)\) from the system of equations:
\[\left\{ \begin{array}{l}
\frac{{\partial u}}{{\partial x}} = {e^y}\\
\frac{{\partial u}}{{\partial y}} = 2y + x{e^y}
\end{array} \right..\]
Hence,
\[u\left( {x,y} \right) = \int {P\left( {x,y} \right)dx} = \int {{e^y}dx} = x{e^y} + \varphi \left( y \right).\]
Now, by differentiating this expression with respect to \(y\) and equating it to \(\frac{{\partial u}}{{\partial y}},\) we find the derivative \(\varphi'\left( y \right):\)
\[\frac{{\partial u}}{{\partial y}} = \frac{\partial }{{\partial y}}\left[ {x{e^y} + \varphi \left( y \right)} \right] = 2y + x{e^y},\;\; \Rightarrow \cancel{x{e^y}} + \varphi'\left( y \right) = 2y + \cancel{x{e^y}},\;\; \Rightarrow \varphi'\left( y \right) = 2y.\]
As a result, we find \({\varphi \left( y \right)}\) and the entire function \(u\left( {x,y} \right):\)
\[\varphi \left( y \right) = \int {2ydy} = {y^2},\;\; \Rightarrow u\left( {x,y} \right) = x{e^y} + \varphi \left( y \right) = x{e^y} + {y^2}.\]
Thus, the general solution of the differential equation is
\[x{e^y} + {y^2} = C.\]
Example 4.
Solve the equation
\[\left( {2xy - \sin x} \right)dx + \left( {{x^2} - \cos y} \right)dy = 0.\]
Solution.
This differential equation is exact because
\[\frac{{\partial Q}}{{\partial x}} = \frac{\partial }{{\partial x}}\left( {{x^2} - \cos y} \right) = 2x = \frac{{\partial P}}{{\partial y}} = \frac{\partial }{{\partial y}}\left( {2xy - \sin x} \right) = 2x.\]
We find the function \(u\left( {x,y} \right)\) from the system of two equations:
\[\left\{ \begin{array}{l}
\frac{{\partial u}}{{\partial x}} = 2xy - \sin x\\
\frac{{\partial u}}{{\partial y}} = {x^2} - \cos y
\end{array} \right..\]
By integrating the 1st equation with respect to the variable \(x,\) we have
\[u\left( {x,y} \right) = \int {\left( {2xy - \sin x} \right)dx} = {x^2}y + \cos x + \varphi \left( y \right).\]
Plugging in the \(2\)nd equation, we obtain
\[\frac{{\partial u}}{{\partial y}} = \frac{\partial }{{\partial y}}\left[ {{x^2}y + \cos x + \varphi \left( y \right)} \right] = {x^2} - \cos y,\;\; \Rightarrow \cancel{x^2} + \varphi'\left( y \right) = \cancel{x^2} - \cos y,\;\; \Rightarrow \varphi'\left( y \right) = - \cos y.\]
Hence,
\[\varphi \left( y \right) = \int {\left( { - \cos y} \right)dy} = - \sin y.\]
Thus, the function \(u\left( {x,y} \right)\) is
\[u\left( {x,y} \right) = {x^2}y + \cos x - \sin y,\]
so that the general solution of the differential equation is given by the implicit formula:
\[{x^2}y + \cos x - \sin y = C.\]
Example 5.
Solve the equation
\[\left( {1 + 2x\sqrt {{x^2} - {y^2}} } \right)dx - 2y\sqrt {{x^2} - {y^2}} dy = 0.\]
Solution.
First of all we determine whether this equation is exact:
\[\frac{{\partial Q}}{{\partial x}} = \frac{\partial }{{\partial x}}\left( { - 2y\sqrt {{x^2} - {y^2}} } \right) = - 2y \cdot \frac{{2x}}{{2\sqrt {{x^2} - {y^2}} }} = - \frac{{2xy}}{{\sqrt {{x^2} - {y^2}} }},\]
\[\frac{{\partial P}}{{\partial y}} = \frac{\partial }{{\partial y}}\left( {1 + 2x\sqrt {{x^2} - {y^2}} } \right) = 2x \cdot \frac{{\left( { - 2y} \right)}}{{2\sqrt {{x^2} - {y^2}} }} = - \frac{{2xy}}{{\sqrt {{x^2} - {y^2}} }}.\]
As you can see, \(\frac{{\partial Q}}{{\partial x}} = \frac{{\partial P}}{{\partial y}}.\) Hence, this equation is exact. Find the function \(u\left( {x,y} \right),\) satisfying the system of equations:
\[\left\{ \begin{array}{l}
\frac{{\partial u}}{{\partial x}} = 1 + 2x\sqrt {{x^2} - {y^2}} \\
\frac{{\partial u}}{{\partial y}} = - 2y\sqrt {{x^2} - {y^2}}
\end{array} \right..\]
Integrating the first equation gives:
\[u\left( {x,y} \right) = \int {\left( {1 + 2x\sqrt {{x^2} - {y^2}} } \right)dx} = x + \frac{{{{\left( {{x^2} - {y^2}} \right)}^{\frac{3}{2}}}}}{{\frac{3}{2}}} + \varphi \left( y \right) = x + \frac{2}{3}{\left( {{x^2} - {y^2}} \right)^{\frac{3}{2}}} + \varphi \left( y \right),\]
where \(\varphi \left( y \right)\) is a certain unknown function of \(y\) that will be defined later.
We substitute the result into the second equation of the system:
\[\frac{{\partial u}}{{\partial y}} = \frac{\partial }{{\partial y}}\Big[ {x + \frac{2}{3}{{\left( {{x^2} - {y^2}} \right)}^{\frac{3}{2}}} + \varphi \left( y \right)} \Big] = - 2y\sqrt {{x^2} - {y^2}} ,\;\; \Rightarrow - \cancel{2y\sqrt {{x^2} - {y^2}}} + \varphi'\left( y \right) = - \cancel{2y\sqrt {{x^2} - {y^2}}} ,\;\; \Rightarrow \varphi'\left( y \right) = 0.\]
By integrating the last expression, we find the function \(\varphi \left( y \right):\)
\[\varphi \left( y \right) = C,\]
where \(C\) is a constant.
Thus, the general solution of the given differential equation has the form:
\[x + \frac{2}{3}{\left( {{x^2} - {y^2}} \right)^{\frac{3}{2}}} + C = 0.\]
Example 6.
Solve the differential equation \[\frac{1}{{{y^2}}} - \frac{2}{x} = \frac{{2xy'}}{{{y^3}}}\] with the initial condition \(y\left( 1 \right) = 1.\)
Solution.
Check the equation for exactness by converting it into standard form:
\[\frac{1}{{{y^2}}} - \frac{2}{x} = \frac{{2x}}{{{y^3}}}\frac{{dy}}{{dx}},\;\; \Rightarrow \left( {\frac{1}{{{y^2}}} - \frac{2}{x}} \right)dx = \frac{{2x}}{{{y^3}}}dy,\;\; \Rightarrow \left( {\frac{1}{{{y^2}}} - \frac{2}{x}} \right)dx - \frac{{2x}}{{{y^3}}}dy = 0.\]
The partial derivatives are
\[\frac{{\partial Q}}{{\partial x}} = \frac{\partial }{{\partial x}}\left( { - \frac{{2x}}{{{y^3}}}} \right) = - \frac{2}{{{y^3}}},\;\;\; \frac{{\partial P}}{{\partial y}} = \frac{\partial }{{\partial y}}\left( {\frac{1}{{{y^2}}} - \frac{2}{x}} \right) = - \frac{2}{{{y^3}}}.\]
Hence, the given equation is exact. Therefore, we can write the following system of equations to determine the function \(u\left( {x,y} \right):\)
\[\left\{ \begin{array}{l}
\frac{{\partial u}}{{\partial x}} = \frac{1}{{{y^2}}} - \frac{2}{x}\\
\frac{{\partial u}}{{\partial y}} = - \frac{{2x}}{{{y^3}}}
\end{array} \right..\]
In the given case, it is more convenient to integrate the second equation with respect to the variable \(y:\)
\[u\left( {x,y} \right) = \int {\left( { - \frac{{2x}}{{{y^3}}}} \right)dy} = \frac{x}{{{y^2}}} + \psi \left( x \right).\]
Now we differentiate this expression with respect to the variable \(x:\)
\[\frac{{\partial u}}{{\partial x}} = \frac{\partial }{{\partial x}}\left[ {\frac{x}{{{y^2}}} + \psi \left( x \right)} \right] = \frac{1}{{{y^2}}} - \frac{2}{x},\;\; \Rightarrow \cancel{\frac{1}{{{y^2}}}} + \psi'\left( x \right) = \cancel{\frac{1}{{{y^2}}}} - \frac{2}{x},\;\; \Rightarrow \psi'\left( x \right) = - \frac{2}{x},\;\; \Rightarrow \psi \left( x \right) = - 2\ln \left| x \right| = \ln \frac{1}{{{x^2}}}.\]
Thus, the general solution of the differential equation in implicit form is given by the expression:
\[\frac{x}{{{y^2}}} + \ln \frac{1}{{{x^2}}} = C.\]
The particular solution can be found using the initial condition \(y\left( 1 \right) = 1.\) By substituting the initial values, we find the constant \(C:\)
\[\frac{1}{{{1^2}}} + \ln \frac{1}{{{1^2}}} = C,\;\; \Rightarrow 1 + 0 = C,\;\; \Rightarrow C = 1.\]
Hence, the solution of the given initial value problem is
\[\frac{1}{{{y^2}}} + \ln \frac{1}{{{x^2}}} = 1.\]