84.41.2 problem 31.2

Internal problem ID [22384]
Book : Schaums outline series. Differential Equations By Richard Bronson. 1973. McGraw-Hill Inc. ISBN 0-07-008009-7
Section : Chapter 31. Solutions of linear systems with constant coefficients. Solved problems. Page 194
Problem number : 31.2
Date solved : Thursday, October 02, 2025 at 08:38:06 PM
CAS classification : system_of_ODEs

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

With initial conditions

\begin{align*} x \left (0\right )&=1 \\ y \left (0\right )&=-4 \\ \end{align*}
Maple. Time used: 0.051 (sec). Leaf size: 41
ode:=[diff(x(t),t) = y(t), diff(y(t),t) = 8*x(t)-2*y(t)+exp(t)]; 
ic:=[x(0) = 1, y(0) = -4]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= \frac {{\mathrm e}^{2 t}}{6}+\frac {31 \,{\mathrm e}^{-4 t}}{30}-\frac {{\mathrm e}^{t}}{5} \\ y \left (t \right ) &= \frac {{\mathrm e}^{2 t}}{3}-\frac {62 \,{\mathrm e}^{-4 t}}{15}-\frac {{\mathrm e}^{t}}{5} \\ \end{align*}
Mathematica. Time used: 0.032 (sec). Leaf size: 58
ode={D[x[t],t]==y[t],D[y[t],t]==8*x[t]-2*y[t]+Exp[t]}; 
ic={x[0]==1,y[0]==-4}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{30} e^{-4 t} \left (-6 e^{5 t}+5 e^{6 t}+31\right )\\ y(t)&\to \frac {1}{15} e^{-4 t} \left (-3 e^{5 t}+5 e^{6 t}-62\right ) \end{align*}
Sympy. Time used: 0.149 (sec). Leaf size: 44
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-y(t) + Derivative(x(t), t),0),Eq(-8*x(t) + 2*y(t) - exp(t) + Derivative(y(t), t),0)] 
ics = {x(0): 1, y(0): -4} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = \frac {e^{2 t}}{6} - \frac {e^{t}}{5} + \frac {31 e^{- 4 t}}{30}, \ y{\left (t \right )} = \frac {e^{2 t}}{3} - \frac {e^{t}}{5} - \frac {62 e^{- 4 t}}{15}\right ] \]