72.8.18 problem 18

Internal problem ID [19502]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 18
Date solved : Thursday, October 02, 2025 at 04:33:17 PM
CAS classification : [[_homogeneous, `class C`], _exact, _dAlembert]

\begin{align*} y^{\prime } \ln \left (x -y\right )&=1+\ln \left (x -y\right ) \end{align*}
Maple. Time used: 0.017 (sec). Leaf size: 23
ode:=diff(y(x),x)*ln(x-y(x)) = 1+ln(x-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-c_1 +x}{\operatorname {LambertW}\left (\left (c_1 -x \right ) {\mathrm e}^{-1}\right )}+x \]
Mathematica. Time used: 0.101 (sec). Leaf size: 26
ode=D[y[x],x]*Log[x-y[x]]==1+Log[x-y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}[(x-y(x)) (-\log (x-y(x)))-y(x)=c_1,y(x)] \]
Sympy. Time used: 0.561 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(log(x - y(x))*Derivative(y(x), x) - log(x - y(x)) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \left (x - y{\left (x \right )}\right ) \log {\left (x - y{\left (x \right )} \right )} + y{\left (x \right )} = 0 \]