80.11.2 problem 2

Internal problem ID [21410]
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 : 2
Date solved : Thursday, October 02, 2025 at 07:30:54 PM
CAS classification : system_of_ODEs

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