28.1.13 problem 13

Internal problem ID [4319]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 13
Date solved : Sunday, March 30, 2025 at 02:59:29 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.181 (sec). Leaf size: 26
ode:=(1-exp(-y(x)/x))*diff(y(x),x)+1-y(x)/x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-c_1 \operatorname {LambertW}\left (-{\mathrm e}^{-\frac {1}{x c_1}}\right ) x -1}{c_1} \]
Mathematica. Time used: 60.202 (sec). Leaf size: 29
ode=(1-Exp[-y[x]/x])*D[y[x],x]+(1-y[x]/x)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -x W\left (-e^{-\frac {e^{c_1}}{x}}\right )-e^{c_1} \]
Sympy. Time used: 1.961 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - exp(-y(x)/x))*Derivative(y(x), x) + 1 - y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - C_{1} - x W\left (- e^{- \frac {C_{1}}{x}}\right ) \]