This question is probably very elementary but I don't know how to tackle the conversely part of the following result. Let $M(x,y)$ and $N(x,y)$ be two differentiable and **homogeneous functions of the same degree $d$ and such that $M(x,y)dx+N(x,y)dy$ is not exact** that is:
$$ \frac{\partial M}{\partial y}\neq\frac{\partial N}{\partial x} $$. Using Euler's identity on $M$ and $N$:

$$ xM_{x}(x,y)+yM_{y}(x,y)=d\cdot M(x,y)$$

$$ xN_{x}(x,y)+yN_{y}(x,y)=d\cdot N(x,y)$$

**Euler's identity comes from Euler's homogeneous function theorem which is appicable in this case since $M$ and $N$ are both homogeneous functions.**

I showed that the function

$$\mu(x,y)=\frac{1}{xM(x,y)+yN(x,y)}\tag1$$

will satisfy:

$$ \frac{\partial}{\partial y}\left(\,\mu\cdot M\right)=\frac{\partial}{\partial x}\left(\mu\cdot N\right).\tag2$$

My question: If we suppose that the PDE above is true,then how we can explain where the formula of $\mu(x,y)$ comes from?, that is:

$${If}\quad N(x,y)\mu_{x}-M(x,y)\mu_{y}=(N_{x}-M_{y})\mu,\quad \text{then where the formula} \quad\mu(x,y)=\frac{1}{xM(x,y)+yN(x,y)} \quad \text{comes from ?} $$

I tried to apply the method of characteristics but I don't see it. This result comes from an old edition of Boyce and Di prima.