##### 4.13.22 $$(y(x)+x)^2 y'(x)=x^2-2 x y(x)+5 y(x)^2$$

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

[[_homogeneous, class A], _rational, _dAlembert]

Book solution method
Equation linear in the variables, $$y'(x)=f\left ( \frac {X_1}{X_2} \right )$$

Mathematica
cpu = 0.772962 (sec), leaf count = 35

$\text {Solve}\left [\frac {2 x (x-2 y(x))}{(x-y(x))^2}+\log \left (\frac {y(x)}{x}-1\right )+\log (x)=c_1,y(x)\right ]$

Maple
cpu = 0.148 (sec), leaf count = 35

$[y \left (x \right ) = {\mathrm e}^{\RootOf \left ({\mathrm e}^{2 \textit {\_Z}} \ln \left (x \right )+{\mathrm e}^{2 \textit {\_Z}} \textit {\_C1} +{\mathrm e}^{2 \textit {\_Z}} \textit {\_Z} -4 \,{\mathrm e}^{\textit {\_Z}}-2\right )} x +x]$ Mathematica raw input

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

Mathematica raw output

Solve[Log[x] + Log[-1 + y[x]/x] + (2*x*(x - 2*y[x]))/(x - y[x])^2 == C[1], y[x]]

Maple raw input

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

Maple raw output

[y(x) = exp(RootOf(exp(_Z)^2*ln(x)+exp(_Z)^2*_C1+exp(_Z)^2*_Z-4*exp(_Z)-2))*x+x]