80.7.31 problem C 10

Internal problem ID [21350]
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 7. System of first order equations. Excercise 7.6 at page 162
Problem number : C 10
Date solved : Thursday, October 02, 2025 at 07:28:41 PM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }&=\left (a -2\right ) x+y \left (t \right )\\ y^{\prime }\left (t \right )&=-x+\left (a -2\right ) y \left (t \right )\\ z^{\prime }\left (t \right )&=-a z \left (t \right ) \end{align*}
Maple. Time used: 0.084 (sec). Leaf size: 51
ode:=[diff(x(t),t) = (a-2)*x(t)+y(t), diff(y(t),t) = -x(t)+(a-2)*y(t), diff(z(t),t) = -a*z(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{\left (a -2\right ) t} \left (\sin \left (t \right ) c_1 +\cos \left (t \right ) c_2 \right ) \\ y \left (t \right ) &= -{\mathrm e}^{\left (a -2\right ) t} \left (\sin \left (t \right ) c_2 -\cos \left (t \right ) c_1 \right ) \\ z \left (t \right ) &= c_3 \,{\mathrm e}^{-a t} \\ \end{align*}
Mathematica. Time used: 0.023 (sec). Leaf size: 109
ode={D[x[t],t]==(a-2)*x[t]+y[t],D[y[t],t]==-x[t]+(a-2)*y[t],D[z[t],t]==-a*z[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to e^{(a-2) t} (c_1 \cos (t)+c_2 \sin (t))\\ y(t)&\to e^{(a-2) t} (c_2 \cos (t)-c_1 \sin (t))\\ z(t)&\to c_3 e^{-a t}\\ x(t)&\to e^{(a-2) t} (c_1 \cos (t)+c_2 \sin (t))\\ y(t)&\to e^{(a-2) t} (c_2 \cos (t)-c_1 \sin (t))\\ z(t)&\to 0 \end{align*}
Sympy. Time used: 0.129 (sec). Leaf size: 46
from sympy import * 
t = symbols("t") 
a = symbols("a") 
x = Function("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq((2 - a)*x(t) + y(t) + Derivative(x(t), t),0),Eq((2 - a)*y(t) + x(t) + Derivative(y(t), t),0),Eq(a*z(t) + Derivative(z(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} e^{t \left (a - 3\right )} - C_{2} e^{t \left (a - 1\right )}, \ y{\left (t \right )} = C_{1} e^{t \left (a - 3\right )} + C_{2} e^{t \left (a - 1\right )}, \ z{\left (t \right )} = C_{3} e^{- a t}\right ] \]