60.9.23 problem 1878

Internal problem ID [11802]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 8, system of first order odes
Problem number : 1878
Date solved : Sunday, March 30, 2025 at 09:15:42 PM
CAS classification : system_of_ODEs

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

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