76.10.12 problem 12

Internal problem ID [17463]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 3. Systems of two first order equations. Section 3.6 (A brief introduction to nonlinear systems). Problems at page 195
Problem number : 12
Date solved : Monday, March 31, 2025 at 04:14:22 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.140 (sec). Leaf size: 49
ode:=[diff(x(t),t) = 3*x(t)-x(t)^2, diff(y(t),t) = 2*x(t)*y(t)-3*y(t)+2]; 
dsolve(ode);
 
\begin{align*} \left \{x \left (t \right ) &= \frac {3}{1+3 \,{\mathrm e}^{-3 t} c_2}\right \} \\ \{y \left (t \right ) &= \left (\int 2 \,{\mathrm e}^{-\int \left (2 x \left (t \right )-3\right )d t}d t +c_1 \right ) {\mathrm e}^{\int \left (2 x \left (t \right )-3\right )d t}\} \\ \end{align*}
Mathematica. Time used: 0.08 (sec). Leaf size: 133
ode={D[x[t],t]==3*x[t]-x[t]^2,D[y[t],t]==2*x[t]*y[t]-3*y[t]+2}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-3) K[1]}dK[1]\&\right ][-t+c_1] \\ y(t)\to \exp \left (\int _1^t\left (2 \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-3) K[1]}dK[1]\&\right ][c_1-K[2]]-3\right )dK[2]\right ) \left (\int _1^t2 \exp \left (-\int _1^{K[3]}\left (2 \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-3) K[1]}dK[1]\&\right ][c_1-K[2]]-3\right )dK[2]\right )dK[3]+c_2\right ) \\ \end{align*}
Sympy. Time used: 0.485 (sec). Leaf size: 71
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(x(t)**2 - 3*x(t) + Derivative(x(t), t),0),Eq(-2*x(t)*y(t) + 3*y(t) + Derivative(y(t), t) - 2,0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = \frac {3 e^{3 C_{2} + 3 t}}{e^{3 C_{2} + 3 t} - 1}, \ y{\left (t \right )} = \frac {\frac {C_{1} \left (e^{3 C_{2} + 3 t} - 1\right ) e^{- 3 C_{2} - 3 t}}{3} - 2}{-3 + \frac {3 e^{3 C_{2} + 3 t}}{e^{3 C_{2} + 3 t} - 1}}\right ] \]