23.3 problem 5

Internal problem ID [11567]

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.
ODE order: 1.
ODE degree: 1.

Solve \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: 0.172 (sec). Leaf size: 72

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 )+c_{1} \cos \left (t \right )-\frac {\cos \left (w t \right )}{w^{2}-1} \\ y \left (t \right ) &= \frac {\cos \left (t \right ) c_{2} w^{2}-\sin \left (t \right ) c_{1} w^{2}+w \sin \left (w t \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.119 (sec). Leaf size: 57

DSolve[{x'[t]==0*x[t]+y[t],y'[t]==-x[t]+Cos[w*t]},{x[t],y[t]},t,IncludeSingularSolutions -> True]
 

\begin{align*} x(t)\to -\frac {\cos (t w)}{w^2-1}+c_1 \cos (t)+c_2 \sin (t) \\ y(t)\to \frac {w \sin (t w)}{w^2-1}+c_2 \cos (t)-c_1 \sin (t) \\ \end{align*}