38.1.19 problem 21

Internal problem ID [8180]
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 : Tuesday, September 30, 2025 at 05:18:19 PM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=\left (x-1\right ) \left (1-2 x\right ) \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 19
ode:=diff(x(t),t) = (x(t)-1)*(1-2*x(t)); 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {-1+{\mathrm e}^{t} c_1}{{\mathrm e}^{t} c_1 -2} \]
Mathematica. Time used: 0.117 (sec). Leaf size: 48
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 \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-1) (2 K[1]-1)}dK[1]\&\right ][-t+c_1]\\ x(t)&\to \frac {1}{2}\\ x(t)&\to 1 \end{align*}
Sympy. Time used: 0.214 (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 )} \]