63.4.2 problem 1(b)

Internal problem ID [12974]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.3.1 Separable equations. Exercises page 26
Problem number : 1(b)
Date solved : Monday, March 31, 2025 at 07:28:39 AM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&={\mathrm e}^{-2 x} \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=1 \end{align*}

Maple. Time used: 0.043 (sec). Leaf size: 13
ode:=diff(x(t),t) = exp(-2*x(t)); 
ic:=x(0) = 1; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x = \frac {\ln \left (2 t +{\mathrm e}^{2}\right )}{2} \]
Mathematica. Time used: 0.004 (sec). Leaf size: 17
ode=D[x[t],t]==Exp[-2*x[t]]; 
ic={x[0]==1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to \frac {1}{2} \log \left (2 t+e^2\right ) \]
Sympy. Time used: 0.410 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(Derivative(x(t), t) - exp(-2*x(t)),0) 
ics = {x(0): 1} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {\log {\left (2 t + e^{2} \right )}}{2} \]