69.1.137 problem 196

Internal problem ID [14219]
Book : DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section : Chapter 8. Differential equations. Exercises page 595
Problem number : 196
Date solved : Monday, March 31, 2025 at 12:13:04 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )&=y \left (t \right )-x \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 (1\right ) = 0\\ y \left (1\right ) = 1 \end{align*}

Maple. Time used: 0.145 (sec). Leaf size: 44
ode:=[diff(x(t),t) = y(t)-x(t), diff(y(t),t) = -x(t)-3*y(t)]; 
ic:=x(1) = 0y(1) = 1; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{-2 t} \left (t \,{\mathrm e}^{2}-{\mathrm e}^{2}\right ) \\ y \left (t \right ) &= -{\mathrm e}^{-2 t} \left (t \,{\mathrm e}^{2}-2 \,{\mathrm e}^{2}\right ) \\ \end{align*}
Mathematica. Time used: 0.004 (sec). Leaf size: 31
ode={D[x[t],t]==y[t]-x[t],D[y[t],t]==-x[t]-3*y[t]}; 
ic={x[1]==0,y[1]==1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^{2-2 t} (t-1) \\ y(t)\to -e^{2-2 t} (t-2) \\ \end{align*}
Sympy. Time used: 0.098 (sec). Leaf size: 37
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(x(t) - 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 )} = C_{2} t e^{- 2 t} + \left (C_{1} + C_{2}\right ) e^{- 2 t}, \ y{\left (t \right )} = - C_{1} e^{- 2 t} - C_{2} t e^{- 2 t}\right ] \]