Checking if $y=\ln(xy)$ is a solution of $(xy-x)y''+xy'^2+yy'-2y'=0$ 
Check whether $y=\ln (xy)$ is an answer of the following differential equation or not
$$(xy-x)y''+xy'^2+yy'-2y'=0$$

First I tried to solve the equation,
$$x(yy''-y''+y'^2)+yy'-2y'=0$$
$$x((yy')'-y'')+(yy')-2y'=0$$
Since I have $-y''$ in the parenthesis , the substitution $z=yy'$ doesn't work here but if it was $-2y''$ instead, I could use the substitution $u=yy'-2y'$ but it is not the case.

My second try was taking derivative of the answer (i.e $y=\ln(xy)$ ) and plugging it in the D.E,
$$y'=\frac1x+\frac{y'}y\quad\Rightarrow y'(1-\frac1y)=\frac1x\quad\Rightarrow y'=\frac y{y-1}\times \frac1x$$
$$y''=\frac{-1}{x^2}+\frac{yy''-y'^2}{y^2}\quad\Rightarrow y''=\frac{y}{y-1}\times(\frac{-1}{x^2}-\frac{y^2}{y'^2})$$
But it is getting really ugly when I plug $y,y',y''$ in the original equation.
 A: Consider the implicit equation
$$F(x,y)=y-\log(x y)=0$$
So, using the implicit function theorem,
$$y'=\frac{y}{x (y-1)}\qquad \text{and} \qquad y''=-\frac{y ((y-2) y+2)}{x^2 (y-1)^3}$$
Just replace and simplify.
A: Here is an alternative
$$
\begin{align}
0&=(xy-x)\cdot\frac{d^{2}y}{dx^{2}}+x\cdot\left(\frac{dy}{dx}\right)^{2}+y\cdot\frac{dy}{dx}-2\cdot\frac{dy}{dx}\\
\\
&=\frac{d}{dx}\left[(xy-x)\cdot\frac{dy}{dx}-y\right]\\
\\
\\
C_{1}&=(xy-x)\cdot\frac{dy}{dx}-y\\
\\
&=xy\cdot\frac{dy}{dx}-\frac{d}{dx}(xy)
\end{align}
$$
In a particular case when $C_{1}=0$ we have the following:
$$
\begin{align}
\frac{dy}{dx}&=\frac{1}{xy}\cdot\frac{d}{dx}(xy)\\
\\
y&=\ln(xy)+C_{2}
\end{align}
$$
In a particular case when $C_{2}=0$ we get what is asked
A: We have $x y'=\frac y{y-1}$ and $(xy')' = - \frac{y'}{(y-1)^2}$
DE is $(xy-x)y''+xy'^2+yy'-2y'=0$
Rearranging LHS we get,
$(xy-x)y''+xy'^2+yy'-2y'$
$ = y (xy''+y') - (xy'' + y') - y' + xy'^2$
$ = (y-1) (xy')' - y'+ xy'^2$
$ = - \frac{y'}{y-1} - y' + xy'^2$
$ = y' (- \frac{1}{y-1} - 1 + xy') = 0$
A: Continuing my first approach:
$$(xy-x)y''+xy'^2+yy'-2y'=0$$
$$x(yy''+y'^2)-xy''+yy'-2y'=0$$
$$x(yy')'+(x)'(yy')-xy''-2y'=0$$
$$(xyy')'-xy''-y'-y'=0$$
$$(xyy')'-(xy')'-y'=0$$After integrating we get $$xyy'-xy'-y=C$$$$y'(xy-x)-y=C$$
From here it is similar to @Rezha Adrian Tanuharja's answer.
