解法一:凑微分
(y²/(x-y)²-1/x)dx+(1/y-x²/(x-y)²)dy=0
(y²dx-x²dy)/(x-y)²+d(lny-lnx)=0
(dx/x²-dy/y²)/(1/y-1/x)²+dln(y/x)=0
d(1/y-1/x)/(1/y-1/x)²+din(y/x)=0
d(1/(1/x-1/y))+dln(y/x)=0
d(xy/(y-x)+ln(y/x))=0
两边积分得xy/(x-y)+ln(y/x)=C
解法二:求偏导,以下用δx,δy表示相应的偏导符号
(δy)(y^2/(x-y)^2-1/x)=2y/(x-y)²+2y²/(x-y)³=2xy/(x-y)³
(δx)(1/y-x²/(x-y)²)=-2x/(x-y)²+2x²(x-y)³=2xy/(x-y)³
两个偏导相等,故左边为一个全微分,方程为恰当微分方程.