66.15.7 problem 19 (iv)

Internal problem ID [16175]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 3. Linear Systems. Review Exercises for chapter 3. page 376
Problem number : 19 (iv)
Date solved : Thursday, October 02, 2025 at 10:43:14 AM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }\left (t \right )&=-x \left (t \right )+y\\ y^{\prime }&=-2 x \left (t \right )+y \end{align*}
Maple. Time used: 0.112 (sec). Leaf size: 34
ode:=[diff(x(t),t) = y(t)-x(t), diff(y(t),t) = -2*x(t)+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 ) &= c_1 \cos \left (t \right )-c_2 \sin \left (t \right )+c_1 \sin \left (t \right )+c_2 \cos \left (t \right ) \\ \end{align*}
Mathematica. Time used: 0.004 (sec). Leaf size: 39
ode={D[x[t],t]==-1*x[t]+1*y[t],D[y[t],t]==-2*x[t]+1*y[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to c_1 \cos (t)+(c_2-c_1) \sin (t)\\ y(t)&\to c_2 (\sin (t)+\cos (t))-2 c_1 \sin (t) \end{align*}
Sympy. Time used: 0.049 (sec). Leaf size: 34
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(x(t) - y(t) + Derivative(x(t), t),0),Eq(2*x(t) - y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - \left (\frac {C_{1}}{2} - \frac {C_{2}}{2}\right ) \sin {\left (t \right )} + \left (\frac {C_{1}}{2} + \frac {C_{2}}{2}\right ) \cos {\left (t \right )}, \ y{\left (t \right )} = - C_{1} \sin {\left (t \right )} + C_{2} \cos {\left (t \right )}\right ] \]