83.5.8 problem 8

Internal problem ID [19024]
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, March 13, 2025 at 01:23:37 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.010 (sec). Leaf size: 18
ode:=y(x)^2+(x-1/y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {1}{-\operatorname {LambertW}\left (c_{1} {\mathrm e}^{x -1}\right )-1+x} \]
Mathematica. Time used: 60.08 (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]
 
\[ y(x)\to \frac {1}{-W\left (c_1 e^{x-1}\right )+x-1} \]
Sympy. Time used: 1.112 (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 \]