22.1.51 problem 52

Internal problem ID [4357]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 52
Date solved : Tuesday, September 30, 2025 at 07:23:13 AM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

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