Integrating Factor for First Order ODE/Function of Product of Variables

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.


 * $g \left({z}\right) = \dfrac {\dfrac {\partial M} {\partial y} - \dfrac {\partial N} {\partial x}} {N y - M x}$

is a function of $z$, where $z = x y$.

Then:
 * $\mu \left({x y}\right) = \mu \left({z}\right) = e^{\int g \left({z}\right) \mathrm d z}$

is an integrating factor for $(1)$.

Proof for Function of x y
Suppose that $\mu$ is a function of $z = x y$.

Then:
 * $\dfrac {\partial z} {\partial x} = y$
 * $\dfrac {\partial z} {\partial y} = x$

Thus:
 * $\dfrac {\partial \mu} {\partial x} = \dfrac {\mathrm d \mu} {\mathrm d z} \dfrac {\partial z} {\partial x} = y \dfrac {\mathrm d \mu} {\mathrm d z}$
 * $\dfrac {\partial \mu} {\partial y} = \dfrac {\mathrm d \mu} {\mathrm d z} \dfrac {\partial z} {\partial y} = x \dfrac {\mathrm d \mu} {\mathrm d z}$

which, when substituting in $(3)$, leads us to:
 * $\dfrac 1 \mu \dfrac {\mathrm d \mu} {\mathrm d z} = \dfrac {P \left({x, y}\right)} {N y - M x} = g \left({z}\right)$

where $g \left({z}\right)$ is the function of $z$ that we posited.