4.9.47 \((-y(x)-x+3) y'(x)=-3 y(x)+x+1\)

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

[[_homogeneous, `class C`], _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 = 1.87088 (sec), leaf count = 159

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

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

\[\left [y \left (x \right ) = 1+\frac {\left (x -2\right ) \left (\LambertW \left (-2 \textit {\_C1} \left (x -2\right )\right )+2\right )}{\LambertW \left (-2 \textit {\_C1} \left (x -2\right )\right )}\right ]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

[y(x) = 1+(x-2)*(LambertW(-2*_C1*(x-2))+2)/LambertW(-2*_C1*(x-2))]