78.8.5 problem 5

Internal problem ID [18132]
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. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 5
Date solved : Monday, March 31, 2025 at 05:12:55 PM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.108 (sec). Leaf size: 207
ode:=y(x)^2 = (x^3-x*y(x))*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\left (\left (-x^{3}+\sqrt {x^{6}-c_1^{3}}\right )^{{2}/{3}}+c_1 \right ) c_1}{x \left (-x^{3}+\sqrt {x^{6}-c_1^{3}}\right )^{{1}/{3}}} \\ y &= -\frac {\left (i \sqrt {3}\, \left (-x^{3}+\sqrt {x^{6}-c_1^{3}}\right )^{{2}/{3}}-i \sqrt {3}\, c_1 +\left (-x^{3}+\sqrt {x^{6}-c_1^{3}}\right )^{{2}/{3}}+c_1 \right ) c_1}{2 x \left (-x^{3}+\sqrt {x^{6}-c_1^{3}}\right )^{{1}/{3}}} \\ y &= -\frac {\left (-i \sqrt {3}\, \left (-x^{3}+\sqrt {x^{6}-c_1^{3}}\right )^{{2}/{3}}+i \sqrt {3}\, c_1 +\left (-x^{3}+\sqrt {x^{6}-c_1^{3}}\right )^{{2}/{3}}+c_1 \right ) c_1}{2 x \left (-x^{3}+\sqrt {x^{6}-c_1^{3}}\right )^{{1}/{3}}} \\ \end{align*}
Mathematica. Time used: 60.115 (sec). Leaf size: 820
ode=y[x]^2==(x^3-x*y[x])*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x**3 + x*y(x))*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
IndexError : list index out of range