Example Find an integrating factor.

$\displaystyle (x - y^{2})dx + 2xydy = 0$

Answer $M_{y} = -2y, \ N_{x} = 2y$ implies that the given equation is not exact. So, we find an integrating factor. $M_{y} - N_{x} = - 4y$ a function of $y$. Then calculate $(1/N)[M_{y} - N_{x}]$

$\displaystyle \frac{1}{N}(M_{y} - N_{x}) = \frac{-4y}{2xy} = \frac{-2}{x} $

This is a function $x$ only. Thus, an integrating factor is given by

$\displaystyle \mu = \exp(- \int \frac{2}{x} dx) = \exp(-2 \log{x}) = \frac{1}{x^{2}} $