78.1.23 problem 2 (i)

Internal problem ID [18007]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 1. The Nature of Differential Equations. Separable Equations. Section 2. Problems at page 9
Problem number : 2 (i)
Date solved : Monday, March 31, 2025 at 04:56:16 PM
CAS classification : [_separable]

\begin{align*} x y y^{\prime }&=y-1 \end{align*}

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