26.5.14 problem 18

Internal problem ID [4288]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, End of chapter, page 61
Problem number : 18
Date solved : Sunday, March 30, 2025 at 02:51:38 AM
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.016 (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.132 (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.885 (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 \]