14.11.6 problem 6

Internal problem ID [2599]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.5. Method of judicious guessing. Excercises page 164
Problem number : 6
Date solved : Sunday, March 30, 2025 at 12:11:12 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+5 y^{\prime }+4 y&=t^{2} {\mathrm e}^{7 t} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 33
ode:=diff(diff(y(t),t),t)+5*diff(y(t),t)+4*y(t) = t^2*exp(7*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = {\mathrm e}^{-4 t} c_2 +{\mathrm e}^{-t} c_1 +\frac {\left (3872 t^{2}-1672 t +273\right ) {\mathrm e}^{7 t}}{340736} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 41
ode=D[y[t],{t,2}]+5*D[y[t],t]+4*y[t]==t^2*Exp[7*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {e^{7 t} \left (3872 t^2-1672 t+273\right )}{340736}+c_1 e^{-4 t}+c_2 e^{-t} \]
Sympy. Time used: 0.299 (sec). Leaf size: 31
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t**2*exp(7*t) + 4*y(t) + 5*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} e^{- 4 t} + C_{2} e^{- t} + \frac {\left (3872 t^{2} - 1672 t + 273\right ) e^{7 t}}{340736} \]