10.4.7 problem 9

Internal problem ID [1188]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.5. Page 88
Problem number : 9
Date solved : Tuesday, March 04, 2025 at 12:17:40 PM
CAS classification : [_quadrature]

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

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