##### 4.12.21 $$x (x y(x)+2) y'(x)=2 x^3-x y(x)^2-2 y(x)+3$$

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

[_exact, _rational, [_Abel, 2nd type, class B]]

Book solution method
Exact equation

Mathematica
cpu = 0.323975 (sec), leaf count = 62

$\left \{\left \{y(x)\to -\frac {2 x+\sqrt {x^2 \left (x^4+6 x+4+c_1\right )}}{x^2}\right \},\left \{y(x)\to \frac {-2 x+\sqrt {x^2 \left (x^4+6 x+4+c_1\right )}}{x^2}\right \}\right \}$

Maple
cpu = 0.02 (sec), leaf count = 47

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

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

Mathematica raw output

{{y[x] -> -((2*x + Sqrt[x^2*(4 + 6*x + x^4 + C[1])])/x^2)}, {y[x] -> (-2*x + Sqr
t[x^2*(4 + 6*x + x^4 + C[1])])/x^2}}

Maple raw input

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

Maple raw output

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