78.1.4 problem 1.d

Internal problem ID [20930]
Book : A FIRST COURSE IN DIFFERENTIAL EQUATIONS FOR SCIENTISTS AND ENGINEERS. By Russell Herman. University of North Carolina Wilmington. LibreText. compiled on 06/09/2025
Section : Chapter 1, First order ODEs. Problems section 1.5
Problem number : 1.d
Date solved : Thursday, October 02, 2025 at 06:49:24 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=2 \\ \end{align*}
Maple. Time used: 0.088 (sec). Leaf size: 14
ode:=x*diff(y(x),x) = y(x)*(1-2*y(x)); 
ic:=[y(1) = 2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {2 x}{4 x -3} \]
Mathematica. Time used: 0.17 (sec). Leaf size: 15
ode=x*D[y[x],x]==y[x]*(1-2*y[x]); 
ic={y[1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {2 x}{4 x-3} \end{align*}
Sympy. Time used: 0.178 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - (1 - 2*y(x))*y(x),0) 
ics = {y(1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x}{2 \left (x - \frac {3}{4}\right )} \]