82.20.1 problem Ex. 1

Internal problem ID [18782]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter IV. Singular solutions. problems at page 45
Problem number : Ex. 1
Date solved : Monday, March 31, 2025 at 06:14:25 PM
CAS classification : [_quadrature]

\begin{align*} y^{2} \left (1+{y^{\prime }}^{2}\right )&=r^{2} \end{align*}

Maple. Time used: 0.098 (sec). Leaf size: 54
ode:=y(x)^2*(1+diff(y(x),x)^2) = r^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -r \\ y &= r \\ y &= \sqrt {-c_1^{2}+2 c_1 x +r^{2}-x^{2}} \\ y &= -\sqrt {\left (r +x -c_1 \right ) \left (c_1 +r -x \right )} \\ \end{align*}
Mathematica. Time used: 60.034 (sec). Leaf size: 55
ode=y[x]^2*(1+D[y[x],x])^2==r^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -r \left (1+W\left (-\frac {e^{-\frac {r-x+c_1}{r}}}{r}\right )\right ) \\ y(x)\to r \left (1+W\left (\frac {e^{-\frac {r+x+c_1}{r}}}{r}\right )\right ) \\ \end{align*}
Sympy. Time used: 3.614 (sec). Leaf size: 85
from sympy import * 
x = symbols("x") 
r = symbols("r") 
y = Function("y") 
ode = Eq(-r**2 + (Derivative(y(x), x)**2 + 1)*y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {- C_{1}^{2} + 2 C_{1} x + r^{2} - x^{2}}, \ y{\left (x \right )} = \sqrt {- C_{1}^{2} + 2 C_{1} x + r^{2} - x^{2}}, \ y{\left (x \right )} = - \sqrt {- C_{1}^{2} - 2 C_{1} x + r^{2} - x^{2}}, \ y{\left (x \right )} = \sqrt {- C_{1}^{2} - 2 C_{1} x + r^{2} - x^{2}}\right ] \]