Solving Exact Differential Equations Examples 1
Recall from the Exact Differential Equations page that a differential equation of the form $M(x, y) + N(x, y) \frac{dy}{dx} = 0$ is said to be exact if there exists a function $\psi (x, y)$ such that $\frac{\partial}{\partial x} \psi (x, y) = M(x, y)$ and $\frac{\partial}{\partial y} \psi (x, y) = N(x, y)$.
Furthermore, we noted that a differential is exact if and only if $\frac{\partial}{\partial y} M(x, y) = \frac{\partial}{\partial x} N(x, y)$ (and under some conditions on the continuity of $M$, $N$, $\frac{\partial M}{\partial y}$ and $\frac{\partial N}{\partial x}$.
We will now look at some more examples of solving exact differential equations.
Example 1
Show that the differential equation $\frac{dy}{dx} = - \frac{Ax + By}{Bx + Cy}$ for $A, B, C \in \mathbb{R}$ is exact and solve this differential equation.
We first rewrite this differential equation in the form $M(x, y) + N(x, y) \frac{dy}{dx} = 0$:
(1)We have that $M(x, y) = Ax + By$ and $N(x, y) = Bx + Cy$. The partial derivative of $M$ with respect to $y$ and the partial derivative of $N$ with respect to $x$ are:
(2)Indeed this differential equation is exact, and so there exists a function $\psi (x, y)$ such that:
(3)From the first equation, $\frac{\partial \psi}{\partial x} = Ax + By$, we integrate with respect to $x$ and get:
(4)We now partial differentiate with respect to $y$ and get:
(5)We are already given that $\frac{\partial \psi}{\partial y} = N(x, y) = Bx + Cy$. Therefore $h'(y) = Cy$ and so $h(y) = \int Cy \: dy = \frac{Cy^2}{2}$. Therefore the solution to our differential equation is:
(6)Example 2
Show that the differential equation $\frac{dy}{dt} = \frac{- \left ( ye^{xy} \cos 2x - 2e^{xy} \sin 2x + 2x \right )}{(xe^{xy} \cos 2x - 3)}$ is an exact and solve this differential equation.
We first rewrite this differential equation in the form $M(x, y) + N(x, y) \frac{dy}{dx} = 0$:
(7)Let $M(x, y) = ye^{xy} \cos 2x - 2e^{xy} \sin 2x + 2x$ and let $N(x, y) = xe^{xy} \cos 2x - 3$. The partial derivative of $M$ with respect to $y$ and the partial derivative of $N$ with respect to $x$ are:
(8)Therefore the given differential equation is indeed exact, and so there exists a function $\psi (x, y)$ such that:
(9)We now take the second equation and integrate with respect to $y$ (this is much simpler than integrating the first equation with respect to $x$). We have that:
(10)We now partial differentiate both sides with respect to $x$ to get that:
(11)We already note that $\frac{\partial \psi}{\partial x} = M(x, y) = ye^{xy} \cos 2x - 2e^{xy} \sin 2x + 2x$. By comparing this with above, we see that $h'(x) = 2x$, so $h(x) = x^2$, and so the solution to this differential equation is:
(12)