[SOLVED] First order homogeneous ODE

Another one from G.F.Simmons' "Differential Equations": Chapter 2 Miscellaneous Exercises no. 20:

$\displaystyle \left({y^2 - 3 x y - 2 x^2}\right) dx = \left({x^2 - xy}\right) dy$

This can be put in the format:

$\displaystyle \frac {dy} {dx} = \frac {y^2 - 3 x y - 2 x^2} {x^2 - xy} = \frac {\left({\frac y x}\right)^2 - 3\left({\frac y x}\right) - 2} {1 - \left({\frac y x}\right)}$

Substituting $\displaystyle z = \frac y x$, from which $\displaystyle x \frac {dz}{dx} + z = \frac {dy} {dx}$

which leads to:

$\displaystyle x \frac {dz}{dx} = \frac {z^2 - 3 z - 2} {1 - z} - z = \frac {z^2 - 3 z - 2} {1 - z} - \frac {z - z^2} {1 - z} = \frac {2 z^2 - 4 z - 2} {1 - z}$

This leads to the messy:

$\displaystyle \int \frac {1 - z} {2 z^2 - 4 z - 2} dz = \int \frac {dx} x$

Flogging through the calculus and after tidying up:

$\displaystyle \sqrt 2 \ln \left({\frac {z + 1 - \sqrt 2} {z + 1 + \sqrt 2}}\right) = \ln \left({2 z^2 - 4 z - 2}\right) = 4 \ln x$

which is miles away from the given answer:

$\displaystyle x^2 y^2 - 2 x^3 y - x^4 = C$

(although that $\displaystyle x^4$ looks promising)

If I try solving it by doing:

$\displaystyle \frac {dx} {dy} = \frac {x^2 - xy} {y^2 - 3 x y - 2 x^2}$

and dividing T&B by $\displaystyle x^2$ and substuting $\displaystyle z = \frac x y$ it's even worse.

I must be doing something fundamentally wrong in the first few lines but for the life of me I can't work out what.