44.1.19 problem 21

Internal problem ID [6894]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Exercises 1.1 at page 12
Problem number : 21
Date solved : Wednesday, March 05, 2025 at 02:49:48 AM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=\left (x-1\right ) \left (1-2 x\right ) \end{align*}

Maple. Time used: 0.012 (sec). Leaf size: 19
ode:=diff(x(t),t) = (x(t)-1)*(1-2*x(t)); 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = \frac {-1+c_{1} {\mathrm e}^{t}}{c_{1} {\mathrm e}^{t}-2} \]
Mathematica. Time used: 0.785 (sec). Leaf size: 40
ode=D[x[t],t]==(x[t]-1)*(1-2*x[t]); 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \frac {e^t-e^{c_1}}{e^t-2 e^{c_1}} \\ x(t)\to \frac {1}{2} \\ x(t)\to 1 \\ \end{align*}
Sympy. Time used: 0.421 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq((x(t) - 1)*(2*x(t) - 1) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {e^{C_{1} - t} - 2}{2 \left (e^{C_{1} - t} - 1\right )} \]