80.4.2 problem 5

Internal problem ID [21219]
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 4. Existence and uniqueness for systems and higher order. Excercise 4.3 at page 76
Problem number : 5
Date solved : Thursday, October 02, 2025 at 07:27:00 PM
CAS classification : system_of_ODEs

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

With initial conditions

\begin{align*} x \left (0\right )&=0 \\ y \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.070 (sec). Leaf size: 15
ode:=[diff(x(t),t) = a*y(t), diff(y(t),t) = -a*x(t)]; 
ic:=[x(0) = 0, y(0) = 1]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= \sin \left (a t \right ) \\ y \left (t \right ) &= \cos \left (a t \right ) \\ \end{align*}
Mathematica. Time used: 0.002 (sec). Leaf size: 16
ode={D[x[t],t]==a*y[t],D[y[t],t]==-a*x[t]}; 
ic={x[0]==0,y[0]==1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \sin (a t)\\ y(t)&\to \cos (a t) \end{align*}
Sympy. Time used: 0.116 (sec). Leaf size: 42
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 = {x(0): 0, y(0): 1} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - \frac {i e^{i a t}}{2} + \frac {i e^{- i a t}}{2}, \ y{\left (t \right )} = \frac {e^{i a t}}{2} + \frac {e^{- i a t}}{2}\right ] \]