80.11.4 problem 4

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

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