2.12.7 problem 8

Internal problem ID [914]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 5.6, Forced Oscillations and Resonance. Page 362
Problem number : 8
Date solved : Tuesday, September 30, 2025 at 04:19:30 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }+3 x^{\prime }+5 x&=-4 \cos \left (5 t \right ) \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 43
ode:=diff(diff(x(t),t),t)+3*diff(x(t),t)+5*x(t) = -4*cos(5*t); 
dsolve(ode,x(t), singsol=all);
 
\[ x = {\mathrm e}^{-\frac {3 t}{2}} \sin \left (\frac {\sqrt {11}\, t}{2}\right ) c_2 +{\mathrm e}^{-\frac {3 t}{2}} \cos \left (\frac {\sqrt {11}\, t}{2}\right ) c_1 +\frac {16 \cos \left (5 t \right )}{125}-\frac {12 \sin \left (5 t \right )}{125} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 65
ode=D[x[t],{t,2}]+3*D[x[t],t]+5*x[t]==-4*Cos[5*t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {4}{125} (4 \cos (5 t)-3 \sin (5 t))+c_2 e^{-3 t/2} \cos \left (\frac {\sqrt {11} t}{2}\right )+c_1 e^{-3 t/2} \sin \left (\frac {\sqrt {11} t}{2}\right ) \end{align*}
Sympy. Time used: 0.164 (sec). Leaf size: 49
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(5*x(t) + 4*cos(5*t) + 3*Derivative(x(t), t) + Derivative(x(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (C_{1} \sin {\left (\frac {\sqrt {11} t}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {11} t}{2} \right )}\right ) e^{- \frac {3 t}{2}} - \frac {12 \sin {\left (5 t \right )}}{125} + \frac {16 \cos {\left (5 t \right )}}{125} \]