67.5.14 problem Problem 3(c)

Internal problem ID [14021]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 6. Introduction to Systems of ODEs. Problems page 408
Problem number : Problem 3(c)
Date solved : Wednesday, March 05, 2025 at 10:26:21 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.026 (sec). Leaf size: 37
ode:=[diff(x(t),t)-x(t)+2*y(t) = 0, diff(y(t),t)+y(t)-x(t) = 0]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= c_{1} \sin \left (t \right )+c_{2} \cos \left (t \right ) \\ y &= -\frac {\cos \left (t \right ) c_{1}}{2}+\frac {c_{2} \sin \left (t \right )}{2}+\frac {c_{1} \sin \left (t \right )}{2}+\frac {c_{2} \cos \left (t \right )}{2} \\ \end{align*}
Mathematica. Time used: 0.005 (sec). Leaf size: 39
ode={D[x[t],t]-x[t]+2*y[t]==0,D[y[t],t]+y[t]-x[t]==0}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to c_1 (\sin (t)+\cos (t))-2 c_2 \sin (t) \\ y(t)\to c_2 \cos (t)+(c_1-c_2) \sin (t) \\ \end{align*}
Sympy. Time used: 0.100 (sec). Leaf size: 27
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-x(t) + 2*y(t) + Derivative(x(t), t),0),Eq(-x(t) + 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} - C_{2}\right ) \cos {\left (t \right )} - \left (C_{1} + C_{2}\right ) \sin {\left (t \right )}, \ y{\left (t \right )} = C_{1} \cos {\left (t \right )} - C_{2} \sin {\left (t \right )}\right ] \]