14.2 problem 26.1 (ii)

Internal problem ID [12082]

Book: AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section: Chapter 26, Explicit solutions of coupled linear systems. Exercises page 257
Problem number: 26.1 (ii).
ODE order: 1.
ODE degree: 1.

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

With initial conditions \[ [x \left (0\right ) = 1, y \left (0\right ) = 1] \]

Solution by Maple

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

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

\begin{align*} x \left (t \right ) &= \frac {26 \,{\mathrm e}^{t} \cos \left (2 t \right )}{17}-\frac {32 \,{\mathrm e}^{t} \sin \left (2 t \right )}{17}+\frac {2 \sin \left (2 t \right )}{17}-\frac {9 \cos \left (2 t \right )}{17} \\ y \left (t \right ) &= \frac {13 \,{\mathrm e}^{t} \sin \left (2 t \right )}{17}+\frac {16 \,{\mathrm e}^{t} \cos \left (2 t \right )}{17}+\frac {\cos \left (2 t \right )}{17}-\frac {4 \sin \left (2 t \right )}{17} \\ \end{align*}

Solution by Mathematica

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

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

\begin{align*} x(t)\to \frac {1}{17} \left (\left (26 e^t-9\right ) \cos (2 t)-2 \left (16 e^t-1\right ) \sin (2 t)\right ) \\ y(t)\to \frac {1}{17} \left (\left (13 e^t-4\right ) \sin (2 t)+\left (16 e^t+1\right ) \cos (2 t)\right ) \\ \end{align*}