The equation \[\begin{equation*} -y\,dx+x\,dy=0 \end{equation*}\]
is not an exact differential equation because \[\begin{equation*} \frac{\partial }{\partial y}(-y)=-1\qquad \hbox{and}\qquad \frac{\partial }{ \partial x}(x)=1 \end{equation*}\]
are not equal. The differential equation, however, can be converted into an exact differential equation by multiplying by \(\dfrac{1}{x^{2}}\). Then \[\begin{equation*} -\frac{y}{x^{2}}\,dx+\frac{1}{x}\,dy=0 \end{equation*}\]
is an exact differential equation because \[ \frac{\partial }{\partial y}\left( -\frac{y}{x^{2}}\right) =-\dfrac{1}{x^{2}}\qquad \hbox{and}\qquad \frac{\partial }{\partial x}\left( \frac{1}{x}\right) =-\frac{1}{x^{2}} \]