75.29.4 problem 805

Internal problem ID [17179]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 3 (Systems of differential equations). Section 22. Integration of homogeneous linear systems with constant coefficients. Eulers method. Exercises page 230
Problem number : 805
Date solved : Thursday, March 13, 2025 at 09:18:19 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 )&=4 y \left (t \right )-2 x \left (t \right ) \end{align*}

With initial conditions

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

Maple. Time used: 0.035 (sec). Leaf size: 29
ode:=[diff(x(t),t) = x(t)+y(t), diff(y(t),t) = 4*y(t)-2*x(t)]; 
ic:=x(0) = 0y(0) = -1; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= -{\mathrm e}^{3 t}+{\mathrm e}^{2 t} \\ y \left (t \right ) &= -2 \,{\mathrm e}^{3 t}+{\mathrm e}^{2 t} \\ \end{align*}
Mathematica. Time used: 0.004 (sec). Leaf size: 33
ode={D[x[t],t]==x[t]+y[t],D[y[t],t]==4*y[t]-2*x[t]}; 
ic={x[0]==0,y[0]==-1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to -e^{2 t} \left (e^t-1\right ) \\ y(t)\to e^{2 t}-2 e^{3 t} \\ \end{align*}
Sympy. Time used: 0.078 (sec). Leaf size: 32
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) - 4*y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} e^{2 t} + \frac {C_{2} e^{3 t}}{2}, \ y{\left (t \right )} = C_{1} e^{2 t} + C_{2} e^{3 t}\right ] \]