8.10.2 problem 2

Internal problem ID [2584]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.4. The method of variation of parameters. Excercises page 156
Problem number : 2
Date solved : Tuesday, September 30, 2025 at 05:47:27 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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