72.4.3 problem 7

Internal problem ID [14609]
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 : 7
Date solved : Monday, March 31, 2025 at 12:43:10 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 )&=2 \end{align*}

Maple. Time used: 1.556 (sec). Leaf size: 149
ode:=diff(y(t),t) = y(t)*(y(t)-1)*(y(t)-3); 
ic:=y(0) = 2; 
dsolve([ode,ic],y(t), singsol=all);
 
\begin{align*} y &= \frac {{\left (\left (1+2 \sqrt {\frac {1}{{\mathrm e}^{-6 t}+4}}\right ) \left (4 \,{\mathrm e}^{6 t}+1\right )^{2}\right )}^{{1}/{3}}}{4 \,{\mathrm e}^{6 t}+1}+\frac {1}{{\left (\left (1+2 \sqrt {\frac {1}{{\mathrm e}^{-6 t}+4}}\right ) \left (4 \,{\mathrm e}^{6 t}+1\right )^{2}\right )}^{{1}/{3}}}+1 \\ y &= 1+\frac {{\left (\left (1+2 \sqrt {\frac {1}{{\mathrm e}^{-6 t}+4}}\right ) \left (4 \,{\mathrm e}^{6 t}+1\right )^{2}\right )}^{{2}/{3}}+4 \,{\mathrm e}^{6 t}+1}{\left (4 \,{\mathrm e}^{6 t}+1\right ) {\left (\left (1+2 \sqrt {\frac {1}{{\mathrm e}^{-6 t}+4}}\right ) \left (4 \,{\mathrm e}^{6 t}+1\right )^{2}\right )}^{{1}/{3}}} \\ \end{align*}
Mathematica. Time used: 0.051 (sec). Leaf size: 105
ode=D[y[t],t]==y[t]*(y[t]-1)*(y[t]-3); 
ic={y[0]==2}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {\sqrt [3]{2 \sqrt {e^{6 t} \left (4 e^{6 t}+1\right )^3}+8 e^{6 t}+16 e^{12 t}+1}}{4 e^{6 t}+1}+\frac {1}{\sqrt [3]{2 \sqrt {e^{6 t} \left (4 e^{6 t}+1\right )^3}+8 e^{6 t}+16 e^{12 t}+1}}+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): 2} 
dsolve(ode,func=y(t),ics=ics)
 
IndexError : list index out of range