Exact Differential Equations

Exact Differential Equations

We will now look at another type of first order differential equation that we can solve known as exact differential equations which we define below.

 Definition: Let $M(x, y)$ and $N(x, y)$ be functions, and suppose we have a differential equation in the form $M(x, y) + N(x, y) \frac{dy}{dx} = 0$. This differential equation is said to be Exact if there exists a function $\psi (x, y)$ such that $\frac{\partial}{\partial x} \psi (x, y) = \psi_x = M(x, y)$ and $\frac{\partial}{\partial y} \psi (x, y) = \psi_y = N(x, y)$.

Now consider a differential equation of the following form where $M$ and $N$ are functions of $x$ and $y$:

(1)
\begin{align} \quad M(x, y) + N(x, y) \frac{dy}{dx} = 0 \end{align}

Suppose that there exists a function $\psi (x, y)$ such that:

(2)
\begin{align} \quad \frac{\partial}{\partial x} \psi (x, y) = M(x, y) \quad , \quad \frac{\partial}{\partial y} \psi (x, y) = N(x, y) \end{align}

Then this first order differential equation is an exact differential equation. Plugging these equalities into the differential equation gives us:

(3)
\begin{align} \quad \frac{\partial \psi}{\partial x} + \frac{\partial \psi}{\partial y} \frac{dy}{dx} = 0 \\ \end{align}

Now the chain rule for multivariable functions tells gives us a way to compress the formula for our differential equation above. Note that:

(4)
\begin{align} \quad \frac{d}{dx} (\psi (x, y)) = \frac{\partial \psi}{\partial x} \frac{dx}{dx} + \frac{\partial \psi}{\partial y} \frac{dy}{dx} \\ \quad \frac{d}{dx} (\psi (x, y)) = \frac{\partial \psi}{\partial x} + \frac{\partial \psi}{\partial y} \frac{dy}{dx} \end{align}

When we plug this into our differential equation from above - we see that:

(5)
\begin{align} \quad \frac{d}{dx} (\psi (x, y)) = 0 \\ \quad \psi (x, y) = \int 0 \: dx \\ \quad \psi (x, y) = C \end{align}

The above equation is the solution to our differential equation when the variable $y$ is isolated.

Now we want to know how we can immediately tell whether or not a differential equation is exact. We will not prove this result, but provided that the functions $M$, $N$, $\frac{\partial M}{\partial y}$ and $\frac{\partial N}{\partial x}$ are continuous in a region $R$, then a differential equation of the form $M(x, y) + N(x, y) \frac{dy}{dx} = 0$ is exact if and only if:

(6)
\begin{align} \quad \frac{\partial}{\partial y} M(x, y) = \frac{\partial}{\partial x} N(x, y) \end{align}

We will now look at an example of solving an exact differential equation.

Example 1

Solve the differential equation $(e^x \sin y - 2y \sin x) + (e^x \cos y + 2 \cos x) \frac{dy}{dt} = 0$.

We first need to check that the differential equation is indeed exact. Let $M(x, y) = e^x \sin y - 2y \sin x$ and let $N(x, y) = e^x \cos y + 2 \cos x$. The partial derivative of $M$ with respect to $y$ and the partial derivative of $N$ with respect to $x$ are respectively:

(7)
\begin{align} \quad \frac{\partial M}{\partial y} = e^x \cos y - 2 \sin x \end{align}
(8)
\begin{align} \quad \frac{\partial N}{\partial x} =e^x \cos y - 2 \sin x \end{align}

So indeed this differential equation is exact. Let $\psi (x, y)$ be the function such that:

(9)
\begin{align} \quad \frac{\partial}{\partial x} \psi (x, y) = M(x, y) \quad , \quad \frac{\partial}{\partial y} \psi (x, y) = N(x, y) \end{align}

From the first equation, we have that $\frac{\partial}{\partial x} \psi (x, y) = e^x \sin y - 2y \sin x$. If we integrate both sides with respect to $x$ then we have that:

(10)
\begin{align} \quad \int \frac{\partial}{\partial x} \psi (x, y) \: dx = \int \left ( e^x \sin y - 2y \sin x \right ) \: dx \\ \quad \psi (x, y) = e^x \sin y + 2y \cos x + h(y) \end{align}

Note that we do not have a constant of integration but instead a "function" of integration, $h(y)$. This is because if we were to partial differentiate both sides of the equation above with respect to $x$, then any function of $y$ would disappear.

We now take the equation above and partial differentiate it with respect to $y$ to get:

(11)
\begin{align} \quad \frac{\partial}{\partial y} \psi (x, y) = e^x \cos y + 2 \cos x + h'(y) \end{align}

We have two expressions for $\frac{\partial}{\partial y} \psi (x, y)$ - the one directly above, and $\frac{\partial}{\partial y} \psi (x, y) = N(x, y) = e^x \cos y + 2 \cos x$. In comparing these two, we see that $h'(y) = 0$. Therefore $h(y) = C$, and so therefore:

(12)
\begin{align} \quad \psi (x, y) = e^x \sin y + 2y \cos x + C \end{align}

Therefore the solution to our differential equation is of the form $\psi (x, y) = D$, where $D$ is an arbitrary constant. In absorbing the constant $C$ into $D$, we have that then:

(13)
\begin{align} \quad e^x \sin y + 2y \cos x = D \end{align}