# Using an Integrating Factor

Consider a differential equation of type

where \(P\left( {x,y} \right)\) and \(Q\left( {x,y} \right)\) are functions of two variables \(x\) and \(y\) continuous in a certain region \(D.\) If

the equation is not exact. However, we can try to find so-called integrating factor, which is a function \(\mu \left( {x,y} \right)\) such that the equation becomes exact after multiplication by this factor. If so, then the relationship

is valid. This condition can be written in the form:

The last expression is the partial differential equation of first order that defines the integrating factor \(\mu \left( {x,y} \right).\)

Unfortunately, there is no general method to find the integrating factor. However, one can mention some particular cases for which the partial differential equation can be solved and as a result we can construct the integrating factor.

## 1. Integrating Factor Depends on the Variable \(x:\) \(\mu = \mu \left( x \right).\)

In this case we have \(\frac{{\partial \mu }}{{\partial y}} = 0,\) so the equation for \(\mu \left( {x,y} \right)\) can be written in the form:

The right side of this equation must be a function of only \(x.\) We can find the function \(\mu \left( x \right)\) by integrating the last equation.

## 2. Integrating Factor Depends on the Variable \(y:\) \(\mu = \mu \left( y \right).\)

Similarly, if \(\frac{{\partial \mu }}{{\partial x}} = 0,\) we get the following ordinary differential equation for the integrating factor \(\mu:\)

where the right side depends only on \(y.\) The function \(\mu \left( y \right)\) can be found by integrating the given equation.

## 3. Integrating Factor Depends on a Certain Combination of the Variables \(x\) and \(y:\) \(\mu = \mu \left( {z\left( {x,y} \right)} \right).\)

The new function \({z\left( {x,y} \right)}\) can be, for example, of the following type:

and so on.

Here it is important that the integrating factor \(\mu \left( {x,y} \right)\) becomes a function of one variable \(z:\)

and can be found from the differential equation:

We assume that the right side of the equation depends only on \(z\) and the denominator is not zero.

Below we consider some particular examples of the equation

where we can determine the integrating factor. The general conditions of existence of the integrating factor are derived in the theory of Lie Group.

## Solved Problems

Click or tap a problem to see the solution.

### Example 1

Solve the equation \[\left( {1 + {y^2}} \right)dx + xydy = 0.\]

### Example 2

Solve the differential equation \[\left( {x - \cos y} \right)dx - \sin ydy = 0.\]

### Example 1.

Solve the equation \[\left( {1 + {y^2}} \right)dx + xydy = 0.\]

Solution.

First we test this differential equation for exactness:

As one can see, this equation is not exact. We try to find an integrating factor to convert the equation into exact. Calculate the function

One can notice that the expression

depends only on the variable \(x.\) Hence, the integrating factor will also depend only on \(x:\) \(\mu = \mu \left( x \right).\) We can get it from the equation

Separating variables and integrating, we obtain:

We choose \(\mu = x.\) Multiplying the original differential equation by \(\mu = x,\) produces the exact equation:

Indeed, now we have

Solve the resulting equation. The function \(u\left( {x,y} \right)\) can be found from the system of equations:

It follows from the first equation that

Substitute this in the second equation to determine \(\varphi \left( y \right):\)

It follows from here that \(\varphi \left( y \right) = C,\) where \(C\) is a constant.

Thus, the general solution of the original differential equation is given by

### Example 2.

Solve the differential equation \[\left( {x - \cos y} \right)dx - \sin ydy = 0.\]

Solution.

If we test this equation for exactness, we find that

Hence, this equation is not exact. We try to construct an integrating factor. Notice that

and the expression

is constant.

Hence, we can find the integrating factor as a function \(\mu \left( x \right)\) by solving the following equation:

We choose the function \(\mu = {e^{ - x}}\) and make sure that the equation becomes exact after multiplication by \(\mu = {e^{ - x}}:\)

Its general solution can be found from the system of equations:

Here it is more convenient to integrate the second equation with respect to \(y:\)

Substituting this in the first equation, we have

Integrating by parts gives:

Thus, the general solution of the equation is given by

where \(C\) is an arbitrary real number.