4.9.46 \((y(x)+x+2) y'(x)=-y(x)-x+1\)

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

[[_homogeneous, `class C`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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

Mathematica
cpu = 0.167149 (sec), leaf count = 43

\[\left \{\left \{y(x)\to -x-\sqrt {6 x+4+c_1}-2\right \},\left \{y(x)\to -x+\sqrt {6 x+4+c_1}-2\right \}\right \}\]

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

\[\left [y \left (x \right ) = -x -2-\sqrt {-6 \textit {\_C1} +6 x +4}, y \left (x \right ) = -x -2+\sqrt {-6 \textit {\_C1} +6 x +4}\right ]\] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -2 - x - Sqrt[4 + 6*x + C[1]]}, {y[x] -> -2 - x + Sqrt[4 + 6*x + C[1]]
}}

Maple raw input

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

Maple raw output

[y(x) = -x-2-(-6*_C1+6*x+4)^(1/2), y(x) = -x-2+(-6*_C1+6*x+4)^(1/2)]