76.8.3 problem 3

Internal problem ID [17413]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 3. Systems of two first order equations. Section 3.4 (Complex Eigenvalues). Problems at page 177
Problem number : 3
Date solved : Thursday, March 13, 2025 at 10:07:56 AM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )&=2 x \left (t \right )-5 y \left (t \right )\\ \frac {d}{d t}y \left (t \right )&=x \left (t \right )-2 y \left (t \right ) \end{align*}

Maple. Time used: 0.063 (sec). Leaf size: 37
ode:=[diff(x(t),t) = 2*x(t)-5*y(t), diff(y(t),t) = x(t)-2*y(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= c_{1} \sin \left (t \right )+c_{2} \cos \left (t \right ) \\ y \left (t \right ) &= -\frac {\cos \left (t \right ) c_{1}}{5}+\frac {c_{2} \sin \left (t \right )}{5}+\frac {2 c_{1} \sin \left (t \right )}{5}+\frac {2 c_{2} \cos \left (t \right )}{5} \\ \end{align*}
Mathematica. Time used: 0.005 (sec). Leaf size: 41
ode={D[x[t],t]==2*x[t]-5*y[t],D[y[t],t]==x[t]-2*y[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to c_1 (2 \sin (t)+\cos (t))-5 c_2 \sin (t) \\ y(t)\to c_2 \cos (t)+(c_1-2 c_2) \sin (t) \\ \end{align*}
Sympy. Time used: 0.083 (sec). Leaf size: 32
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-2*x(t) + 5*y(t) + Derivative(x(t), t),0),Eq(-x(t) + 2*y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - \left (C_{1} - 2 C_{2}\right ) \cos {\left (t \right )} - \left (2 C_{1} + C_{2}\right ) \sin {\left (t \right )}, \ y{\left (t \right )} = - C_{1} \sin {\left (t \right )} + C_{2} \cos {\left (t \right )}\right ] \]