26.5.4 problem 5

Internal problem ID [4278]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, End of chapter, page 61
Problem number : 5
Date solved : Tuesday, March 04, 2025 at 06:04:47 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.667 (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 \left (x \right ) &= \frac {c_{1} \left (\left (-x^{3}+\sqrt {x^{6}-c_{1}^{3}}\right )^{{2}/{3}}+c_{1} \right )}{x \left (-x^{3}+\sqrt {x^{6}-c_{1}^{3}}\right )^{{1}/{3}}} \\ y \left (x \right ) &= -\frac {c_{1} \left (i \sqrt {3}\, \left (-x^{3}+\sqrt {x^{6}-c_{1}^{3}}\right )^{{2}/{3}}-i c_{1} \sqrt {3}+\left (-x^{3}+\sqrt {x^{6}-c_{1}^{3}}\right )^{{2}/{3}}+c_{1} \right )}{2 x \left (-x^{3}+\sqrt {x^{6}-c_{1}^{3}}\right )^{{1}/{3}}} \\ y \left (x \right ) &= -\frac {c_{1} \left (-i \sqrt {3}\, \left (-x^{3}+\sqrt {x^{6}-c_{1}^{3}}\right )^{{2}/{3}}+i c_{1} \sqrt {3}+\left (-x^{3}+\sqrt {x^{6}-c_{1}^{3}}\right )^{{2}/{3}}+c_{1} \right )}{2 x \left (-x^{3}+\sqrt {x^{6}-c_{1}^{3}}\right )^{{1}/{3}}} \\ \end{align*}
Mathematica. Time used: 60.133 (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