4.10.16 \((2 y(x)+x) y'(x)-y(x)+2 x=0\)

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.0294058 (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.011 (sec), leaf count = 35

\[ \left \{ -{\frac {1}{2}\ln \left ({\frac {{x}^{2}+ \left (y \relax (x ) \right ) ^{2}}{{x}^{2}}} \right ) }-{\frac {1}{2}\arctan \left ({\frac {y \relax (x ) }{x}} \right ) }-\ln \relax (x ) -{\it \_C1}=0 \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),'implicit')

Maple raw output

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