76.17.3 problem 12

Internal problem ID [17618]
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.7 (Variation of parameters). Problems at page 280
Problem number : 12
Date solved : Monday, March 31, 2025 at 04:22:42 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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