14.28.5 problem 10

Internal problem ID [2797]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 4. Qualitative theory of differential equations. Section 4.1 (Introduction). Page 377
Problem number : 10
Date solved : Sunday, March 30, 2025 at 12:20:40 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 )&=2 x \left (t \right )-y \left (t \right ) \end{align*}

With initial conditions

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

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