56.5.21 problem 21

Internal problem ID [8982]
Book : Own collection of miscellaneous problems
Section : section 5.0
Problem number : 21
Date solved : Sunday, March 30, 2025 at 01:57:54 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.433 (sec). Leaf size: 12
ode=x^2*D[y[x],x]+Exp[-y[x]]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \log \left (\frac {1}{x}+c_1\right ) \]
Sympy. Time used: 0.167 (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 )} \]