ODE
\[ (2 y(x)+x) y'(x)-y(x)+2 x=0 \] ODE Classification
[[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]
Book solution method
Homogeneous equation
Mathematica ✓
cpu = 0.188701 (sec), leaf count = 29
\[\text {Solve}\left [\log \left (\frac {y(x)^2}{x^2}+1\right )+\tan ^{-1}\left (\frac {y(x)}{x}\right )+2 \log (x)=c_1,y(x)\right ]\]
Maple ✓
cpu = 0.112 (sec), leaf count = 22
\[\left [y \left (x \right ) = \tan \left (\RootOf \left (\ln \left (\frac {1}{\cos \left (\textit {\_Z} \right )^{2}}\right )+\textit {\_Z} +2 \ln \left (x \right )+2 \textit {\_C1} \right )\right ) x\right ]\] Mathematica raw input
DSolve[2*x - y[x] + (x + 2*y[x])*y'[x] == 0,y[x],x]
Mathematica raw output
Solve[ArcTan[y[x]/x] + 2*Log[x] + Log[1 + y[x]^2/x^2] == C[1], y[x]]
Maple raw input
dsolve((x+2*y(x))*diff(y(x),x)+2*x-y(x) = 0, y(x))
Maple raw output
[y(x) = tan(RootOf(ln(1/cos(_Z)^2)+_Z+2*ln(x)+2*_C1))*x]