76.8.13 problem 13

Internal problem ID [17431]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 3. Systems of two first order equations. Section 3.4 (Complex Eigenvalues). Problems at page 177
Problem number : 13
Date solved : Monday, March 31, 2025 at 04:13:36 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )&=a x \left (t \right )+y \left (t \right )\\ \frac {d}{d t}y \left (t \right )&=-x \left (t \right )+a y \left (t \right ) \end{align*}

Maple. Time used: 0.125 (sec). Leaf size: 37
ode:=[diff(x(t),t) = a*x(t)+y(t), diff(y(t),t) = -x(t)+a*y(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{a t} \left (c_1 \sin \left (t \right )+c_2 \cos \left (t \right )\right ) \\ y \left (t \right ) &= -{\mathrm e}^{a t} \left (\sin \left (t \right ) c_2 -\cos \left (t \right ) c_1 \right ) \\ \end{align*}
Mathematica. Time used: 0.002 (sec). Leaf size: 43
ode={D[x[t],t]==a*x[t]+y[t],D[y[t],t]==-x[t]+a*y[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^{a t} (c_1 \cos (t)+c_2 \sin (t)) \\ y(t)\to e^{a t} (c_2 \cos (t)-c_1 \sin (t)) \\ \end{align*}
Sympy. Time used: 0.181 (sec). Leaf size: 41
from sympy import * 
t = symbols("t") 
a = symbols("a") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-a*x(t) - y(t) + Derivative(x(t), t),0),Eq(-a*y(t) + x(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = i C_{1} e^{t \left (a - i\right )} - i C_{2} e^{t \left (a + i\right )}, \ y{\left (t \right )} = C_{1} e^{t \left (a - i\right )} + C_{2} e^{t \left (a + i\right )}\right ] \]