75.27.5 problem 780

Internal problem ID [17162]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 3 (Systems of differential equations). Section 20. The method of elimination. Exercises page 212
Problem number : 780
Date solved : Thursday, March 13, 2025 at 09:18:06 AM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.056 (sec). Leaf size: 36
ode:=[4*diff(x(t),t)-diff(y(t),t)+3*x(t) = sin(t), diff(x(t),t)+y(t) = cos(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= \frac {{\mathrm e}^{-3 t} c_{2}}{3}+{\mathrm e}^{-t} c_{1} \\ y \left (t \right ) &= {\mathrm e}^{-3 t} c_{2} +{\mathrm e}^{-t} c_{1} +\cos \left (t \right ) \\ \end{align*}
Mathematica. Time used: 0.056 (sec). Leaf size: 289
ode={4*D[x[t],t]-D[y[t],t]+3*x[t]==Sin[t],D[x[t],t]+y[t]==Cos[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {1}{2} e^{-3 t} \left (\left (3 e^{2 t}-1\right ) \int _1^t\frac {1}{2} e^{K[1]} \left (\left (-1+3 e^{2 K[1]}\right ) \cos (K[1])-\left (-1+e^{2 K[1]}\right ) \sin (K[1])\right )dK[1]-\left (e^{2 t}-1\right ) \int _1^t\frac {1}{2} e^{K[2]} \left (\left (-1+9 e^{2 K[2]}\right ) \cos (K[2])+\left (1-3 e^{2 K[2]}\right ) \sin (K[2])\right )dK[2]+3 c_1 e^{2 t}-c_2 e^{2 t}-c_1+c_2\right ) \\ y(t)\to \frac {1}{2} e^{-3 t} \left (3 \left (e^{2 t}-1\right ) \int _1^t\frac {1}{2} e^{K[1]} \left (\left (-1+3 e^{2 K[1]}\right ) \cos (K[1])-\left (-1+e^{2 K[1]}\right ) \sin (K[1])\right )dK[1]-\left (e^{2 t}-3\right ) \int _1^t\frac {1}{2} e^{K[2]} \left (\left (-1+9 e^{2 K[2]}\right ) \cos (K[2])+\left (1-3 e^{2 K[2]}\right ) \sin (K[2])\right )dK[2]+3 c_1 e^{2 t}-c_2 e^{2 t}-3 c_1+3 c_2\right ) \\ \end{align*}
Sympy. Time used: 0.237 (sec). Leaf size: 32
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(3*x(t) - sin(t) + 4*Derivative(x(t), t) - Derivative(y(t), t),0),Eq(y(t) - cos(t) + Derivative(x(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} e^{- t} + \frac {C_{2} e^{- 3 t}}{3}, \ y{\left (t \right )} = C_{1} e^{- t} + C_{2} e^{- 3 t} + \cos {\left (t \right )}\right ] \]