70.15.3 problem 3

Internal problem ID [18931]
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 : 3
Date solved : Thursday, October 02, 2025 at 03:33:05 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }-3 y&=-3 t \,{\mathrm e}^{-t} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 29
ode:=diff(diff(y(t),t),t)-2*diff(y(t),t)-3*y(t) = -3*t*exp(-t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {\left (16 c_1 \,{\mathrm e}^{4 t}+6 t^{2}+16 c_2 +3 t \right ) {\mathrm e}^{-t}}{16} \]
Mathematica. Time used: 0.03 (sec). Leaf size: 59
ode=D[y[t],{t,2}]-2*D[y[t],t]-3*y[t]==-3*t*Exp[-t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \frac {1}{8} e^{-t} \left (8 e^{4 t} \int _1^t-\frac {3}{4} e^{-4 K[1]} K[1]dK[1]+3 t^2+8 \left (c_2 e^{4 t}+c_1\right )\right ) \end{align*}
Sympy. Time used: 0.149 (sec). Leaf size: 26
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(3*t*exp(-t) - 3*y(t) - 2*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{2} e^{3 t} + \left (C_{1} + \frac {3 t^{2}}{8} + \frac {3 t}{16}\right ) e^{- t} \]