ODE
\[ y'(x)=-\left (x^2+1\right ) y(x)+y(x)^2+2 x \] ODE Classification
[_Riccati]
Book solution method
Riccati ODE, Generalized ODE
Mathematica ✓
cpu = 0.772018 (sec), leaf count = 48
\[\left \{\left \{y(x)\to \frac {e^{\frac {x^3}{3}+x}}{c_1-\int _1^x e^{\frac {K[1]^3}{3}+K[1]} \, dK[1]}+x^2+1\right \}\right \}\]
Maple ✓
cpu = 0.141 (sec), leaf count = 34
\[ \left \{ y \left ( x \right ) ={x}^{2}+1+{1{{\rm e}^{{\frac {{x}^{3}}{3}}+x}} \left ( {\it \_C1}-\int \!{{\rm e}^{{\frac {{x}^{3}}{3}}+x}}\,{\rm d}x \right ) ^{-1}} \right \} \] Mathematica raw input
DSolve[y'[x] == 2*x - (1 + x^2)*y[x] + y[x]^2,y[x],x]
Mathematica raw output
{{y[x] -> 1 + x^2 + E^(x + x^3/3)/(C[1] - Integrate[E^(K[1] + K[1]^3/3), {K[1],
1, x}])}}
Maple raw input
dsolve(diff(y(x),x) = 2*x-(x^2+1)*y(x)+y(x)^2, y(x),'implicit')
Maple raw output
y(x) = x^2+1+exp(1/3*x^3+x)/(_C1-Int(exp(1/3*x^3+x),x))