63.23.3 problem 5

Internal problem ID [13243]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 4, Linear Systems. Exercises page 244
Problem number : 5
Date solved : Tuesday, January 28, 2025 at 05:12:55 AM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }&=y \left (t \right )\\ y^{\prime }\left (t \right )&=-x+\cos \left (w t \right ) \end{align*}

Solution by Maple

Time used: 1.036 (sec). Leaf size: 71

dsolve([diff(x(t),t)=0*x(t)+y(t),diff(y(t),t)=-x(t)+cos(w*t)],singsol=all)
 
\begin{align*} x \left (t \right ) &= c_{2} \sin \left (t \right )+\cos \left (t \right ) c_{1} -\frac {\cos \left (t w \right )}{w^{2}-1} \\ y &= \frac {\cos \left (t \right ) c_{2} w^{2}-\sin \left (t \right ) c_{1} w^{2}+w \sin \left (t w \right )-c_{2} \cos \left (t \right )+c_{1} \sin \left (t \right )}{\left (-1+w \right ) \left (1+w \right )} \\ \end{align*}

Solution by Mathematica

Time used: 0.093 (sec). Leaf size: 110

DSolve[{D[x[t],t]==0*x[t]+y[t],D[y[t],t]==-x[t]+Cos[w*t]},{x[t],y[t]},t,IncludeSingularSolutions -> True]
 
\begin{align*} x(t)\to \cos (t) \int _1^t-\cos (w K[1]) \sin (K[1])dK[1]+\sin (t) \int _1^t\cos (K[2]) \cos (w K[2])dK[2]+c_1 \cos (t)+c_2 \sin (t) \\ y(t)\to \cos (t) \int _1^t\cos (K[2]) \cos (w K[2])dK[2]-\sin (t) \int _1^t-\cos (w K[1]) \sin (K[1])dK[1]+c_2 \cos (t)-c_1 \sin (t) \\ \end{align*}