63.4.28 problem 23

Internal problem ID [12992]
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 : Wednesday, March 05, 2025 at 08:56:33 PM
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.013 (sec). Leaf size: 16
ode:=diff(x(t),t)*exp(2*t)+2*x(t)*exp(2*t) = exp(-t); 
ic:=x(0) = 3; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x \left (t \right ) = -\left ({\mathrm e}^{-t}-4\right ) {\mathrm e}^{-2 t} \]
Mathematica. Time used: 0.07 (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]
 
\[ x(t)\to e^{-3 t} \left (4 e^t-1\right ) \]
Sympy. Time used: 0.203 (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} \]