Converting an Equation into Exact Form

Any first order differential equation can be solved if it is in exact form. Here are listed three ways to approach getting an equation into exact form.

The Essentials

To get an equation into exact form, an integrating factor can be multiplied on both sides. It may not always be possible to find what this integrating factor is, but making certain assumptions we can test different possible integrating factors. The first two types of integrating factors are when they are a function of just x or just y. The process is similar for the two, so here just the function of x will be shown.

If mu is a function of just x (\( \mu = \mu(x) \)):

After multiplying both sides by the still unknown mu, the test for exactness should work:

\[ \frac{\partial (\mu(x)M)}{\partial y} = \frac{\partial (\mu(x)N)}{\partial x} \] \[ \mu \frac{\partial M}{\partial y} = \mu \frac{\partial N}{\partial x} + \frac{d\mu}{dx} N \] \[ \mu M_y = \mu N_x + \frac{d\mu}{dx} N \] \[ \frac{\mu (M_y - N_x)}{N} = \frac{d\mu}{dx} \]

This is a linear and separable differential equation that can be solved for μ. After μ is found, it can be plugged in and the equation will be in exact form.

If mu is a function of x and y (\( \mu = x^\alpha y^\beta \)):

If an integrating factor can’t be found that is a function of just x or just y, then an integrating factor that is a function of both x and y can be tried. In this case, the integrating factor will only be easy to find if it fits in this form:

\[ \mu = x^\alpha y^\beta \]

If this method is tried and no integrating factor is found, it might be very difficult to find an integrating factor. Here the integrating factor is multiplied in and the partials are set equal to each other, just like the previous method:

\[ \frac{\partial (\mu M)}{\partial y} = \frac{\partial (\mu N)}{\partial x} \] \[ M \frac{\partial \mu}{\partial y} + \mu \frac{\partial M}{\partial y} = \mu \frac{\partial N}{\partial x} + N \frac{\partial \mu}{\partial x} \]

From here, it might be necessary to set up a system of two equations.

Example

Solve this differential equation by putting it in exact form using an integrating factor \( \mu = \mu(y) \):

\[ y^2 + xy + (3xy + x^2) \frac{dy}{dx} = 0 \]

First, we test for exactness:

\[ M_y \stackrel{?}{=} N_x \] \[ 2y + x \not= 3y + 2x \] \[ M_y \not= N_x \]

The equation isn’t exact, so we will introduce the integrating factor which we will assume is a function of just y to the equation:

\[ \mu(y)M + \mu(y)N \frac{dy}{dx} = 0 \]

Now, we find what μ is:

\[ \mu \frac{\partial N}{\partial x} = \mu \frac{\partial M}{\partial y} + \frac{d\mu}{dy} M \] \[ \mu(3y + 2x) = \mu(2y + x) + \frac{d\mu}{dy} M \] \[ \frac{\mu(3y + 2x - 2y - x)}{M} = \frac{d\mu}{dy} \] \[ \frac{\mu(x + y)}{y^2 + xy} = \frac{d\mu}{dy} \] \[ \frac{\mu}{y} = \frac{d\mu}{dy} \] \[ \int \frac{1}{y} dy = \int \frac{1}{\mu} d\mu \] \[ \ln(y) + C = \ln(\mu) \] \[ \mu = Cy \]

Next we choose that the constant in our integrating factor is 1 and plug it back into the original equation:

\[ \mu(y)M + \mu(y)N \frac{dy}{dx} = 0 \] \[ y(y^2 + xy) + y(3xy + x^2) \frac{dy}{dx} = 0 \] \[ y^3 + xy^2 + (3xy^2 + x^2y) \frac{dy}{dx} = 0 \]

Now the equation is in exact form with the potential function:

\[ \phi = xy^3 + \frac{1}{2} x^2y^2 + C \]

And the implicit solution:

\[ xy^3 + \frac{1}{2} x^2y^2 = C \]

Example 2:

Solve the differential equation using an integrating factor \( \mu = x^\alpha y^\beta \):

\[ 5xy^3 + 4y + (x^2y^2 - x) \frac{dy}{dx} \]

First, we test for exactness:

\[ M_y \stackrel{?}{=} N_x \] \[ 15xy^2 + 4 \neq 2xy^2 - 1 \] \[ M_y \neq N_x \]

The equation isn’t exact, so we will introduce the integrating factor which we will assume is a function of just y to the equation:

