65.3.6 problem 3 (F)

Internal problem ID [15643]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.1, page 40
Problem number : 3 (F)
Date solved : Thursday, October 02, 2025 at 10:21:38 AM
CAS classification : [_quadrature]

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