14.20.2 problem 2

Internal problem ID [2699]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.14, The method of elimination for systems. Excercises page 258
Problem number : 2
Date solved : Sunday, March 30, 2025 at 12:15:08 AM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.134 (sec). Leaf size: 41
ode:=[diff(x(t),t) = -2*x(t)+y(t)+t, diff(y(t),t) = -4*x(t)+3*y(t)-1]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= {\mathrm e}^{-t} c_2 +{\mathrm e}^{2 t} c_1 +\frac {3 t}{2}-\frac {3}{4} \\ y \left (t \right ) &= {\mathrm e}^{-t} c_2 +4 \,{\mathrm e}^{2 t} c_1 +2 t \\ \end{align*}
Mathematica. Time used: 2.081 (sec). Leaf size: 190
ode={D[x[t],t]==-2*x[t]-y[t]+t,D[y[t],t]==-4*x[t]+3*y[t]-1}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {3 t}{10}+\frac {1}{82} \left (\left (41-5 \sqrt {41}\right ) c_1-2 \sqrt {41} c_2\right ) e^{\frac {1}{2} \left (1+\sqrt {41}\right ) t}+\frac {1}{82} \left (\left (41+5 \sqrt {41}\right ) c_1+2 \sqrt {41} c_2\right ) e^{\frac {1}{2} \left (t-\sqrt {41} t\right )}-\frac {23}{100} \\ y(t)\to \frac {2 t}{5}+\frac {1}{82} \left (8 \sqrt {41} c_1+\left (41-5 \sqrt {41}\right ) c_2\right ) e^{\frac {1}{2} \left (t-\sqrt {41} t\right )}+\frac {1}{82} \left (\left (41+5 \sqrt {41}\right ) c_2-8 \sqrt {41} c_1\right ) e^{\frac {1}{2} \left (1+\sqrt {41}\right ) t}+\frac {4}{25} \\ \end{align*}
Sympy. Time used: 0.167 (sec). Leaf size: 41
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-t + 2*x(t) - y(t) + Derivative(x(t), t),0),Eq(4*x(t) - 3*y(t) + Derivative(y(t), t) + 1,0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} e^{- t} + \frac {C_{2} e^{2 t}}{4} + \frac {3 t}{2} - \frac {3}{4}, \ y{\left (t \right )} = C_{1} e^{- t} + C_{2} e^{2 t} + 2 t\right ] \]