Existence of Integrating Factor

Theorem
Let the first order ordinary differential equation:
 * $(1): \quad M \left({x, y}\right) + N \left({x, y}\right) \dfrac {dy} {dx} = 0$

be such that $M$ and $N$ are real functions of two variables which are not homogeneous functions of the same degree.

Suppose also that:
 * $\dfrac {\partial M} {\partial y} \ne \dfrac {\partial N} {\partial x}$

i.e. $(1)$ is not exact.

Finally, suppose that $(1)$ has a general solution.

Then it is always possible to find an integrating factor $\mu \left({x, y}\right)$ such that:
 * $\mu \left({x, y}\right) \left({M \left({x, y}\right) + N \left({x, y}\right) \dfrac {dy} {dx}}\right) = 0$

is an exact differential equation.

Hence it is possible to find that solution by Solution to Exact Differential Equation.

Proof
Let us for ease of manipulation express $(1)$ in the form of differentials:
 * $(2): \quad M \left({x, y}\right) dx + N \left({x, y}\right) dy = 0$

Suppose that $(2)$ has a general solution:
 * $(3): \quad f \left({x, y}\right) = C$

where $C$ is some constant.

We can eliminate $C$ by differentiating:
 * $\dfrac {\partial f}{\partial x} dx + \dfrac {\partial f}{\partial y} dy = 0$

It follows from $(2)$ and $(3)$ that:
 * $\dfrac {dy}{dx} = - \dfrac M N = - \dfrac {\partial f / \partial x} {\partial f / \partial y}$

and so:
 * $(4): \quad \dfrac {\partial f / \partial x} M = \dfrac {\partial f / \partial y} N$

Let this common ratio in $(4)$ be denoted $\mu \left({x, y}\right)$.

Then:
 * $\dfrac {\partial f}{\partial x} = \mu M, \dfrac {\partial f}{\partial y} = \mu N$.

So, if we multiply $(2)$ by $\mu$, we get:
 * $\mu M dx + \mu N dy = 0$

or:
 * $\dfrac {\partial f}{\partial x} dx + \dfrac {\partial f}{\partial y} dy = 0$

which is exact.

So, if $(2)$ has a general solution, it has at least one integrating factor $\mu \left({x, y}\right)$.

Comment
If there is one integrating factor, there are in fact infinitely many.

Suppose $F \left({f}\right)$ is any function of $f$, then:
 * $\displaystyle \mu F \left({f}\right) \left({M \left({x, y}\right) dx + N \left({x, y}\right) dy}\right) = F \left({f}\right) df = d \left({\int F \left({f}\right) df}\right)$

so $\mu F \left({f}\right)$ is also an integrating factor.