81.7.7 problem 8-6

Internal problem ID [21581]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 8. Riccati Equation. Page 124.
Problem number : 8-6
Date solved : Thursday, October 02, 2025 at 07:58:08 PM
CAS classification : [[_homogeneous, `class C`], _Riccati]

\begin{align*} y^{\prime }&=-x^{2}-x -1-\left (2 x +1\right ) y-y^{2} \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 22
ode:=diff(y(x),x) = -x^2-x-1-(2*x+1)*y(x)-y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-x \,{\mathrm e}^{x} c_1 +x +1}{{\mathrm e}^{x} c_1 -1} \]
Mathematica. Time used: 0.102 (sec). Leaf size: 28
ode=D[y[x],x]== -(1+x+x^2)-(2*x+1)*y[x]-y[x]^2 ; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x-\frac {1}{1+c_1 e^x}\\ y(x)&\to -x \end{align*}
Sympy. Time used: 0.189 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 + x + (2*x + 1)*y(x) + y(x)**2 + Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- C_{1} x - C_{1} + x e^{x}}{C_{1} - e^{x}} \]