65.14.6 problem 26.1 (vi)

Internal problem ID [13743]
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 (vi)
Date solved : Wednesday, March 05, 2025 at 10:14:48 PM
CAS classification : system_of_ODEs

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

With initial conditions

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

Maple. Time used: 0.146 (sec). Leaf size: 59
ode:=[diff(x(t),t) = x(t)+y(t)+exp(-t), diff(y(t),t) = 4*x(t)-2*y(t)+exp(2*t)]; 
ic:=x(0) = 1y(0) = -1; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= \frac {17 \,{\mathrm e}^{-3 t}}{50}+\frac {62 \,{\mathrm e}^{2 t}}{75}+\frac {t \,{\mathrm e}^{2 t}}{5}-\frac {{\mathrm e}^{-t}}{6} \\ y \left (t \right ) &= \frac {77 \,{\mathrm e}^{2 t}}{75}-\frac {34 \,{\mathrm e}^{-3 t}}{25}+\frac {t \,{\mathrm e}^{2 t}}{5}-\frac {2 \,{\mathrm e}^{-t}}{3} \\ \end{align*}
Mathematica. Time used: 0.681 (sec). Leaf size: 67
ode={D[x[t],t]==x[t]+y[t]+Exp[-t],D[y[t],t]==4*x[t]-2*y[t]+Exp[2*t]}; 
ic={x[0]==1,y[0]==-1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {1}{150} e^{-3 t} \left (2 e^{5 t} (15 t+62)-25 e^{2 t}+51\right ) \\ y(t)\to \frac {1}{75} e^{-3 t} \left (e^{5 t} (15 t+77)-50 e^{2 t}-102\right ) \\ \end{align*}
Sympy. Time used: 0.210 (sec). Leaf size: 70
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-x(t) - y(t) + Derivative(x(t), t) - exp(-t),0),Eq(-4*x(t) + 2*y(t) - exp(2*t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - \frac {C_{2} e^{- 3 t}}{4} + \frac {t e^{2 t}}{5} + \left (C_{1} - \frac {1}{25}\right ) e^{2 t} - \frac {e^{- t}}{6}, \ y{\left (t \right )} = C_{2} e^{- 3 t} + \frac {t e^{2 t}}{5} + \left (C_{1} + \frac {4}{25}\right ) e^{2 t} - \frac {2 e^{- t}}{3}\right ] \]