72.1.19 problem 22

Internal problem ID [14540]
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.2. page 33
Problem number : 22
Date solved : Thursday, March 13, 2025 at 03:33:02 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.073 (sec). Leaf size: 24
ode:=diff(y(t),t) = y(t)^2-4; 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {-2 \,{\mathrm e}^{4 t} c_{1} -2}{-1+{\mathrm e}^{4 t} c_{1}} \]
Mathematica. Time used: 0.182 (sec). Leaf size: 42
ode=D[y[t],t]==y[t]^2-4; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-2) (K[1]+2)}dK[1]\&\right ][t+c_1] \\ y(t)\to -2 \\ y(t)\to 2 \\ \end{align*}
Sympy. Time used: 0.606 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-y(t)**2 + Derivative(y(t), t) + 4,0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \frac {2}{\tanh {\left (C_{1} - 2 t \right )}} \]