80.11.3 problem 3

Internal problem ID [21411]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 12. Stability theory. Excercise 12.6 at page 270
Problem number : 3
Date solved : Thursday, October 02, 2025 at 07:30:55 PM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }&=x-y \left (t \right )\\ y^{\prime }\left (t \right )&=3 x-y \left (t \right ) \end{align*}
Maple. Time used: 0.051 (sec). Leaf size: 64
ode:=[diff(x(t),t) = x(t)-y(t), diff(y(t),t) = 3*x(t)-y(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= c_1 \sin \left (\sqrt {2}\, t \right )+c_2 \cos \left (\sqrt {2}\, t \right ) \\ y \left (t \right ) &= -c_1 \sqrt {2}\, \cos \left (\sqrt {2}\, t \right )+c_2 \sqrt {2}\, \sin \left (\sqrt {2}\, t \right )+c_1 \sin \left (\sqrt {2}\, t \right )+c_2 \cos \left (\sqrt {2}\, t \right ) \\ \end{align*}
Mathematica. Time used: 0.008 (sec). Leaf size: 76
ode={D[x[t],t]==x[t]-y[t],D[y[t],t]==3*x[t]-y[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to c_1 \cos \left (\sqrt {2} t\right )+\frac {(c_1-c_2) \sin \left (\sqrt {2} t\right )}{\sqrt {2}}\\ y(t)&\to c_2 \cos \left (\sqrt {2} t\right )+\frac {(3 c_1-c_2) \sin \left (\sqrt {2} t\right )}{\sqrt {2}} \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode=[Eq(-x(t) + y(t) + Derivative(x(t), t),0),Eq(-3*x(t) + y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
ValueError : 
Input to the funcs should be a list of functions.