72.4.1 problem 5

Internal problem ID [14607]
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 : 5
Date solved : Monday, March 31, 2025 at 12:42:47 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 )&=4 \end{align*}

Maple. Time used: 0.596 (sec). Leaf size: 187
ode:=diff(y(t),t) = y(t)*(y(t)-1)*(y(t)-3); 
ic:=y(0) = 4; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {32 \,{\mathrm e}^{6 t} \left (27-32 \,{\mathrm e}^{6 t}+8 \sqrt {16 \,{\mathrm e}^{12 t}-27 \,{\mathrm e}^{6 t}}\right )^{{2}/{3}}+288 \,{\mathrm e}^{6 t}-72 \sqrt {16 \,{\mathrm e}^{12 t}-27 \,{\mathrm e}^{6 t}}-81 \left (27-32 \,{\mathrm e}^{6 t}+8 \sqrt {16 \,{\mathrm e}^{12 t}-27 \,{\mathrm e}^{6 t}}\right )^{{1}/{3}}-54 \left (27-32 \,{\mathrm e}^{6 t}+8 \sqrt {16 \,{\mathrm e}^{12 t}-27 \,{\mathrm e}^{6 t}}\right )^{{2}/{3}}-3 \left (27-32 \,{\mathrm e}^{6 t}+8 \sqrt {16 \,{\mathrm e}^{12 t}-27 \,{\mathrm e}^{6 t}}\right )^{{4}/{3}}-486}{\left (27-32 \,{\mathrm e}^{6 t}+8 \sqrt {16 \,{\mathrm e}^{12 t}-27 \,{\mathrm e}^{6 t}}\right )^{{2}/{3}} \left (32 \,{\mathrm e}^{6 t}-54\right )} \]
Mathematica. Time used: 0.095 (sec). Leaf size: 132
ode=D[y[t],t]==y[t]*(y[t]-1)*(y[t]-3); 
ic={y[0]==4}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {3 i \left (\sqrt {3}+i\right ) \sqrt [3]{4 \sqrt {e^{6 t} \left (16 e^{6 t}-27\right )^3}+864 e^{6 t}-256 e^{12 t}-729}}{32 e^{6 t}-54}+\frac {9 \left (1+i \sqrt {3}\right )}{2 \sqrt [3]{4 \sqrt {e^{6 t} \left (16 e^{6 t}-27\right )^3}+864 e^{6 t}-256 e^{12 t}-729}}+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): 4} 
dsolve(ode,func=y(t),ics=ics)
 
IndexError : list index out of range