82.6.2 problem Ex. 2

Internal problem ID [18664]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Exercises at page 22
Problem number : Ex. 2
Date solved : Thursday, March 13, 2025 at 12:31:40 PM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} \left (1+x y\right ) y-\left (1-x y\right ) x y^{\prime }&=0 \end{align*}

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