80.7.8 problem A 8

Internal problem ID [21327]
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 : A 8
Date solved : Thursday, October 02, 2025 at 07:28:28 PM
CAS classification : system_of_ODEs

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

With initial conditions

\begin{align*} x \left (0\right )&=a \\ y \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.057 (sec). Leaf size: 20
ode:=[diff(x(t),t) = 2*y(t), diff(y(t),t) = -2*x(t)]; 
ic:=[x(0) = a, y(0) = 0]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= a \cos \left (2 t \right ) \\ y \left (t \right ) &= -a \sin \left (2 t \right ) \\ \end{align*}
Mathematica. Time used: 0.002 (sec). Leaf size: 21
ode={D[x[t],t]==2*y[t],D[y[t],t]==-2*x[t]}; 
ic={x[0]==a,y[0]==0}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to a \cos (2 t)\\ y(t)&\to -a \sin (2 t) \end{align*}
Sympy. Time used: 0.040 (sec). Leaf size: 19
from sympy import * 
t = symbols("t") 
a = symbols("a") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-2*y(t) + Derivative(x(t), t),0),Eq(2*x(t) + Derivative(y(t), t),0)] 
ics = {x(0): a, y(0): 0} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = a \cos {\left (2 t \right )}, \ y{\left (t \right )} = - a \sin {\left (2 t \right )}\right ] \]