10.10.7 problem 7

Internal problem ID [1339]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Chapter 3, Second order linear equations, section 3.6, Variation of Parameters. page 190
Problem number : 7
Date solved : Tuesday, March 04, 2025 at 12:29:58 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.007 (sec). Leaf size: 19
ode:=diff(diff(y(t),t),t)+4*diff(y(t),t)+4*y(t) = 1/t^2*exp(-2*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = {\mathrm e}^{-2 t} \left (-1+c_1 t -\ln \left (t \right )+c_2 \right ) \]
Mathematica. Time used: 0.027 (sec). Leaf size: 23
ode=D[y[t],{t,2}]+4*D[y[t],t]+4*y[t] == t^(-2)*Exp[-2*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-2 t} (-\log (t)+c_2 t-1+c_1) \]
Sympy. Time used: 0.285 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(4*y(t) + 4*Derivative(y(t), t) + Derivative(y(t), (t, 2)) - exp(-2*t)/t**2,0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (C_{1} + C_{2} t - \log {\left (t \right )}\right ) e^{- 2 t} \]