23.1.530 problem 520

Internal problem ID [5137]
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 : 520
Date solved : Tuesday, September 30, 2025 at 11:44:04 AM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

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