31.3.8 problem 7.1

Internal problem ID [5738]
Book : Differential Equations, By George Boole F.R.S. 1865
Section : Chapter 4
Problem number : 7.1
Date solved : Sunday, March 30, 2025 at 10:07:09 AM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

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

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