70.15.29 problem 31

Internal problem ID [18957]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.5 (Nonhomogeneous Equations, Method of Undetermined Coefficients). Problems at page 260
Problem number : 31
Date solved : Thursday, October 02, 2025 at 03:36:15 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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