23.3 problem 5

Internal problem ID [11577]

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.281 (sec). Leaf size: 71

dsolve([diff(x(t),t)=0*x(t)+y(t),diff(y(t),t)=-x(t)+cos(w*t)],[x(t), y(t)], singsol=all)
 

\[ x \left (t \right ) = -\frac {\cos \left (t \right ) c_{2} w^{2}-\sin \left (t \right ) c_{1} w^{2}-c_{2} \cos \left (t \right )+c_{1} \sin \left (t \right )+\cos \left (t w \right )}{\left (w -1\right ) \left (w +1\right )} \] \[ y \left (t \right ) = \sin \left (t \right ) c_{2} +c_{1} \cos \left (t \right )+\frac {w \sin \left (t w \right )}{w^{2}-1} \]

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*}