23.1.580 problem 573

Internal problem ID [5187]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 573
Date solved : Tuesday, September 30, 2025 at 11:51:47 AM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

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