75.31.5 problem 819

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

\begin{align*} \frac {d}{d t}x \left (t \right )&=4 x \left (t \right )-5 y \left (t \right )+4 t -1\\ \frac {d}{d t}y \left (t \right )&=x \left (t \right )-2 y \left (t \right )+t \end{align*}

With initial conditions

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

Maple. Time used: 0.050 (sec). Leaf size: 11
ode:=[diff(x(t),t) = 4*x(t)-5*y(t)+4*t-1, diff(y(t),t) = x(t)-2*y(t)+t]; 
ic:=x(0) = 0y(0) = 0; 
dsolve([ode,ic]);
 
\begin{align*} x \left (t \right ) &= -t \\ y \left (t \right ) &= 0 \\ \end{align*}
Mathematica. Time used: 0.202 (sec). Leaf size: 240
ode={D[x[t],t]==4*x[t]-5*y[t]+4*t-1,D[y[t],t]==x[t]-2*y[t]+t}; 
ic={x[0]==0,y[0]==0}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {1}{16} e^{-4 t} \left (20 e^{3 t} \left (e^{4 t}-1\right ) \int _1^0\frac {1}{4} e^{-3 K[1]} \left (3 K[1]+e^{4 K[1]} (K[1]+1)-1\right )dK[1]-20 e^{3 t} \left (e^{4 t}-1\right ) \int _1^t\frac {1}{4} e^{-3 K[1]} \left (3 K[1]+e^{4 K[1]} (K[1]+1)-1\right )dK[1]+\left (-26 e^{4 t}+5 e^{8 t}+5\right ) t\right ) \\ y(t)\to \frac {1}{16} e^{-4 t} \left (e^{4 t}-5\right ) \left (4 e^{3 t} \int _1^0\frac {1}{4} e^{-3 K[1]} \left (3 K[1]+e^{4 K[1]} (K[1]+1)-1\right )dK[1]-4 e^{3 t} \int _1^t\frac {1}{4} e^{-3 K[1]} \left (3 K[1]+e^{4 K[1]} (K[1]+1)-1\right )dK[1]+\left (e^{4 t}-1\right ) t\right ) \\ \end{align*}
Sympy. Time used: 0.178 (sec). Leaf size: 31
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-4*t - 4*x(t) + 5*y(t) + Derivative(x(t), t) + 1,0),Eq(-t - x(t) + 2*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} + 5 C_{2} e^{3 t} - t, \ y{\left (t \right )} = C_{1} e^{- t} + C_{2} e^{3 t}\right ] \]