60.9.2 problem 1857

Internal problem ID [11781]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 8, system of first order odes
Problem number : 1857
Date solved : Sunday, March 30, 2025 at 09:15:09 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.145 (sec). Leaf size: 34
ode:=[diff(x(t),t) = a*y(t), diff(y(t),t) = -a*x(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= c_1 \sin \left (a t \right )+c_2 \cos \left (a t \right ) \\ y \left (t \right ) &= \cos \left (a t \right ) c_1 -\sin \left (a t \right ) c_2 \\ \end{align*}
Mathematica. Time used: 0.002 (sec). Leaf size: 39
ode={D[x[t],t]==a*y[t],D[y[t],t]==-a*x[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to c_1 \cos (a t)+c_2 \sin (a t) \\ y(t)\to c_2 \cos (a t)-c_1 \sin (a t) \\ \end{align*}
Sympy. Time used: 0.164 (sec). Leaf size: 41
from sympy import * 
t = symbols("t") 
a = symbols("a") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-a*y(t) + Derivative(x(t), t),0),Eq(a*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^{- i a t} - i C_{2} e^{i a t}, \ y{\left (t \right )} = C_{1} e^{- i a t} + C_{2} e^{i a t}\right ] \]