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.245961 (sec), leaf count = 49
\[\left \{\left \{y(x)\to \frac {e^{\frac {x^3}{3}+x}}{-\int _1^xe^{\frac {K[1]^3}{3}+K[1]}dK[1]+c_1}+x^2+1\right \}\right \}\]
Maple ✓
cpu = 0.105 (sec), leaf count = 34
\[\left [y \left (x \right ) = x^{2}+1+\frac {{\mathrm e}^{\frac {1}{3} x^{3}+x}}{\textit {\_C1} -\left (\int {\mathrm e}^{\frac {1}{3} x^{3}+x}d x \right )}\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] - Inactive[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))
Maple raw output
[y(x) = x^2+1+exp(1/3*x^3+x)/(_C1-Int(exp(1/3*x^3+x),x))]