77.5.8 problem 8

Internal problem ID [20388]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (D) at page 16
Problem number : 8
Date solved : Thursday, October 02, 2025 at 05:49:51 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`], [_Abel, `2nd type`, `class C`]]

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