85.92.10 problem 2 (d)

Internal problem ID [23059]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 11. Matrix eigenvalue methods for systems of linear differential equations. A Exercises at page 528
Problem number : 2 (d)
Date solved : Thursday, October 02, 2025 at 09:18:26 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )+2 x \left (t \right )-y \left (t \right )&=100 \sin \left (t \right )\\ \frac {d}{d t}y \left (t \right )-4 x \left (t \right )-y \left (t \right )&=36 t \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=-8 \\ y \left (0\right )&=-21 \\ \end{align*}
Maple. Time used: 0.133 (sec). Leaf size: 45
ode:=[diff(x(t),t)+2*x(t)-y(t) = 100*sin(t), diff(y(t),t)-4*x(t)-y(t) = 36*t]; 
ic:=[x(0) = -8, y(0) = -21]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= 5 \,{\mathrm e}^{-3 t}-1+16 \sin \left (t \right )-12 \cos \left (t \right )-6 t \\ y \left (t \right ) &= -5 \,{\mathrm e}^{-3 t}-8-12 t -8 \cos \left (t \right )-56 \sin \left (t \right ) \\ \end{align*}
Mathematica. Time used: 0.232 (sec). Leaf size: 48
ode={D[x[t],{t,1}]+2*x[t]-y[t]==100*Sin[t], D[y[t],{t,1}]-4*x[t]-y[t]==36*t}; 
ic={x[0]==-8,y[0]==-21}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -6 t+5 e^{-3 t}+16 \sin (t)-12 \cos (t)-1\\ y(t)&\to -12 t-5 e^{-3 t}-56 \sin (t)-8 \cos (t)-8 \end{align*}
Sympy. Time used: 0.375 (sec). Leaf size: 49
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(2*x(t) - y(t) - 100*sin(t) + Derivative(x(t), t),0),Eq(-36*t - 4*x(t) - y(t) + Derivative(y(t), t),0)] 
ics = {x(0): -8, y(0): -21} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - 6 t + 16 \sin {\left (t \right )} - 12 \cos {\left (t \right )} - 1 + 5 e^{- 3 t}, \ y{\left (t \right )} = - 12 t - 56 \sin {\left (t \right )} - 8 \cos {\left (t \right )} - 8 - 5 e^{- 3 t}\right ] \]