66.16.38 problem 40

Internal problem ID [16221]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 4. Forcing and Resonance. Section 4.1 page 399
Problem number : 40
Date solved : Thursday, October 02, 2025 at 10:43:47 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+6 y^{\prime }+8 y&=2 t +{\mathrm e}^{t} \end{align*}

With initial conditions

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