9.17.1 problem 1

Internal problem ID [3237]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 26, page 115
Problem number : 1
Date solved : Tuesday, September 30, 2025 at 06:30:06 AM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )-x \left (t \right )&=\cos \left (t \right )\\ \frac {d}{d t}y \left (t \right )+y \left (t \right )&=4 t \end{align*}
Maple. Time used: 0.234 (sec). Leaf size: 31
ode:=[diff(x(t),t)-x(t) = cos(t), diff(y(t),t)+y(t) = 4*t]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= -\frac {\cos \left (t \right )}{2}+\frac {\sin \left (t \right )}{2}+{\mathrm e}^{t} c_1 \\ y \left (t \right ) &= 4 t -4+{\mathrm e}^{-t} c_2 \\ \end{align*}
Mathematica. Time used: 0.042 (sec). Leaf size: 39
ode={D[x[t],t]-x[t]==Cos[t],D[y[t],t]+y[t]==4*t}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{2} \left (\sin (t)-\cos (t)+2 c_1 e^t\right )\\ y(t)&\to 4 t+c_2 e^{-t}-4 \end{align*}
Sympy. Time used: 0.140 (sec). Leaf size: 29
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-x(t) - cos(t) + Derivative(x(t), t),0),Eq(-4*t + y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} e^{t} + \frac {\sin {\left (t \right )}}{2} - \frac {\cos {\left (t \right )}}{2}, \ y{\left (t \right )} = C_{2} e^{- t} + 4 t - 4\right ] \]