65.14.3 problem 26.1 (iii)

Internal problem ID [13740]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 26, Explicit solutions of coupled linear systems. Exercises page 257
Problem number : 26.1 (iii)
Date solved : Wednesday, March 05, 2025 at 10:14:44 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )&=2 x \left (t \right )+2 y \left (t \right )\\ \frac {d}{d t}y \left (t \right )&=6 x \left (t \right )+3 y \left (t \right )+{\mathrm e}^{t} \end{align*}

With initial conditions

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

Maple. Time used: 0.049 (sec). Leaf size: 41
ode:=[diff(x(t),t) = 2*x(t)+2*y(t), diff(y(t),t) = 6*x(t)+3*y(t)+exp(t)]; 
ic:=x(0) = 0y(0) = 1; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= -\frac {{\mathrm e}^{-t}}{7}+\frac {12 \,{\mathrm e}^{6 t}}{35}-\frac {{\mathrm e}^{t}}{5} \\ y \left (t \right ) &= \frac {3 \,{\mathrm e}^{-t}}{14}+\frac {24 \,{\mathrm e}^{6 t}}{35}+\frac {{\mathrm e}^{t}}{10} \\ \end{align*}
Mathematica. Time used: 0.064 (sec). Leaf size: 58
ode={D[x[t],t]==2*x[t]+2*y[t],D[y[t],t]==6*x[t]+3*y[t]+Exp[t]}; 
ic={x[0]==0,y[0]==1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {1}{35} e^{-t} \left (-7 e^{2 t}+12 e^{7 t}-5\right ) \\ y(t)\to \frac {1}{70} e^{-t} \left (7 e^{2 t}+48 e^{7 t}+15\right ) \\ \end{align*}
Sympy. Time used: 0.163 (sec). Leaf size: 42
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-2*x(t) - 2*y(t) + Derivative(x(t), t),0),Eq(-6*x(t) - 3*y(t) - exp(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - \frac {2 C_{1} e^{- t}}{3} + \frac {C_{2} e^{6 t}}{2} - \frac {e^{t}}{5}, \ y{\left (t \right )} = C_{1} e^{- t} + C_{2} e^{6 t} + \frac {e^{t}}{10}\right ] \]