57.4.28 problem 23

Internal problem ID [14352]
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 : 23
Date solved : Thursday, October 02, 2025 at 09:32:17 AM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

\begin{align*} x \left (0\right )&=3 \\ \end{align*}
Maple. Time used: 0.026 (sec). Leaf size: 17
ode:=diff(x(t),t)*exp(2*t)+2*x(t)*exp(2*t) = exp(-t); 
ic:=[x(0) = 3]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = -{\mathrm e}^{-3 t}+4 \,{\mathrm e}^{-2 t} \]
Mathematica. Time used: 0.039 (sec). Leaf size: 18
ode=D[x[t]*Exp[2*t],t]==Exp[-t]; 
ic={x[0]==3}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to e^{-3 t} \left (4 e^t-1\right ) \end{align*}
Sympy. Time used: 0.111 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(2*x(t)*exp(2*t) + exp(2*t)*Derivative(x(t), t) - exp(-t),0) 
ics = {x(0): 3} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (4 - e^{- t}\right ) e^{- 2 t} \]