30.2 problem 811

Internal problem ID [15534]

Book: A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section: Chapter 3 (Systems of differential equations). Section 23. Methods of integrating nonhomogeneous linear systems with constant coefficients. Exercises page 234
Problem number: 811.
ODE order: 1.
ODE degree: 1.

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

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

Solution by Maple

Time used: 0.047 (sec). Leaf size: 33

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

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

Solution by Mathematica

Time used: 0.016 (sec). Leaf size: 31

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

\begin{align*} x(t)\to -\sin (t)-t \cos (t)+\cos (t) \\ y(t)\to t \sin (t)+(t-2) \cos (t) \\ \end{align*}