4.13.21 \((y(x)+x)^2 y'(x)=(y(x)+x+2)^2\)

ODE
\[ (y(x)+x)^2 y'(x)=(y(x)+x+2)^2 \] ODE Classification

[[_homogeneous, `class C`], _rational, _dAlembert]

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

Mathematica
cpu = 0.10943 (sec), leaf count = 27

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

Maple
cpu = 0.027 (sec), leaf count = 28

\[ \left \{ -{\it \_C1}+x-y \left ( x \right ) +\ln \left ( \left ( x+y \left ( x \right ) \right ) ^{2}+2\,x+2\,y \left ( x \right ) +2 \right ) =0 \right \} \] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

dsolve((x+y(x))^2*diff(y(x),x) = (2+x+y(x))^2, y(x),'implicit')

Maple raw output

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