\displaystyle \mu(y)=e^{\int P(y)} \Rightarrow P(y)=\dfrac{1}{M}\left(\dfrac{\partial N}{\partial x}-\dfrac{\partial M}{\partial y}\right)