74.18.24 problem 30

Internal problem ID [16502]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Chapter 4 review exercises, page 219
Problem number : 30
Date solved : Thursday, March 13, 2025 at 08:15:30 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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