To Solve: $\displaystyle y^2\frac{\partial z}{\partial x}-xy\frac{\partial z}{\partial y}=x(z-2y)$
My attempt:
Forming the subsidiary equations: $\displaystyle \frac{dx}{y^2}=\frac{dy}{-xy}=\frac{dz}{x(z-2y)}$
$\displaystyle \frac{dx}{y^2}=\frac{dy}{-xy}$
$\displaystyle xdx=-ydy$
$\displaystyle x^2+y^2=C_1$
The given answer is: $\displaystyle x^2+y^2=f(y^2-yz)$
How did we get the second part ?
From $$\frac{dx}{y^2}=\frac{dy}{-xy}=\frac{dz}{x(z-2y)}$$ We obtain: $$\frac{dx}{y^2}=\frac{dy}{-xy} \implies xdx+ydy=0 \implies d(x^2+y^2)=0......(1)$$
$$\frac{dy}{-xy}=\frac{dz}{x(z-2y)} \implies (z-2y)dy=-ydz \implies d(y^2-yz)=0......(2)$$
So the solutions to the original equation are:
$$x^2+y^2=f(y^2-yz)......(3)$$ or $$g(x^2+y^2)=y^2-yz......(4)$$
Because if we take $d$ operation on the first solution we have:
$$0=d(x^2+y^2)=f'(y^2-yz)d(y^2-yz)=0$$
Similarly:
$$0=g'(x^2+y^2) d(x^2+y^2)=d(y^2-yz)=0$$