Integrating Factor for First Order ODE/Preliminary Work

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

be non-homogeneous and not exact.

Let $\mu \left({x}\right)$ be an integrating factor for $(1)$.

Let:
 * $P \left({x, y}\right) := \dfrac {\partial M} {\partial y} - \dfrac {\partial N} {\partial x}$

Then:
 * $\dfrac 1 \mu = \dfrac {P \left({x, y}\right)} {N \dfrac {\partial \mu} {\partial x} - M \dfrac {\partial \mu} {\partial y}}$

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

Let $\mu$ be an integrating factor for $(2)$.

Then, by definition:
 * $\mu M \left({x, y}\right) \mathrm d x + \mu N \left({x, y}\right) \mathrm d y = 0$

is an exact differential equation.

By Solution to Exact Differential Equation:
 * $\dfrac {\partial \left({\mu M}\right)} {\partial y} = \dfrac {\partial \left({\mu N}\right)} {\partial x}$

Evaluating this, using the Product Rule:
 * $\mu \dfrac {\partial M} {\partial y} + M \dfrac {\partial \mu} {\partial y} = \mu \dfrac {\partial N} {\partial x} + N \dfrac {\partial \mu} {\partial x}$

which leads us to:
 * $\dfrac 1 \mu \left({N \dfrac {\partial \mu} {\partial x} - M \dfrac {\partial \mu} {\partial y}}\right) = \dfrac {\partial M} {\partial y} - \dfrac {\partial N} {\partial x}$

Let us use $P \left({x, y}\right)$ for $\dfrac {\partial M} {\partial y} - \dfrac {\partial N} {\partial x}$.

Then:
 * $(3): \quad \dfrac 1 \mu = \dfrac {P \left({x, y}\right)} {N \dfrac {\partial \mu} {\partial x} - M \dfrac {\partial \mu} {\partial y}}$