74.18.25 problem 31

Internal problem ID [16511]
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 : 31
Date solved : Monday, March 31, 2025 at 02:55:09 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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