Back to the MA366 course wiki

Exact Equations


Before we begin, a quick note on notation. Within this section, subscripts of x and y mean "partial derivative with respect to x" and "partial derivative with respect to y" respectively. So

$ M_y(x,y) $

means the partial derivative of M(x,y) with respect to y.

Suppose, firstly, that your differential equation can be written this way:

$ M(x,y)+N(x,y)y' = 0\qquad \qquad (*) $

and secondly, that

$ \frac{\partial M}{\partial y}=\frac{\partial N}{\partial x} $

In this case1, your differential equation is said to be exact, and the solution to the differential equation is ψ(x,y) where

$ \psi_x(x,y)=M(x,y);\qquad \psi_y(x,y)=N(x,y) $



Example

Consider the differential equation

$ (e^xy+2xsiny)+(e^x+x^2cosy+1)y'=0 $

First, we must establish that this is an exact differential equation. In this case, we have:

$ M(x,y)=e^xy+2xsiny $
$ N(x,y)=e^x+x^2cosy+1 $

Find My and Nx. If the equation is exact, then these two expressions will be equal.

$ M_y=e^x+2xcosy=N_x $

As you can see, the two expressions are equal, so our differential equation is exact. This implies that there is a ψ(x,y) such that

$ \psi_x(x,y)=M(x,y)=e^xy+2xsiny $
$ \psi_y(x,y)=N(x,y)=e^x+x^2cosy+1 $

To find ψ(x,y), integrate the first equation with respect to x. We obtain:

$ \psi(x,y)=e^xy+x^2siny+h(y)\qquad \qquad (*) $

You may wonder what this function h(y) is. It's similar to the integration constant C that you're familiar with, except in this case, it is an arbitrary function of y. If we differentiate (*) with respect to x, then we most certainly get the function we just integrated, because h(y) disappears--h(y) is a function of only y, and so partial differentiation with respect to x just eliminates it. Therefore, we put h(y) into the result to acknowledge that any function of just y would not have been present in ψx.

Now, we said just a moment ago that ψy=N(x,y). Let's differentiate (*) with respect to y, and set it equal to N(x,y). Putting the derivative of (*) on the left side of the equation, and N(x,y) on the right, we obtain:

$ \begin{align} e^x+x^2cosy+h'(y)&=e^x+x^2cosy+1\\ h'(y)&=1\\ \int h'(y)&=\int 1\\ h(y)&=y\qquad \qquad (**) \end{align} $

Note that the integration constant C can be ignored at this step. Now, let's take (**) and substitute it back into (*) to obtain:

$ \psi(x,y)=e^xy+x^2siny+y $

To finish the problem, simply let ψ equal an arbitrary constant C (this is what justifies ignoring the arbitrary constant in the previous step).

$ e^xy+x^2siny+y=C $

This relation implicitly gives the solution to the differential equation. We're done!

1There is another condition required for this technique to work that I did not want to mention initially for continuity reasons. The functions M, N, ∂M/∂y and ∂N/∂x must be continuous in a simply connected region R of the xy plane, and it must be true for every point in R that ∂M/∂y=∂N/∂x. By "simply connected", I simply mean that there are no holes in the region. Now, you should know this requirement, but most likely your professor will not try to trick you into using the technique mentioned on this page by giving you a problem in which R is not simply connected. So just take notice of this requirement and shelve it somewhere in your mind.

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood