14.20.7 problem 7

Internal problem ID [2704]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.14, The method of elimination for systems. Excercises page 258
Problem number : 7
Date solved : Sunday, March 30, 2025 at 12:15:15 AM
CAS classification : system_of_ODEs

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

With initial conditions

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

Maple. Time used: 0.153 (sec). Leaf size: 26
ode:=[diff(x(t),t) = x(t)-y(t), diff(y(t),t) = 5*x(t)-3*y(t)]; 
ic:=x(0) = 1y(0) = 2; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{-t} \cos \left (t \right ) \\ y \left (t \right ) &= {\mathrm e}^{-t} \left (\sin \left (t \right )+2 \cos \left (t \right )\right ) \\ \end{align*}
Mathematica. Time used: 0.007 (sec). Leaf size: 29
ode={D[x[t],t]==x[t]-y[t],D[y[t],t]==5*x[t]-3*y[t]}; 
ic={x[0]==1,y[0]==2}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^{-t} \cos (t) \\ y(t)\to e^{-t} (\sin (t)+2 \cos (t)) \\ \end{align*}
Sympy. Time used: 0.103 (sec). Leaf size: 53
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-x(t) + y(t) + Derivative(x(t), t),0),Eq(-5*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 (\frac {C_{1}}{5} - \frac {2 C_{2}}{5}\right ) e^{- t} \cos {\left (t \right )} - \left (\frac {2 C_{1}}{5} + \frac {C_{2}}{5}\right ) e^{- t} \sin {\left (t \right )}, \ y{\left (t \right )} = - C_{1} e^{- t} \sin {\left (t \right )} + C_{2} e^{- t} \cos {\left (t \right )}\right ] \]