85.23.2 problem 4

Internal problem ID [22577]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. C Exercises at page 55
Problem number : 4
Date solved : Thursday, October 02, 2025 at 08:52:02 PM
CAS classification : [[_1st_order, _with_linear_symmetries]]

\begin{align*} x y^{\prime }+3&=4 x \,{\mathrm e}^{-y} \end{align*}

With initial conditions

\begin{align*} y \left (2\right )&=0 \\ \end{align*}
Maple. Time used: 0.033 (sec). Leaf size: 14
ode:=x*diff(y(x),x)+3 = 4*x*exp(-y(x)); 
ic:=[y(2) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \ln \left (\frac {x^{4}-8}{x^{3}}\right ) \]
Mathematica. Time used: 2.78 (sec). Leaf size: 13
ode=x*D[y[x],{x,1}]+3==4*x*Exp[ -y[x] ]; 
ic={y[2]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \log \left (x-\frac {8}{x^3}\right ) \end{align*}
Sympy. Time used: 0.355 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - 4*x*exp(-y(x)) + 3,0) 
ics = {y(2): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \log {\left (x - \frac {8}{x^{3}} \right )} \]