##### 4.12.22 $$x (2-x y(x)) y'(x)-x (x y(x)+1) y(x)^2+2 y(x)=0$$

ODE
$x (2-x y(x)) y'(x)-x (x y(x)+1) y(x)^2+2 y(x)=0$ ODE Classiﬁcation

[[_homogeneous, class G], _rational, [_Abel, 2nd type, class C]]

Book solution method
Change of Variable, new dependent variable

Mathematica
cpu = 0.333676 (sec), leaf count = 81

$\left \{\left \{y(x)\to \frac {2}{x+\sqrt {-\frac {1}{x^3}} x^2 \sqrt {-x (-4 \log (x)+1+4 c_1)}}\right \},\left \{y(x)\to \frac {2}{x+\left (-\frac {1}{x^3}\right )^{3/2} x^5 \sqrt {-x (-4 \log (x)+1+4 c_1)}}\right \}\right \}$

Maple
cpu = 0.026 (sec), leaf count = 59

$\left [y \left (x \right ) = -\frac {-1+\sqrt {1-4 \ln \left (x \right )+4 \textit {\_C1}}}{2 \left (\ln \left (x \right )-\textit {\_C1} \right ) x}, y \left (x \right ) = \frac {1+\sqrt {1-4 \ln \left (x \right )+4 \textit {\_C1}}}{2 \left (\ln \left (x \right )-\textit {\_C1} \right ) x}\right ]$ Mathematica raw input

DSolve[2*y[x] - x*y[x]^2*(1 + x*y[x]) + x*(2 - x*y[x])*y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> 2/(x + Sqrt[-x^(-3)]*x^2*Sqrt[-(x*(1 + 4*C[1] - 4*Log[x]))])}, {y[x] -
> 2/(x + (-x^(-3))^(3/2)*x^5*Sqrt[-(x*(1 + 4*C[1] - 4*Log[x]))])}}

Maple raw input

dsolve(x*(2-x*y(x))*diff(y(x),x)+2*y(x)-x*y(x)^2*(1+x*y(x)) = 0, y(x))

Maple raw output

[y(x) = -1/2*(-1+(1-4*ln(x)+4*_C1)^(1/2))/(ln(x)-_C1)/x, y(x) = 1/2*(1+(1-4*ln(x
)+4*_C1)^(1/2))/(ln(x)-_C1)/x]