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

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

be non-homogeneous and not exact.

Let $(1)$ be such that:
 * $\map g z = \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:
 * $\map \mu {x y} = \map \mu z = e^{\int \map g z \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 {\d \mu} {\d z} \dfrac {\partial z} {\partial x} = y \dfrac {\d \mu} {\d z}$
 * $\dfrac {\partial \mu} {\partial y} = \dfrac {\d \mu} {\d z} \dfrac {\partial z} {\partial y} = x \dfrac {\d \mu} {\d z}$

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

where $\map g z$ is the function of $z$ that we posited.