50.5.21 problem 21

Internal problem ID [10268]
Book : Own collection of miscellaneous problems
Section : section 5.0
Problem number : 21
Date solved : Tuesday, September 30, 2025 at 07:16:11 PM
CAS classification : [_separable]

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