Answer
$C=xy-\ln (x)$
Work Step by Step
We are given
$(xy-1)dx+x^2dy=0$ ___(1)
Here, $M(x,y)=xy-1$
$N(x,y)=x^2$
We have:
$\frac{M_y-N_x}{N}=-\frac{1}{x}$
The integrating factor is:
$I(x)=e^{\int f(x)dx}=e^{\int -\frac{1}{x}dx}=e^{-\ln x }=\frac{1}{x}$
Multiplying equation (1) by $I(x)=\frac{1}{x}$
$\frac{1}{x}((xy-1)dx+x^2dy)=0$
$\frac{xy-1}{x}dx+xdy=0$
Then:
$\frac{\partial \phi}{\partial x}=y-\frac{1}{x}$
Integrating both sides:
$\phi=xy-\ln x+f(y)$
We have:
$\frac{\partial phi}{\partial y}=x+f'(y)=x$
$\rightarrow f'(y)=0$
Since $f'(y)=0 \rightarrow f(y)=C$
C is a constant integration
The solution is:
$\phi (x,y)=xy-\ln x+C=0$
or
$C=xy-\ln (x)$