Exact Differential Equations

A first-order differential equation is an exact equation if it can be written in the form:

\(M(x,y)dx + N(x,y)dy = 0\)

Where \(M(x,y) = \cfrac{\partial f}{\partial x}\) and \(N(x,y) = \cfrac{\partial f}{ \partial y}\) and the expression on the left hand side is in fact an exact differential. \(M(x,y)\) and \(N(x,y)\) and their first partial derivatives must be continueous on some region \(\Re\).

We can confirm the expression is an exact differential by checking:

\(\cfrac{\partial M}{\partial y} = \cfrac{\partial N}{\partial x} \)

\(\cfrac{\partial}{\partial y}\cfrac{\partial f}{\partial x} = \cfrac{\partial }{\partial x}\cfrac{\partial f}{\partial y} \)

Confirm the expression \( (y \cos x + 3x^2 e^y) + (\sin x + x^3 e^y)y^{'}\) is an exact differential.

Note that this equation is written in a slightly different form but we can rewrite it as follows:

\( (y \cos x + 3x^2 e^y) + (\sin x + x^3 e^y)y^{'}\)

\( (y \cos x + 3x^2 e^y) + (\sin x + x^3 e^y)\cfrac{dy}{dx}\)

\( (y \cos x + 3x^2 e^y)dx + (\sin x + x^3 e^y)dy\)

Next, we can identify \(M(x,y)\) and \(N(x,y)\):

\(M(x,y) = y \cos x + 3x^2 e^y\)

\(N(x,y) = \sin x + x^3 e^y\)

Then, we can check \(\cfrac{\partial M}{\partial y} = \cfrac{\partial N}{\partial x} \):

\(M_y = \cos x + 3x^2 e^y\)

\(N_x = \cos x + 3x^2 e^y\)

Since \(\cfrac{\partial M}{\partial y} = \cfrac{\partial N}{\partial x} \), the expression is an exact differential.


The steps to solve an exact equation DE are:

  1. Write the equation in the form \(M(x,y)dx + N(x,y)dy = 0\)
  2. Integrate \( M(x,y) = \frac{\partial f}{\partial x}\) with respect to \(x\). Remember there will be a term \(h(y)\)
  3. Take the derivative wrt \(y\) and set it equal to \( N(x,y) = \frac{\partial f}{\partial y}\)
  4. Solve for \(h(y)\) by integrating
  5. Obtain an explicit solution for \(y\) equal to a constant

Find the solution to the DE \( (3x^2-2xy+2)dx + (6y^2-x^2+3)dy = 0 \).

The equation is in the already in the form \( M(x,y)dx + N(x,y)dy = 0\). \(M(x,y) = 3x^2-2xy+2\). We integrate with respect to \(x\):

\(\int (3x^2-2xy+2)dx = x^3 -x^2y + 2x + h(y)\)

Now take the derivative with respect to \(y\) and set it equal to \(N(x,y)\):

\( \cfrac{\partial}{\partial y} (x^3 - x^2y + 2x + h(y)) = 0 - x^2 + 0 + h^{'}(y)= -x^2 + h^{'}(y) \)

\( -x^2 + h^{'}(y) = 6y^2-x^2+3 \)

We can solve for \(h^{'}(y) \) and then intagrate with respect to \(y\):

\(h^{'}(y) = 6y^2 + 3 \)

\(h(y) = \int (6y^2 + 3) dy \)

\(h(y) = 2y^3 + 3y \)

Substituting \(h(y)\) back into the first step yields:

\( x^3 -x^2y + 2x + 2y^3 + 3y = c\)

We can confirm the solution:

\(M(x,y) = \cfrac{\partial f}{\partial x} = \cfrac{\partial}{\partial x} (x^3 -x^2y + 2x + 2y^3 + 3y) = 3x^2 - 2xy + 2\)

\(N(x,y) = \cfrac{\partial f}{\partial y} = \cfrac{\partial}{\partial y} (x^3 -x^2y + 2x + 2y^3 + 3y) -x^2 + 6y^2 + 3\)


Review these lessons:
Try these questions:
Take the Quiz: