4.12.22 x(2xy(x))y(x)x(xy(x)+1)y(x)2+2y(x)=0

ODE
x(2xy(x))y(x)x(xy(x)+1)y(x)2+2y(x)=0 ODE Classification

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

Book solution method
Change of Variable, new dependent variable

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

{{y(x)21x3x2x(4c14log(x)+1)+x},{y(x)2(1x3)3/2x5x(4c14log(x)+1)+x}}

Maple
cpu = 0.017 (sec), leaf count = 24

{ln(x)_C1+1xy(x)x2(y(x))2=0} 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),'implicit')

Maple raw output

ln(x)-_C1+(1-x*y(x))/x^2/y(x)^2 = 0