59.2.4 problem 7.1 (iv)

Internal problem ID [14998]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 7, Scalar autonomous ODEs. Exercises page 56
Problem number : 7.1 (iv)
Date solved : Thursday, October 02, 2025 at 09:58:15 AM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=-x \left (1-x\right ) \left (2-x\right ) \end{align*}
Maple. Time used: 0.226 (sec). Leaf size: 22
ode:=diff(x(t),t) = -x(t)*(-x(t)+1)*(2-x(t)); 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {{\mathrm e}^{t} c_1}{\sqrt {-1+{\mathrm e}^{2 t} c_1^{2}}}+1 \]
Mathematica. Time used: 23.945 (sec). Leaf size: 159
ode=D[x[t],t]==-x[t]*(1-x[t])*(2-x[t]); 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {e^{2 t}-\sqrt {e^{4 t}+e^{2 (t+c_1)}}+e^{2 c_1}}{e^{2 t}+e^{2 c_1}}\\ x(t)&\to \frac {e^{2 t}+\sqrt {e^{4 t}+e^{2 (t+c_1)}}+e^{2 c_1}}{e^{2 t}+e^{2 c_1}}\\ x(t)&\to 0\\ x(t)&\to 1\\ x(t)&\to 2\\ x(t)&\to 1-e^{-2 t} \sqrt {e^{4 t}}\\ x(t)&\to e^{-2 t} \sqrt {e^{4 t}}+1 \end{align*}
Sympy. Time used: 1.320 (sec). Leaf size: 75
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq((1 - x(t))*(2 - x(t))*x(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ \left [ x{\left (t \right )} = \frac {C_{1} - \sqrt {- \left (C_{1} - e^{2 t}\right ) e^{2 t}} - e^{2 t}}{C_{1} - e^{2 t}}, \ x{\left (t \right )} = \frac {\sqrt {- \left (e^{2 C_{1}} - e^{2 t}\right ) e^{2 t}} + e^{2 C_{1}} - e^{2 t}}{e^{2 C_{1}} - e^{2 t}}\right ] \]