7.23.10 problem 10

Internal problem ID [596]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 5. Linear systems of differential equations. Section 5.2 (Applications). Problems at page 345
Problem number : 10
Date solved : Tuesday, March 04, 2025 at 11:27:26 AM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )+2 \frac {d}{d t}y \left (t \right )&=4 x \left (t \right )+5 y \left (t \right )\\ 2 \frac {d}{d t}x \left (t \right )-\frac {d}{d t}y \left (t \right )&=3 x \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.016 (sec). Leaf size: 13
ode:=[diff(x(t),t)+2*diff(y(t),t) = 4*x(t)+5*y(t), 2*diff(x(t),t)-diff(y(t),t) = 3*x(t)]; 
ic:=x(0) = 1y(0) = -1; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{t} \\ y \left (t \right ) &= -{\mathrm e}^{t} \\ \end{align*}
Mathematica. Time used: 0.003 (sec). Leaf size: 16
ode={D[x[t],t]+2*D[y[t],t]==4*x[t]+5*y[t],2*D[x[t],t]-D[y[t],t]==3*x[t]}; 
ic={x[0]==1,y[0]==-1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^t \\ y(t)\to -e^t \\ \end{align*}
Sympy. Time used: 0.095 (sec). Leaf size: 27
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-4*x(t) - 5*y(t) + Derivative(x(t), t) + 2*Derivative(y(t), t),0),Eq(-3*x(t) + 2*Derivative(x(t), t) - Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - C_{1} e^{t} + C_{2} e^{3 t}, \ y{\left (t \right )} = C_{1} e^{t} + C_{2} e^{3 t}\right ] \]