80.8.5 problem 9

Internal problem ID [21362]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 8. Qualitative analysis of 2 by 2 systems and nonlinear second order equations. Excercise 8.5 at page 184
Problem number : 9
Date solved : Thursday, October 02, 2025 at 07:28:47 PM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }&=x+y \left (t \right )\\ y^{\prime }\left (t \right )&=-2 x-y \left (t \right ) \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=1 \\ y \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.055 (sec). Leaf size: 16
ode:=[diff(x(t),t) = x(t)+y(t), diff(y(t),t) = -2*x(t)-y(t)]; 
ic:=[x(0) = 1, y(0) = 0]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= \sin \left (t \right )+\cos \left (t \right ) \\ y \left (t \right ) &= -2 \sin \left (t \right ) \\ \end{align*}
Mathematica. Time used: 0.005 (sec). Leaf size: 17
ode={D[x[t],t]==x[t]+y[t],D[y[t],t]==-2*x[t]-y[t]}; 
ic={x[0]==1,y[0]==0}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \sin (t)+\cos (t)\\ y(t)&\to -2 \sin (t) \end{align*}
Sympy. Time used: 0.049 (sec). Leaf size: 17
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 = {x(0): 1, y(0): 0} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = \sin {\left (t \right )} + \cos {\left (t \right )}, \ y{\left (t \right )} = - 2 \sin {\left (t \right )}\right ] \]