59.1.10 problem 5.4 (v)

Internal problem ID [14994]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 5, Trivial differential equations. Exercises page 33
Problem number : 5.4 (v)
Date solved : Thursday, October 02, 2025 at 09:58:10 AM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

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