74.11.12 problem 24

Internal problem ID [16191]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.3, page 156
Problem number : 24
Date solved : Monday, March 31, 2025 at 02:46:24 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+13 y&=2 t \,{\mathrm e}^{-2 t} \sin \left (3 t \right ) \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 50
ode:=diff(diff(y(t),t),t)-4*diff(y(t),t)+13*y(t) = 2*t*exp(-2*t)*sin(3*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {\left (\left (156 t +63\right ) \cos \left (3 t \right )+\left (104 t +16\right ) \sin \left (3 t \right )\right ) {\mathrm e}^{-2 t}}{2704}+\left (\cos \left (3 t \right ) c_1 +\sin \left (3 t \right ) c_2 \right ) {\mathrm e}^{2 t} \]
Mathematica. Time used: 0.039 (sec). Leaf size: 54
ode=D[y[t],{t,2}]-4*D[y[t],t]+13*y[t]==2*t*Exp[-2*t]*Sin[3*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {e^{-2 t} \left (\left (156 t+2704 c_2 e^{4 t}+63\right ) \cos (3 t)+8 \left (13 t+338 c_1 e^{4 t}+2\right ) \sin (3 t)\right )}{2704} \]
Sympy. Time used: 0.488 (sec). Leaf size: 58
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*t*exp(-2*t)*sin(3*t) + 13*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} \sin {\left (3 t \right )} + C_{2} \cos {\left (3 t \right )}\right ) e^{2 t} + \frac {\left (104 t \sin {\left (3 t \right )} + 156 t \cos {\left (3 t \right )} + 16 \sin {\left (3 t \right )} + 63 \cos {\left (3 t \right )}\right ) e^{- 2 t}}{2704} \]