14.26.7 problem 7

Internal problem ID [2780]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 3. Systems of differential equations. Section 3.13 (Solving systems by Laplace transform). Page 370
Problem number : 7
Date solved : Tuesday, March 04, 2025 at 02:42:32 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x_{1} \left (t \right )&=4 x_{1} \left (t \right )+5 x_{2} \left (t \right )+4 \,{\mathrm e}^{t} \cos \left (t \right )\\ \frac {d}{d t}x_{2} \left (t \right )&=-2 x_{1} \left (t \right )-2 x_{2} \left (t \right ) \end{align*}

With initial conditions

\begin{align*} x_{1} \left (0\right ) = 1\\ x_{2} \left (0\right ) = 1 \end{align*}

Maple. Time used: 0.021 (sec). Leaf size: 45
ode:=[diff(x__1(t),t) = 4*x__1(t)+5*x__2(t)+4*exp(t)*cos(t), diff(x__2(t),t) = -2*x__1(t)-2*x__2(t)]; 
ic:=x__1(0) = 1x__2(0) = 1; 
dsolve([ode,ic]);
 
\begin{align*} x_{1} \left (t \right ) &= \frac {{\mathrm e}^{t} \left (20 \sin \left (t \right )+12 \sin \left (t \right ) t +2 \cos \left (t \right )+4 \cos \left (t \right ) t \right )}{2} \\ x_{2} \left (t \right ) &= {\mathrm e}^{t} \left (\cos \left (t \right )-5 \sin \left (t \right )-4 \sin \left (t \right ) t \right ) \\ \end{align*}
Mathematica. Time used: 0.015 (sec). Leaf size: 46
ode={D[x1[t],t]==4*x1[t]+5*x2[t]+4*Exp[t]*Cos[t],D[x2[t],t]==-2*x1[t]-2*x2[t]}; 
ic={x1[0]==1,x2[0]==1}; 
DSolve[{ode,ic},{x1[t],x2[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} \text {x1}(t)\to e^t (2 (3 t+5) \sin (t)+(2 t+1) \cos (t)) \\ \text {x2}(t)\to e^t (\cos (t)-(4 t+5) \sin (t)) \\ \end{align*}
Sympy. Time used: 0.168 (sec). Leaf size: 105
from sympy import * 
t = symbols("t") 
x__1 = Function("x__1") 
x__2 = Function("x__2") 
ode=[Eq(-4*x__1(t) - 5*x__2(t) - 4*exp(t)*cos(t) + Derivative(x__1(t), t),0),Eq(2*x__1(t) + 2*x__2(t) + Derivative(x__2(t), t),0)] 
ics = {} 
dsolve(ode,func=[x__1(t),x__2(t)],ics=ics)
 
\[ \left [ x^{1}{\left (t \right )} = 6 t e^{t} \sin {\left (t \right )} + 2 t e^{t} \cos {\left (t \right )} + \left (\frac {C_{1}}{2} + \frac {3 C_{2}}{2}\right ) e^{t} \sin {\left (t \right )} - \left (\frac {3 C_{1}}{2} - \frac {C_{2}}{2}\right ) e^{t} \cos {\left (t \right )} + 2 e^{t} \sin ^{3}{\left (t \right )} + 2 e^{t} \sin {\left (t \right )} \cos ^{2}{\left (t \right )}, \ x^{2}{\left (t \right )} = C_{1} e^{t} \cos {\left (t \right )} - C_{2} e^{t} \sin {\left (t \right )} - 4 t e^{t} \sin {\left (t \right )}\right ] \]