31.3 problem 817

Internal problem ID [15540]

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.2 The method of undetermined coefficients. Exercises page 239
Problem number: 817.
ODE order: 1.
ODE degree: 1.

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

Solution by Maple

Time used: 0.015 (sec). Leaf size: 29

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

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

Solution by Mathematica

Time used: 0.011 (sec). Leaf size: 41

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

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