8.13.1 problem problem 3

Internal problem ID [922]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 7.2, Matrices and Linear systems. Page 417
Problem number : problem 3
Date solved : Tuesday, March 04, 2025 at 12:05:56 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.006 (sec). Leaf size: 34
ode:=[diff(x(t),t) = -3*y(t), diff(y(t),t) = 3*x(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= \sin \left (3 t \right ) c_1 +\cos \left (3 t \right ) c_2 \\ y \left (t \right ) &= -\cos \left (3 t \right ) c_1 +\sin \left (3 t \right ) c_2 \\ \end{align*}
Mathematica. Time used: 0.003 (sec). Leaf size: 68
ode={D[x[t],t]==3*y[t],D[y[t],t]==3*x[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {1}{2} e^{-3 t} \left (c_1 \left (e^{6 t}+1\right )+c_2 \left (e^{6 t}-1\right )\right ) \\ y(t)\to \frac {1}{2} e^{-3 t} \left (c_1 \left (e^{6 t}-1\right )+c_2 \left (e^{6 t}+1\right )\right ) \\ \end{align*}
Sympy. Time used: 0.077 (sec). Leaf size: 32
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(3*y(t) + Derivative(x(t), t),0),Eq(-3*x(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - C_{1} \sin {\left (3 t \right )} - C_{2} \cos {\left (3 t \right )}, \ y{\left (t \right )} = C_{1} \cos {\left (3 t \right )} - C_{2} \sin {\left (3 t \right )}\right ] \]