79.3.4 problem 7 (iv)

Internal problem ID [18528]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 5. Linear equations. Exercises at page 85
Problem number : 7 (iv)
Date solved : Tuesday, January 28, 2025 at 11:53:00 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

\begin{align*} x \left (0\right )&=0\\ x^{\prime }\left (0\right )&=1 \end{align*}

Solution by Maple

Time used: 0.027 (sec). Leaf size: 46

dsolve([diff(x(t),t$2)-diff(x(t),t)+x(t)=sin(2*t),x(0) = 0, D(x)(0) = 1],x(t), singsol=all)
 
\[ x = \frac {40 \,{\mathrm e}^{\frac {t}{2}} \sqrt {3}\, \sin \left (\frac {\sqrt {3}\, t}{2}\right )}{39}-\frac {2 \,{\mathrm e}^{\frac {t}{2}} \cos \left (\frac {\sqrt {3}\, t}{2}\right )}{13}-\frac {3 \sin \left (2 t \right )}{13}+\frac {2 \cos \left (2 t \right )}{13} \]

Solution by Mathematica

Time used: 1.848 (sec). Leaf size: 67

DSolve[{D[x[t],{t,2}]-D[x[t],t]+x[t]==Sin[2*t],{x[0]==0,Derivative[1][x][0] == 1}},x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to \frac {1}{39} \left (-9 \sin (2 t)+40 \sqrt {3} e^{t/2} \sin \left (\frac {\sqrt {3} t}{2}\right )+6 \cos (2 t)-6 e^{t/2} \cos \left (\frac {\sqrt {3} t}{2}\right )\right ) \]