78.1.12 problem 1 (m)

Internal problem ID [17996]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 1. The Nature of Differential Equations. Separable Equations. Section 2. Problems at page 9
Problem number : 1 (m)
Date solved : Monday, March 31, 2025 at 04:54:28 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} y^{\prime }&=\frac {y^{2}}{x y-x^{2}} \end{align*}

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