31.6.3 problem 3

Internal problem ID [5752]
Book : Differential Equations, By George Boole F.R.S. 1865
Section : Chapter 7
Problem number : 3
Date solved : Tuesday, March 04, 2025 at 11:34:51 PM
CAS classification : [_quadrature]

\begin{align*} {y^{\prime }}^{2}&=\frac {1-x}{x} \end{align*}

Maple. Time used: 0.043 (sec). Leaf size: 45
ode:=diff(y(x),x)^2 = (1-x)/x; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= \sqrt {-x \left (x -1\right )}+\frac {\arcsin \left (2 x -1\right )}{2}+c_{1} \\ y \left (x \right ) &= -\sqrt {-x \left (x -1\right )}-\frac {\arcsin \left (2 x -1\right )}{2}+c_{1} \\ \end{align*}
Mathematica. Time used: 0.178 (sec). Leaf size: 51
ode=(D[y[x],x])^2==(1-x)/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\arcsin \left (\sqrt {x}\right )-\sqrt {-((x-1) x)}+c_1 \\ y(x)\to \arcsin \left (\sqrt {x}\right )+\sqrt {-((x-1) x)}+c_1 \\ \end{align*}
Sympy. Time used: 1.355 (sec). Leaf size: 116
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x)**2 - (1 - x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = C_{1} + \begin {cases} i \sqrt {x} \sqrt {x - 1} - i \operatorname {acosh}{\left (\sqrt {x} \right )} & \text {for}\: \left |{x}\right | > 1 \\- \frac {x^{\frac {3}{2}}}{\sqrt {1 - x}} + \frac {\sqrt {x}}{\sqrt {1 - x}} + \operatorname {asin}{\left (\sqrt {x} \right )} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = C_{1} - \begin {cases} i \sqrt {x} \sqrt {x - 1} - i \operatorname {acosh}{\left (\sqrt {x} \right )} & \text {for}\: \left |{x}\right | > 1 \\- \frac {x^{\frac {3}{2}}}{\sqrt {1 - x}} + \frac {\sqrt {x}}{\sqrt {1 - x}} + \operatorname {asin}{\left (\sqrt {x} \right )} & \text {otherwise} \end {cases}\right ] \]