6.5.2 problem Example 2

Internal problem ID [1626]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : Example 2
Date solved : Tuesday, September 30, 2025 at 04:40:45 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

\begin{align*} y^{\prime }&=\frac {y+x \,{\mathrm e}^{-\frac {y}{x}}}{x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 11
ode:=diff(y(x),x) = (y(x)+x*exp(-y(x)/x))/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \ln \left (\ln \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.237 (sec). Leaf size: 13
ode=D[y[x],x]==(y[x]+x*Exp[-y[x]/x])/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x \log (\log (x)+c_1) \end{align*}
Sympy. Time used: 0.312 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x*exp(-y(x)/x) + y(x))/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \log {\left (\left (C_{1} + \log {\left (x \right )}\right )^{x} \right )} \]