75.31.10 problem 824

Internal problem ID [17198]
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 : 824
Date solved : Thursday, March 13, 2025 at 09:18:40 AM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )+x \left (t \right )+2 y \left (t \right )&=2 \,{\mathrm e}^{-t}\\ \frac {d}{d t}y \left (t \right )+y \left (t \right )+z \left (t \right )&=1\\ \frac {d}{d t}z \left (t \right )+z \left (t \right )&=1 \end{align*}

With initial conditions

\begin{align*} x \left (0\right ) = 1\\ y \left (0\right ) = 1\\ z \left (0\right ) = 1 \end{align*}

Maple. Time used: 0.181 (sec). Leaf size: 19
ode:=[diff(x(t),t)+x(t)+2*y(t) = 2*exp(-t), diff(y(t),t)+y(t)+z(t) = 1, diff(z(t),t)+z(t) = 1]; 
ic:=x(0) = 1y(0) = 1z(0) = 1; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{-t} \\ y \left (t \right ) &= {\mathrm e}^{-t} \\ z &= 1 \\ \end{align*}
Mathematica. Time used: 0.041 (sec). Leaf size: 22
ode={D[x[t],t]+x[t]+2*y[t]==2*Exp[-t],D[y[t],t]+y[t]+z[t]==1,D[z[t],t]+z[t]==1}; 
ic={x[0]==1,y[0]==1,z[0]==1}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to e^{-t} \\ y(t)\to e^{-t} \\ z(t)\to 1 \\ \end{align*}
Sympy. Time used: 0.197 (sec). Leaf size: 51
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(x(t) + 2*y(t) + Derivative(x(t), t) - 2*exp(-t),0),Eq(y(t) + z(t) + Derivative(y(t), t) - 1,0),Eq(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 )} = 2 C_{1} e^{- t} + C_{3} t^{2} e^{- t} + t \left (2 C_{2} + 2\right ) e^{- t}, \ y{\left (t \right )} = - C_{2} e^{- t} - C_{3} t e^{- t}, \ z{\left (t \right )} = C_{3} e^{- t} + 1\right ] \]