77.1.158 problem 185 (page 297)

Internal problem ID [17977]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 185 (page 297)
Date solved : Monday, March 31, 2025 at 04:53:00 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.177 (sec). Leaf size: 67
ode:=[diff(x(t),t)+x(t)+y(t) = t^2, diff(y(t),t)+y(t)+z(t) = 2*t, diff(z(t),t)+z(t) = t]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= t^{2}+\frac {{\mathrm e}^{-t} c_3 \,t^{2}}{2}-3 t -{\mathrm e}^{-t} c_2 t +3+c_1 \,{\mathrm e}^{-t} \\ y \left (t \right ) &= t -{\mathrm e}^{-t} c_3 t +{\mathrm e}^{-t} c_2 \\ z \left (t \right ) &= t -1+{\mathrm e}^{-t} c_3 \\ \end{align*}
Mathematica. Time used: 0.057 (sec). Leaf size: 76
ode={D[x[t],t]+x[t]+y[t]==t^2,D[y[t],t]+y[t]+z[t]==2*t,D[z[t],t]+z[t]==t}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t],z[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to t^2-3 t+\frac {1}{2} e^{-t} t (c_3 t-2 c_2)+c_1 e^{-t}+3 \\ y(t)\to e^{-t} \left (e^t t-c_3 t+c_2\right ) \\ z(t)\to t+c_3 e^{-t}-1 \\ \end{align*}
Sympy. Time used: 0.209 (sec). Leaf size: 58
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(-t**2 + x(t) + y(t) + Derivative(x(t), t),0),Eq(-2*t + y(t) + z(t) + Derivative(y(t), t),0),Eq(-t + z(t) + Derivative(z(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t),z(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} e^{- t} + C_{2} t e^{- t} + \frac {C_{3} t^{2} e^{- t}}{2} + t^{2} - 3 t + 3, \ y{\left (t \right )} = - C_{2} e^{- t} - C_{3} t e^{- t} + t, \ z{\left (t \right )} = C_{3} e^{- t} + t - 1\right ] \]