78.6.9 problem 3.d

Internal problem ID [21072]
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.d
Date solved : Thursday, October 02, 2025 at 07:03:20 PM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} y \left (0\right )&=-{\frac {1}{2}} \\ \end{align*}
Maple. Time used: 0.038 (sec). Leaf size: 16
ode:=diff(y(x),x) = y(x)-y(x)^2; 
ic:=[y(0) = -1/2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {1}{3 \,{\mathrm e}^{-x}-1} \]
Mathematica. Time used: 0.005 (sec). Leaf size: 16
ode=D[y[x],x]==y[x]-y[x]^2; 
ic={y[0]==-1/2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^x}{e^x-3} \end{align*}
Sympy. Time used: 0.212 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)**2 - y(x) + Derivative(y(x), x),0) 
ics = {y(0): -1/2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {1}{1 - 3 e^{- x}} \]