78.6.6 problem 3.a

Internal problem ID [21069]
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 7, Nonlinear systems. Problems section 7.11
Problem number : 3.a
Date solved : Thursday, October 02, 2025 at 07:03:17 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=y-y^{2} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=y_{0} \\ \end{align*}
Maple. Time used: 0.044 (sec). Leaf size: 21
ode:=diff(y(x),x) = y(x)-y(x)^2; 
ic:=[y(0) = y__0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {y_{0}}{\left (y_{0} -1\right ) {\mathrm e}^{-x}-y_{0}} \]
Mathematica. Time used: 0.246 (sec). Leaf size: 21
ode=D[y[x],x]==y[x]-y[x]^2; 
ic={y[0]==y0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^x \text {y0}}{\left (e^x-1\right ) \text {y0}+1} \end{align*}
Sympy. Time used: 0.217 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y0 = symbols("y0") 
y = Function("y") 
ode = Eq(y(x)**2 - y(x) + Derivative(y(x), x),0) 
ics = {y(0): y0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {1}{1 + \frac {\left (1 - y_{0}\right ) e^{- x}}{y_{0}}} \]