74.12.46 problem 46

Internal problem ID [16274]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.4, page 163
Problem number : 46
Date solved : Thursday, March 13, 2025 at 08:09:18 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+3 y&=65 \cos \left (2 t \right ) \end{align*}

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