78.5.20 problem 4 (i)

Internal problem ID [18092]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 9 (Integrating Factors). Problems at page 80
Problem number : 4 (i)
Date solved : Monday, March 31, 2025 at 05:09:48 PM
CAS classification : [_rational]

\begin{align*} y-x y^{2}+\left (x +x^{2} y^{2}\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 81
ode:=y(x)-x*y(x)^2+(x+x^2*y(x)^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {x \ln \left (x \right )+c_1 x +\sqrt {x \left (\ln \left (x \right )^{2} x +2 \ln \left (x \right ) c_1 x +c_1^{2} x +4\right )}}{2 x} \\ y &= \frac {x \ln \left (x \right )+c_1 x -\sqrt {x \left (\ln \left (x \right )^{2} x +2 \ln \left (x \right ) c_1 x +c_1^{2} x +4\right )}}{2 x} \\ \end{align*}
Mathematica. Time used: 1.246 (sec). Leaf size: 77
ode=(y[x]-x*y[x]^2)+(x+x^2*y[x]^2)*D[y[x],x] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x \log (x)+c_1 x-\sqrt {x \left (4+x (\log (x)+c_1){}^2\right )}}{2 x} \\ y(x)\to \frac {x \log (x)+c_1 x+\sqrt {x \left (4+x (\log (x)+c_1){}^2\right )}}{2 x} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x)**2 + (x**2*y(x)**2 + x)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out