28.2.6 problem 6

Internal problem ID [7171]
Book : A treatise on ordinary and partial differential equations by William Woolsey Johnson. 1913
Section : Chapter 2, Equations of the first order and degree. page 20
Problem number : 6
Date solved : Tuesday, September 30, 2025 at 04:24:54 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }+b^{2} y^{2}&=a^{2} \end{align*}
Maple. Time used: 0.028 (sec). Leaf size: 16
ode:=diff(y(x),x)+b^2*y(x)^2 = a^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {a \coth \left (a b \left (c_1 +x \right )\right )}{b} \]
Mathematica. Time used: 0.125 (sec). Leaf size: 56
ode=D[y[x],x]+b^2*y[x]^2==a^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(a-b K[1]) (a+b K[1])}dK[1]\&\right ][x+c_1]\\ y(x)&\to -\frac {a}{b}\\ y(x)&\to \frac {a}{b} \end{align*}
Sympy. Time used: 0.535 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a**2 + b**2*y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {a}{b \tanh {\left (a b \left (C_{1} + x\right ) \right )}} \]