75.27.4 problem 779

Internal problem ID [17161]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 3 (Systems of differential equations). Section 20. The method of elimination. Exercises page 212
Problem number : 779
Date solved : Thursday, March 13, 2025 at 09:18:05 AM
CAS classification : system_of_ODEs

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

With initial conditions

\begin{align*} x \left (0\right ) = -2\\ y \left (0\right ) = 1 \end{align*}

Maple. Time used: 0.053 (sec). Leaf size: 26
ode:=[diff(x(t),t) = x(t)+5*y(t), diff(y(t),t) = -x(t)-3*y(t)]; 
ic:=x(0) = -2y(0) = 1; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{-t} \left (-2 \cos \left (t \right )+\sin \left (t \right )\right ) \\ y \left (t \right ) &= \cos \left (t \right ) {\mathrm e}^{-t} \\ \end{align*}
Mathematica. Time used: 0.004 (sec). Leaf size: 20
ode={D[x[t],t]+3*x[t]+4*y[t]==0,D[y[t],t]+2*x[t]+5*y[t]==0}; 
ic={x[0]==-2,y[0]==1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to -2 e^{-t} \\ y(t)\to e^{-t} \\ \end{align*}
Sympy. Time used: 0.095 (sec). Leaf size: 44
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-x(t) - 5*y(t) + Derivative(x(t), t),0),Eq(x(t) + 3*y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = \left (C_{1} + 2 C_{2}\right ) e^{- t} \sin {\left (t \right )} - \left (2 C_{1} - C_{2}\right ) e^{- t} \cos {\left (t \right )}, \ y{\left (t \right )} = C_{1} e^{- t} \cos {\left (t \right )} - C_{2} e^{- t} \sin {\left (t \right )}\right ] \]