72.5.5 problem 2 and 14(i)

Internal problem ID [14620]
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.6 page 89
Problem number : 2 and 14(i)
Date solved : Monday, March 31, 2025 at 12:43:54 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=y^{2}-4 y-12 \end{align*}

With initial conditions

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

Maple. Time used: 0.095 (sec). Leaf size: 23
ode:=diff(y(t),t) = y(t)^2-4*y(t)-12; 
ic:=y(0) = 1; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {18-10 \,{\mathrm e}^{8 t}}{5 \,{\mathrm e}^{8 t}+3} \]
Mathematica. Time used: 0.012 (sec). Leaf size: 26
ode=D[y[t],t]==y[t]^2-4*y[t]-12; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {18-10 e^{8 t}}{5 e^{8 t}+3} \]
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-y(t)**2 + 4*y(t) + Derivative(y(t), t) + 12,0) 
ics = {y(0): 1} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants