29.20.23 problem 570

Internal problem ID [5164]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 20
Problem number : 570
Date solved : Tuesday, March 04, 2025 at 08:22:40 PM
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: 5.957 (sec). Leaf size: 72
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 \left (x \right ) &= -\frac {3 \operatorname {LambertW}\left (\frac {\left (-x^{2}\right )^{{1}/{3}} c_{1}}{3}\right )}{x} \\ y \left (x \right ) &= -\frac {3 \operatorname {LambertW}\left (-\frac {\left (-x^{2}\right )^{{1}/{3}} c_{1} \left (1+i \sqrt {3}\right )}{6}\right )}{x} \\ y \left (x \right ) &= -\frac {3 \operatorname {LambertW}\left (\frac {\left (-x^{2}\right )^{{1}/{3}} c_{1} \left (i \sqrt {3}-1\right )}{6}\right )}{x} \\ \end{align*}
Mathematica. Time used: 9.052 (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: 2.314 (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 ] \]