10.4.10 problem 12

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

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

Maple. Time used: 0.028 (sec). Leaf size: 49
ode:=diff(y(t),t) = y(t)^2*(4-y(t)^2); 
dsolve(ode,y(t), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left (\ln \left ({\mathrm e}^{\textit {\_Z}}-4\right ) {\mathrm e}^{\textit {\_Z}}+16 c_1 \,{\mathrm e}^{\textit {\_Z}}-\textit {\_Z} \,{\mathrm e}^{\textit {\_Z}}+16 t \,{\mathrm e}^{\textit {\_Z}}-2 \ln \left ({\mathrm e}^{\textit {\_Z}}-4\right )-32 c_1 +2 \textit {\_Z} -32 t +4\right )}-2 \]
Mathematica. Time used: 0.251 (sec). Leaf size: 57
ode=D[y[t],t] == y[t]^2*(4-y[t]^2); 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to \text {InverseFunction}\left [\frac {1}{4 \text {$\#$1}}+\frac {1}{16} \log (2-\text {$\#$1})-\frac {1}{16} \log (\text {$\#$1}+2)\&\right ][-t+c_1] \\ y(t)\to -2 \\ y(t)\to 0 \\ y(t)\to 2 \\ \end{align*}
Sympy. Time used: 0.393 (sec). Leaf size: 26
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq((y(t)**2 - 4)*y(t)**2 + Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ t + \frac {\log {\left (y{\left (t \right )} - 2 \right )}}{16} - \frac {\log {\left (y{\left (t \right )} + 2 \right )}}{16} + \frac {1}{4 y{\left (t \right )}} = C_{1} \]