76.15.3 problem 3

Internal problem ID [17565]
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, March 13, 2025 at 10:13:19 AM
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.009 (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 (6 t^{2}+16 c_{1} +3 t \right ) {\mathrm e}^{-t}}{16}+c_{2} {\mathrm e}^{3 t} \]
Mathematica. Time used: 0.053 (sec). Leaf size: 37
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]
 
\[ y(t)\to \frac {1}{64} e^{-t} \left (24 t^2+12 t+64 c_2 e^{4 t}+3+64 c_1\right ) \]
Sympy. Time used: 0.243 (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} \]