85.22.2 problem 4

Internal problem ID [22574]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. B Exercises at page 55
Problem number : 4
Date solved : Thursday, October 02, 2025 at 08:51:56 PM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} y^{2}+\left (y x -x^{3}\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.086 (sec). Leaf size: 211
ode:=y(x)^2+(x*y(x)-x^3)*diff(y(x),x) = 0; 
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: 0.31 (sec). Leaf size: 48
ode=y[x]^2+(x*y[x]-x^3)*D[y[x],x]-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{x^2}=1+(y(x)-1) \left (2 \log \left (1-\frac {1}{y(x)}\right )+y(x) \left (-2 \log \left (1-\frac {1}{y(x)}\right )-2+c_1\right )-c_1\right ),y(x)\right ] \]
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