10.4.8 problem 10

Internal problem ID [1189]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.5. Page 88
Problem number : 10
Date solved : Saturday, March 29, 2025 at 10:45:17 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=diff(y(t),t) = y(t)*(1-y(t)^2); 
dsolve(ode,y(t), singsol=all);
 
\begin{align*} y &= \frac {1}{\sqrt {{\mathrm e}^{-2 t} c_1 +1}} \\ y &= -\frac {1}{\sqrt {{\mathrm e}^{-2 t} c_1 +1}} \\ \end{align*}
Mathematica. Time used: 0.666 (sec). Leaf size: 100
ode=D[y[t],t]== y[t]*(1-y[t]^2); 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to -\frac {e^t}{\sqrt {e^{2 t}+e^{2 c_1}}} \\ y(t)\to \frac {e^t}{\sqrt {e^{2 t}+e^{2 c_1}}} \\ y(t)\to -1 \\ y(t)\to 0 \\ y(t)\to 1 \\ y(t)\to -\frac {e^t}{\sqrt {e^{2 t}}} \\ y(t)\to \frac {e^t}{\sqrt {e^{2 t}}} \\ \end{align*}
Sympy. Time used: 1.015 (sec). Leaf size: 39
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq((y(t)**2 - 1)*y(t) + Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ \left [ y{\left (t \right )} = - \sqrt {- \frac {e^{2 t}}{C_{1} - e^{2 t}}}, \ y{\left (t \right )} = \sqrt {- \frac {e^{2 t}}{C_{1} - e^{2 t}}}\right ] \]