##### 4.8.21 $$x y'(x) \left (a+b x+c x^2\right )-y(x) \left (a+b x+c x^2\right )+x^2=y(x)^2$$

ODE
$x y'(x) \left (a+b x+c x^2\right )-y(x) \left (a+b x+c x^2\right )+x^2=y(x)^2$ ODE Classiﬁcation

[[_homogeneous, class D], _rational, _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.521223 (sec), leaf count = 104

$\left \{\left \{y(x)\to -\frac {x \left (-1+\exp \left (\frac {4 \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+2 c_1\right )\right )}{1+\exp \left (\frac {4 \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+2 c_1\right )}\right \}\right \}$

Maple
cpu = 0.057 (sec), leaf count = 58

$\left [y \left (x \right ) = -\tanh \left (\frac {\textit {\_C1} \sqrt {4 c a -b^{2}}+2 \arctan \left (\frac {2 c x +b}{\sqrt {4 c a -b^{2}}}\right )}{\sqrt {4 c a -b^{2}}}\right ) x\right ]$ Mathematica raw input

DSolve[x^2 - (a + b*x + c*x^2)*y[x] + x*(a + b*x + c*x^2)*y'[x] == y[x]^2,y[x],x]

Mathematica raw output

{{y[x] -> -(((-1 + E^((4*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a
*c] + 2*C[1]))*x)/(1 + E^((4*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 +
 4*a*c] + 2*C[1])))}}

Maple raw input

dsolve(x*(c*x^2+b*x+a)*diff(y(x),x)+x^2-(c*x^2+b*x+a)*y(x) = y(x)^2, y(x))

Maple raw output

[y(x) = -tanh((_C1*(4*a*c-b^2)^(1/2)+2*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2)))/(4*a
*c-b^2)^(1/2))*x]