63.9.18 problem 2(g)

Internal problem ID [13145]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 2, Second order linear equations. Section 2.3.1 Nonhomogeneous Equations: Undetermined Coefficients. Exercises page 110
Problem number : 2(g)
Date solved : Tuesday, January 28, 2025 at 05:06:33 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }-4 x&=\cos \left (2 t \right ) \end{align*}

Solution by Maple

Time used: 0.004 (sec). Leaf size: 23

dsolve(diff(x(t),t$2)-4*x(t)=cos(2*t),x(t), singsol=all)
 
\[ x \left (t \right ) = c_{2} {\mathrm e}^{2 t}+c_{1} {\mathrm e}^{-2 t}-\frac {\cos \left (2 t \right )}{8} \]

Solution by Mathematica

Time used: 0.081 (sec). Leaf size: 72

DSolve[D[x[t],{t,2}]-4*x[t]==Cos[2*t],x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to e^{-2 t} \left (e^{4 t} \int _1^t\frac {1}{4} e^{-2 K[1]} \cos (2 K[1])dK[1]+\int _1^t-\frac {1}{4} e^{2 K[2]} \cos (2 K[2])dK[2]+c_1 e^{4 t}+c_2\right ) \]