\[ x^\alpha y^\beta M + x^\alpha y^\beta N \frac{dy}{dx} = 0 \]

Now, we find what μ is:

\[ \mu \frac{\partial N}{\partial x} + \frac{\partial \mu}{\partial x} N = \mu \frac{\partial M}{\partial y} + \frac{\partial \mu}{\partial y} M \] \[ x^\alpha y^\beta (2xy^2 - 1) + (\alpha x^{\alpha-1} y^\beta)(x^2y^2 - x) = x^\alpha y^\beta (15xy^2 + 4) + (\beta x^\alpha y^{\beta-1})(5xy^3 + 4y) \] \[ 2x^{\alpha+1} y^\beta + 2 - x^\alpha y^\beta + \alpha x^{\alpha+1} y^{\beta+2} - \alpha x^\alpha y^\beta = 15x^{\alpha+1} y^\beta + 4x^\alpha y^\beta + 5\beta x^{\alpha+1} y^{\beta+2} + 4\beta x^\alpha y^\beta \]

Here, note that there are two types of terms: Those with \( \textcolor[rgb]{1,0,0}{ x^α y^β }\) and those with \( \textcolor[rgb]{0,0,1}{ x^{α+1} y^{β+2} } \). If we group the expressions based on this we get:

\[ 2 \textcolor[rgb]{0,0,1}{ x^{\alpha+1} y^{\beta + 2} } - \textcolor[rgb]{1,0,0}{ x^\alpha y^\beta } + \alpha \textcolor[rgb]{0,0,1}{ x^{\alpha+1} y^{\beta + 2} } - \alpha \textcolor[rgb]{1,0,0}{ x^\alpha y^\beta } = 15 \textcolor[rgb]{0,0,1}{ x^{\alpha+1} y^{\beta + 2} } + 4 \textcolor[rgb]{1,0,0}{ x^\alpha y^\beta } + 5 \beta \textcolor[rgb]{0,0,1}{ x^{\alpha+1} y^{\beta + 2} } + 4 \beta \textcolor[rgb]{1,0,0}{ x^\alpha y^\beta } \]

We can set up a system of two equations by making an equation for the \( \textcolor[rgb]{1,0,0}{ x^α y^β }\) terms and the \( \textcolor[rgb]{0,0,1}{ x^{α+1} y^{β+2} } \) terms:

\[ \left\{ \begin{array}{l} \textcolor[rgb]{1,0,0}{-1 - \alpha = 4 + 4\beta } \\ \textcolor[rgb]{0,0,1}{2 + \alpha = 15 + 5\beta } \end{array} \right. \] \[ \left\{ \begin{array}{l} \alpha = 3 \\ \beta = -2 \end{array} \right. \] \[ \mu = x^3y^{-2} \]

Then we can multiply though our origial equation with our μ:

\[ \mu(5xy^3 + 4y) + \mu(x^2y^2 - x) \frac{dy}{dx} \] \[ 5x^4y + 4x^3y^{-1} + (x^5 - x^4y^{-2}) \frac{dy}{dx} \]

Which is in exact form, so we can find the potential function:

\[ \phi(x, y) = \int M \, dx = x^5y + x^4y^{-1} + h(y) \]

Where \( h(y) = C \), so:

\[ \phi(x, y) = x^5y + x^4y^{-1} + C \] \[ x^5y + x^4y^{-1} = C \]

Practice

For the following, verify that they aren’t in exact form, find an integrating factor (which could be a function of just \( x \), just \( y \), or \( x^\alpha y^\beta \) ), and solve the equations.

  1. \[ \frac{6y^2}{x} + 4y^3 + \left(4y + 3xy^2 + x^{-3}\right) \frac{dy}{dx} = 0 \]
  2. \[ 1 + (x \cot(y) - 1) \frac{dy}{dx} = 0 \]
  3. \[ 3y + \frac{6y^2}{x} + \left(\frac{5}{2}x + \frac{21}{2}y\right) \frac{dy}{dx} = 0 \]

Solution:

  1. Integrating factor: \( \mu = x^3 \), solution: \( 2x^3y^2 + x^4y^3 + y = C \)
  2. Integrating factor: \( \mu = \sin(y) \), solution: \( x \sin(y) - \cos(y) = C \)
  3. Integrating factor: \( \mu = x^2 y^{3/2} \), solution: \( x^3 y^{5/2} + 3x^2 y^{7/2} = C \)