85.67.12 problem 12

Internal problem ID [22903]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 216
Problem number : 12
Date solved : Thursday, October 02, 2025 at 09:16:27 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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