10.4.3 problem 4

Internal problem ID [1184]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.5. Page 88
Problem number : 4
Date solved : Saturday, March 29, 2025 at 10:45:02 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=-1+{\mathrm e}^{y} \end{align*}

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