32.4.12 problem 13

Internal problem ID [7785]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 25. Second order differential equations. Further problems 25. page 1094
Problem number : 13
Date solved : Tuesday, September 30, 2025 at 05:05:25 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+5 y&=6 \sin \left (t \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=diff(diff(y(t),t),t)+4*diff(y(t),t)+5*y(t) = 6*sin(t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = {\mathrm e}^{-2 t} \sin \left (t \right ) c_2 +{\mathrm e}^{-2 t} \cos \left (t \right ) c_1 -\frac {3 \cos \left (t \right )}{4}+\frac {3 \sin \left (t \right )}{4} \]
Mathematica. Time used: 0.014 (sec). Leaf size: 36
ode=D[y[t],{t,2}]+4*D[y[t],t]+5*y[t]==6*Sin[t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \left (-\frac {3}{4}+c_2 e^{-2 t}\right ) \cos (t)+\left (\frac {3}{4}+c_1 e^{-2 t}\right ) \sin (t) \end{align*}
Sympy. Time used: 0.137 (sec). Leaf size: 31
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(5*y(t) - 6*sin(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 (t \right )} + C_{2} \cos {\left (t \right )}\right ) e^{- 2 t} + \frac {3 \sin {\left (t \right )}}{4} - \frac {3 \cos {\left (t \right )}}{4} \]