29.15.22 problem 430

Internal problem ID [5028]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 430
Date solved : Sunday, March 30, 2025 at 06:30:52 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.001 (sec). Leaf size: 29
ode:=y(x)*diff(y(x),x) = (y(x)^2-a^2)^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ x +\frac {\left (a -y\right ) \left (y+a \right )}{\sqrt {y^{2}-a^{2}}}+c_1 = 0 \]
Mathematica. Time used: 0.237 (sec). Leaf size: 51
ode=y[x] D[y[x],x]==Sqrt[y[x]^2-a^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {a^2+(x+c_1){}^2} \\ y(x)\to \sqrt {a^2+(x+c_1){}^2} \\ y(x)\to -a \\ y(x)\to a \\ \end{align*}
Sympy. Time used: 1.652 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-sqrt(-a**2 + y(x)**2) + y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {C_{1}^{2} + 2 C_{1} x + a^{2} + x^{2}}, \ y{\left (x \right )} = \sqrt {C_{1}^{2} + 2 C_{1} x + a^{2} + x^{2}}\right ] \]