# How can you derive this integrating factor?

Consider the differential equation $M(x,y)+N(x,y)\frac{dy}{dx}$. If an integrating factor takes the form $\mu=\mu(xy)$, show that the necessary condition is

$$\frac{N_x-M_y}{xM-yN}=F(xy)$$ I am not sure how to go about approaching this problem. Do I need to use relations between $\mu$ and the terms when it's only in terms of $x$ or $y$? Any help would be greatly appreciated. Thanks!

$$(\mu M)_y=(\mu N)_x$$
So $$\mu_y M+\mu M_y=\mu_x N+\mu N_x$$