69.31.9 problem 823

Internal problem ID [18563]
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 23.2 The method of undetermined coefficients. Exercises page 239
Problem number : 823
Date solved : Thursday, October 02, 2025 at 03:14:56 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 )-2 z \left (t \right )+2-t\\ \frac {d}{d t}y \left (t \right )&=1-x \left (t \right )\\ \frac {d}{d t}z \left (t \right )&=x \left (t \right )+y \left (t \right )-z \left (t \right )+1-t \end{align*}
Maple. Time used: 0.170 (sec). Leaf size: 50
ode:=[diff(x(t),t) = 2*x(t)+y(t)-2*z(t)+2-t, diff(y(t),t) = -x(t)+1, diff(z(t),t) = x(t)+y(t)-z(t)+1-t]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= c_1 \sin \left (t \right )-c_2 \,{\mathrm e}^{t}-c_3 \cos \left (t \right ) \\ y \left (t \right ) &= t +c_1 \cos \left (t \right )+c_2 \,{\mathrm e}^{t}+c_3 \sin \left (t \right ) \\ z \left (t \right ) &= 1+c_1 \sin \left (t \right )-c_3 \cos \left (t \right ) \\ \end{align*}
Mathematica. Time used: 0.126 (sec). Leaf size: 401
ode={D[x[t],t]==2*x[t]+y[t]-2*z[t]+2-t,D[y[t],t]==1-x[t],D[z[t],t]==x[t]+y[t]-z[t]+1-t}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \sin (t) \int _1^t\left (2 \cos (K[2])-e^{-K[2]}-K[2] \sin (K[2])+\sin (K[2])\right )dK[2]+\left (e^t+\sin (t)\right ) \int _1^t\left (-K[1] \cos (K[1])+\cos (K[1])+e^{-K[1]}-2 \sin (K[1])\right )dK[1]-\left (e^t+\sin (t)-\cos (t)\right ) \int _1^t(-K[3] \cos (K[3])+\cos (K[3])-2 \sin (K[3]))dK[3]+c_2 \sin (t)+c_1 \left (e^t+\sin (t)\right )-c_3 \left (e^t+\sin (t)-\cos (t)\right )\\ y(t)&\to \cos (t) \int _1^t\left (2 \cos (K[2])-e^{-K[2]}-K[2] \sin (K[2])+\sin (K[2])\right )dK[2]+\left (\cos (t)-e^t\right ) \int _1^t\left (-K[1] \cos (K[1])+\cos (K[1])+e^{-K[1]}-2 \sin (K[1])\right )dK[1]-\left (-e^t+\sin (t)+\cos (t)\right ) \int _1^t(-K[3] \cos (K[3])+\cos (K[3])-2 \sin (K[3]))dK[3]+c_2 \cos (t)+c_1 \left (\cos (t)-e^t\right )-c_3 \left (-e^t+\sin (t)+\cos (t)\right )\\ z(t)&\to (\cos (t)-\sin (t)) \int _1^t(-K[3] \cos (K[3])+\cos (K[3])-2 \sin (K[3]))dK[3]+\sin (t) \int _1^t\left (-K[1] \cos (K[1])+\cos (K[1])+e^{-K[1]}-2 \sin (K[1])\right )dK[1]+\sin (t) \int _1^t\left (2 \cos (K[2])-e^{-K[2]}-K[2] \sin (K[2])+\sin (K[2])\right )dK[2]+c_1 \sin (t)+c_2 \sin (t)+c_3 (\cos (t)-\sin (t)) \end{align*}
Sympy. Time used: 0.145 (sec). Leaf size: 94
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(t - 2*x(t) - y(t) + 2*z(t) + Derivative(x(t), t) - 2,0),Eq(x(t) + Derivative(y(t), t) - 1,0),Eq(t - x(t) - y(t) + z(t) + Derivative(z(t), t) - 1,0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - C_{1} e^{t} - C_{2} \sin {\left (t \right )} + C_{3} \cos {\left (t \right )} + \sin ^{2}{\left (t \right )} + \cos ^{2}{\left (t \right )} - 1, \ y{\left (t \right )} = C_{1} e^{t} - C_{2} \cos {\left (t \right )} - C_{3} \sin {\left (t \right )} + t \sin ^{2}{\left (t \right )} + t \cos ^{2}{\left (t \right )} - \sin ^{2}{\left (t \right )} - \cos ^{2}{\left (t \right )} + 1, \ z{\left (t \right )} = - C_{2} \sin {\left (t \right )} + C_{3} \cos {\left (t \right )} + \sin ^{2}{\left (t \right )} + \cos ^{2}{\left (t \right )}\right ] \]