I am trying to solve the ODE $$y' = \frac{x+y-2}{y-x-4} \tag1 $$
This is a homogeneous special form ODE.
Let $x = u -1$ and $y=v+3$ in order to transform it to a homogeneous ODE. Hence,
$$ (1) \iff v'(u) = \frac{u+v(u)}{v-u} \tag 2$$
At last let $v(u) = z(u)u \iff v'(u) = z'(u)u+z(u)$ therefore,
$$ (2) \iff \frac{z'(u)}{z(u)+1} = \frac1u \tag 3$$
$(3)$ is a seperate variable ODE. Therefore we integrate both sides.
$$ \int \frac{z'(u)}{z(u)+1} \,du = \int \frac1u \,du $$
This integral seems to be easy to evaluate
$$ \int \frac{z'(u)}{z(u)+1} \, du $$
but I can't get my head around it. Any ideas?
Your integral is just: $$I=\int \dfrac {dz}{z+1}=\ln |z+1|+C$$
$$y' = \frac{x+y-2}{y-x-4}$$ Is easy to integrate: $$(y-x-4)dy-(x+y-2)dx=0$$ $$(y-4)dy-(x-2)dx-(xdy+ydx)=0$$ $$(y-4)dy-(x-2)dx-dxy=0$$ Integration gives us : $$\dfrac {y^2}2-4y-\dfrac {x^2}2+2x-xy=C$$