ODE
\[ y'(x)=-(1-x) y(x)^2+(1-2 x) y(x)+x \] ODE Classification
[_Riccati]
Book solution method
Riccati ODE, Generalized ODE
Mathematica ✓
cpu = 0.00933038 (sec), leaf count = 25
\[\left \{\left \{y(x)\to \frac {c_1 e^x+x+1}{c_1 e^x+x}\right \}\right \}\]
Maple ✓
cpu = 0.063 (sec), leaf count = 23
\[ \left \{ y \left ( x \right ) =1-2\,{\frac {{{\rm e}^{-x}}}{{\it \_C1}-2\,x{{\rm e}^{-x}}}} \right \} \] Mathematica raw input
DSolve[y'[x] == x + (1 - 2*x)*y[x] - (1 - x)*y[x]^2,y[x],x]
Mathematica raw output
{{y[x] -> (1 + x + E^x*C[1])/(x + E^x*C[1])}}
Maple raw input
dsolve(diff(y(x),x) = x+(1-2*x)*y(x)-(1-x)*y(x)^2, y(x),'implicit')
Maple raw output
y(x) = 1-2*exp(-x)/(_C1-2*x*exp(-x))