85.83.14 problem 6

Internal problem ID [23011]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 10. Systems of differential equations and their applications. A Exercises at page 444
Problem number : 6
Date solved : Sunday, October 12, 2025 at 05:55:05 AM
CAS classification : system_of_ODEs

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

With initial conditions

\begin{align*} x \left (0\right )&=2 \\ D\left (x \right )\left (0\right )&=-1 \\ y \left (0\right )&=-{\frac {9}{2}} \\ D\left (y \right )\left (0\right )&=-{\frac {7}{2}} \\ \end{align*}
Maple. Time used: 0.298 (sec). Leaf size: 62
ode:=[diff(diff(x(t),t),t)+diff(y(t),t)+x(t) = y(t)+sin(t), diff(diff(y(t),t),t)+diff(x(t),t)-y(t) = 2*t^2-x(t)]; 
ic:=[x(0) = 2, D(x)(0) = -1, y(0) = -9/2, D(y)(0) = -7/2]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= 1-\sin \left (t \right )-2 t^{2}+\frac {2 t^{3}}{3}-\frac {t^{4}}{6}+{\mathrm e}^{-t}+t \\ y \left (t \right ) &= -\frac {t^{4}}{6}-4 t^{2}+{\mathrm e}^{t}+{\mathrm e}^{-t}-\frac {\sin \left (t \right )}{2}-\frac {\cos \left (t \right )}{2}-3 t -6 \\ \end{align*}
Mathematica. Time used: 0.513 (sec). Leaf size: 76
ode={D[x[t],{t,2}]+D[y[t],t]+x[t]==y[t]+Sin[t],D[y[t],{t,2}]+D[x[t],t]-y[t]==2*t^2-x[t]}; 
ic={x[0]==2,Derivative[1][x][0] ==-1,y[0]==-9/2,Derivative[1][y][0] ==-7/2}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -\frac {t^4}{6}+\frac {2 t^3}{3}-2 t^2+t+e^{-t}-\sin (t)+1\\ y(t)&\to -\frac {t^4}{6}-4 t^2-3 t+e^{-t}+e^t-\frac {\sin (t)}{2}-\frac {\cos (t)}{2}-6 \end{align*}
Sympy. Time used: 0.471 (sec). Leaf size: 66
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(x(t) - y(t) - sin(t) + Derivative(x(t), (t, 2)) + Derivative(y(t), t),0),Eq(-2*t**2 + x(t) - y(t) + Derivative(x(t), t) + Derivative(y(t), (t, 2)),0)] 
ics = {x(0): 2, Subs(Derivative(x(t), t), t, 0): -1, y(0): -9/2, Subs(Derivative(y(t), t), t, 0): -7/2} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - \frac {t^{4}}{6} + \frac {2 t^{3}}{3} - 2 t^{2} + t - \sin {\left (t \right )} + 1 + e^{- t}, \ y{\left (t \right )} = - \frac {t^{4}}{6} - 4 t^{2} - 3 t + e^{t} - \frac {\sin {\left (t \right )}}{2} - \frac {\cos {\left (t \right )}}{2} - 6 + e^{- t}\right ] \]