44.5.54 problem 47 (d)

Internal problem ID [7116]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.2 Separable equations. Exercises 2.2 at page 53
Problem number : 47 (d)
Date solved : Wednesday, March 05, 2025 at 04:11:53 AM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} y \left (0\right )&=-2 \end{align*}

Maple. Time used: 0.023 (sec). Leaf size: 16
ode:=diff(y(x),x) = y(x)-y(x)^3; 
ic:=y(0) = -2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {2}{\sqrt {4-3 \,{\mathrm e}^{-2 x}}} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 23
ode=D[y[x],x]==y[x]-y[x]^3; 
ic={y[0]==-2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {2 e^x}{\sqrt {4 e^{2 x}-3}} \]
Sympy. Time used: 0.955 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)**3 - y(x) + Derivative(y(x), x),0) 
ics = {y(0): -2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \sqrt {- \frac {e^{2 x}}{\frac {3}{4} - e^{2 x}}} \]