<s>[INST] Integral of $\frac{1}{\sqrt{x^2-x}}dx$ For a differential equation I have to solve the integral $\frac{dx}{\sqrt{x^2-x}}$. I eventually have to write the solution in the form $ x = ...$ It doesn't matter if I solve the integral myself or if I use a table to find the integral. However, the only helpful integral in an integral table I could find was:
$$\frac{dx}{\sqrt{ax^2+bx+c}} = \frac{1}{\sqrt{a}} \ln \left|2ax + b +2\sqrt{a\left({ax^2+bx+c}\right)}\right|$$
Which would in my case give:
$$\frac{dx}{\sqrt{x^2-x}} = \ln \left|2x -1 + 2\sqrt{x^2-x}\right|$$
Which has me struggling with the absolute value signs as I need to extract x from the solution. All I know is that $x<0$ which does not seem to help me either (the square root will only be real if $x<-1$). 
Is there some other formula for solving this integral which does not involve absolute value signs or which makes extracting $x$ from the solution somewhat easier? Thanks!
 [/INST] $\sqrt{x}=z \implies\dfrac{dx}{2\sqrt{x}}=dz$
$\displaystyle\int\dfrac{dx}{\sqrt{x^2-x}}=\displaystyle\int\dfrac{dx}{\sqrt{x(x-1)}}=2\displaystyle\int\dfrac{ dz}{\sqrt{z^2-1}}$
$z=\sec \theta \implies dz=\sec \theta \tan \theta\ d\theta$
$\therefore \displaystyle\int\dfrac{ dz}{\sqrt{z^2-1}}=\displaystyle\int{\sec \theta \ d\theta}=\ln \left\lvert \sec\theta+\tan \theta\right\rvert+C$
$\therefore \displaystyle\int\dfrac{dx}{\sqrt{x^2-x}}=2\ln \left\lvert \sqrt{x}+\sqrt{x-1}\right\rvert+C'$
$$\color{blue}{\forall x \geq 1,\  \ln \left\lvert \sqrt{x}+\sqrt{x-1}\right\rvert=\ln \left( \sqrt{x}+\sqrt{x-1}\right)}$$
</s>