72.4.4 problem 8

Internal problem ID [14610]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 1. First-Order Differential Equations. Exercises section 1.5 page 71
Problem number : 8
Date solved : Monday, March 31, 2025 at 12:43:23 PM
CAS classification : [_quadrature]

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

With initial conditions

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

Maple. Time used: 0.556 (sec). Leaf size: 131
ode:=diff(y(t),t) = y(t)*(y(t)-1)*(y(t)-3); 
ic:=y(0) = -1; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {\left (2 \,{\mathrm e}^{6 t}-4\right ) \left (1-{\mathrm e}^{6 t}+\sqrt {{\mathrm e}^{6 t} \left ({\mathrm e}^{6 t}-2\right )}\right )^{{2}/{3}}+\left (\left (i \sqrt {3}-1\right ) \left (1-{\mathrm e}^{6 t}+\sqrt {{\mathrm e}^{6 t} \left ({\mathrm e}^{6 t}-2\right )}\right )^{{1}/{3}}-i \sqrt {3}-1\right ) \left ({\mathrm e}^{6 t}-\sqrt {{\mathrm e}^{6 t} \left ({\mathrm e}^{6 t}-2\right )}-2\right )}{\left (1-{\mathrm e}^{6 t}+\sqrt {{\mathrm e}^{6 t} \left ({\mathrm e}^{6 t}-2\right )}\right )^{{2}/{3}} \left (2 \,{\mathrm e}^{6 t}-4\right )} \]
Mathematica. Time used: 0.041 (sec). Leaf size: 104
ode=D[y[t],t]==y[t]*(y[t]-1)*(y[t]-3); 
ic={y[0]==-1}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {\sqrt [3]{2 \sqrt {e^{6 t} \left (e^{6 t}-2\right )^3}+8 e^{6 t}-2 e^{12 t}-8}}{e^{6 t}-2}-\frac {2^{2/3}}{\sqrt [3]{\sqrt {e^{6 t} \left (e^{6 t}-2\right )^3}+4 e^{6 t}-e^{12 t}-4}}+1 \]
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq((3 - y(t))*(y(t) - 1)*y(t) + Derivative(y(t), t),0) 
ics = {y(0): -1} 
dsolve(ode,func=y(t),ics=ics)
 
IndexError : list index out of range