10.20.4 problem 3 part 1

Internal problem ID [1460]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Chapter 9.2, Autonomous Systems and Stability. page 517
Problem number : 3 part 1
Date solved : Saturday, March 29, 2025 at 10:55:46 PM
CAS classification : system_of_ODEs

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

With initial conditions

\begin{align*} x \left (0\right ) = 4\\ y \left (0\right ) = 0 \end{align*}

Maple. Time used: 0.135 (sec). Leaf size: 15
ode:=[diff(x(t),t) = -y(t), diff(y(t),t) = x(t)]; 
ic:=x(0) = 4y(0) = 0; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= 4 \cos \left (t \right ) \\ y \left (t \right ) &= 4 \sin \left (t \right ) \\ \end{align*}
Mathematica. Time used: 0.002 (sec). Leaf size: 16
ode={D[x[t],t]==-0*x[t]-1*y[t],D[y[t],t]==1*x[t]+0*y[t]}; 
ic={x[0]==4,y[0]==0}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to 4 \cos (t) \\ y(t)\to 4 \sin (t) \\ \end{align*}
Sympy. Time used: 0.065 (sec). Leaf size: 26
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(y(t) + Derivative(x(t), t),0),Eq(-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 (t \right )} - C_{2} \cos {\left (t \right )}, \ y{\left (t \right )} = C_{1} \cos {\left (t \right )} - C_{2} \sin {\left (t \right )}\right ] \]