Differential equation $ydx+(2x-ye^y)dy=0$ has an integrating factor $\mu(x,y)=x^my^n$ for constants $m$ and $n$. Determine $\mu(x,y)$.
I tried to solve using the formula $M\frac {\partial\mu}{\partial y}-N\frac {\partial\mu}{\partial x}=(\frac{\partial N}{\partial x}-\frac{\partial M}{\partial y})\mu$. But still I didn't managed to find the $\mu(x,y)$.
The answer says $\mu(x,y)=y$.
But I want to know the steps to find this. I can solve the differential equation with $\mu(x,y)=y$. So please help me for finding the integrating factor $\mu(x,y)$.