80.5.41 problem C 17

Internal problem ID [21262]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 5. Second order equations. Excercise 5.9 at page 119
Problem number : C 17
Date solved : Thursday, October 02, 2025 at 07:27:27 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{\prime \prime }-x^{\prime }-2 x&=3 \,{\mathrm e}^{-t} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 20
ode:=diff(diff(x(t),t),t)-diff(x(t),t)-2*x(t) = 3*exp(-t); 
dsolve(ode,x(t), singsol=all);
 
\[ x = \left (c_2 \,{\mathrm e}^{3 t}+c_1 -t \right ) {\mathrm e}^{-t} \]
Mathematica. Time used: 0.023 (sec). Leaf size: 32
ode=D[x[t],{t,2}]-D[x[t],t]-2*x[t]==3*Exp[-t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{3} e^{-t} \left (-3 t+3 c_2 e^{3 t}-1+3 c_1\right ) \end{align*}
Sympy. Time used: 0.120 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-2*x(t) - Derivative(x(t), t) + Derivative(x(t), (t, 2)) - 3*exp(-t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{2} e^{2 t} + \left (C_{1} - t\right ) e^{- t} \]