34.1.4 problem 4

Internal problem ID [6028]
Book : A treatise on ordinary and partial differential equations by William Woolsey Johnson. 1913
Section : Chapter 1, Nature and meaning of a differential equation between two variables. page 12
Problem number : 4
Date solved : Sunday, March 30, 2025 at 10:32:48 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.038 (sec). Leaf size: 33
ode:=diff(y(x),x)^2*(-x^2+1)+1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \ln \left (x +\sqrt {x^{2}-1}\right )+c_1 \\ y &= -\ln \left (x +\sqrt {x^{2}-1}\right )+c_1 \\ \end{align*}
Mathematica. Time used: 0.005 (sec). Leaf size: 41
ode=D[y[x],x]^2*(1-x^2)+1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\log \left (\sqrt {x^2-1}+x\right )+c_1 \\ y(x)\to \log \left (\sqrt {x^2-1}+x\right )+c_1 \\ \end{align*}
Sympy. Time used: 1.035 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - x**2)*Derivative(y(x), x)**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = C_{1} - \begin {cases} \log {\left (x + \sqrt {x^{2} - 1} \right )} & \text {for}\: x > -1 \wedge x < 1 \end {cases}, \ y{\left (x \right )} = C_{1} + \begin {cases} \log {\left (x + \sqrt {x^{2} - 1} \right )} & \text {for}\: x > -1 \wedge x < 1 \end {cases}\right ] \]