29.15.33 problem 441

Internal problem ID [5039]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 441
Date solved : Sunday, March 30, 2025 at 06:31:33 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

\begin{align*} \left (x -y\right ) y^{\prime }&=\left ({\mathrm e}^{-\frac {x}{y}}+1\right ) y \end{align*}

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