83.50.4 problem Ex 7 page 150

Internal problem ID [19571]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter IX. Simultaneous equations
Problem number : Ex 7 page 150
Date solved : Monday, March 31, 2025 at 07:33:49 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.174 (sec). Leaf size: 38
ode:=[t*diff(x(t),t) = t-2*x(t), t*diff(y(t),t) = t*x(t)+t*y(t)+2*x(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.056 (sec). Leaf size: 39
ode={t*D[x[t],t]==t-2*x[t],t*D[y[t],t]==t*x[t]+t*y[t]+2*x[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.240 (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*x(t) - t*y(t) + t*Derivative(y(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 ] \]