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!
 A: Write 
$$ \int \frac{ dx}{\sqrt{x^2 - x }} = \int  \frac{ dx}{\sqrt{\left(x - \frac{1}{2}\right)^2 - \left( \frac{1}{2}\right)^2}} =  \int \frac{dz}{\sqrt{z^2 - \left( \frac{1}{2}\right)^2}}=\cdots$$
A: $$
\displaylines{
  \sqrt {x^2  - x}  = t + x \cr 
   \Leftrightarrow x^2  - x = t^2  + 2xt + x^2  \cr 
   \Leftrightarrow  - x = t^2  + 2xt \cr 
   - x = \frac{{t^2 }}{{1 + 2t}} \Rightarrow  - dx = \frac{{2\left( {t^2  + 1} \right)}}{{\left( {1 + 2t} \right)^2 }}dt \cr 
  \frac{{dx}}{{\sqrt {x^2  - x} }} =  - \frac{{\frac{{2\left( {t^2  + 1} \right)}}{{\left( {1 + 2t} \right)^2 }}dt}}{{t - \frac{{t^2 }}{{1 + 2t}}}} \cr 
   = \frac{{2\left( {t^2  + 1} \right)dt}}{{t\left( {1 + 2t} \right)\left( {t + 1} \right)}} \cr 
  \frac{{2\left( {t^2  + 1} \right)}}{{t\left( {1 + 2t} \right)\left( {t + 1} \right)}} = \frac{\alpha }{t} + \frac{\beta }{{t + 1}} + \frac{\lambda }{{1 + 2t}} \cr}
$$
$$\displaylines{
  \frac{{2\left( {t^2  + 1} \right)}}{{t\left( {1 + 2t} \right)\left( {t + 1} \right)}} = \frac{\alpha }{t} + \frac{\beta }{{t + 1}} + \frac{\lambda }{{1 + 2t}} \cr 
   = \frac{{\lambda \left( {t^2  + t} \right) + \beta \left( {2t^2  + t} \right) + \alpha \left( {2t^2  + 3t + 1} \right)}}{{t\left( {1 + 2t} \right)\left( {t + 1} \right)}} \cr 
   = \frac{{t^2 \left( {\lambda  + 2\beta  + 2\alpha } \right) + t\left( {\lambda  + \beta  + 3\alpha } \right) + \alpha }}{{t\left( {1 + 2t} \right)\left( {t + 1} \right)}} \cr 
   \Rightarrow \left\{ \begin{array}{l}
 \alpha  = 2 \\ 
 \lambda  + \beta  + 6 = 0 \\ 
 .\lambda  + 2\beta  + 4 = 2 \\ 
 \end{array} \right. \Rightarrow \left\{ \begin{array}{l}
 \alpha  = 2 \\ 
 \beta  = 4 \\ 
 \lambda  =  - 10 \\ 
 \end{array} \right. \cr}
$$
$$
\int {\frac{{2\left( {t^2  + 1} \right)dt}}{{t\left( {1 + 2t} \right)\left( {t + 1} \right)}}}  = 2\ln \left( t \right) + 4\ln \left( {1 + t} \right) - 5\ln \left( {1 + 2t} \right)
$$
$$\int {\frac{{dx}}{{\sqrt {x^2  - x} }}}  = \ln \left( {\frac{{\left( { - x + \sqrt {x^2  - x} } \right)^2 \left( {1 + \left( { - x + \sqrt {x^2  - x} } \right)} \right)^4 }}{{\left( {1 + 2\left( { - x + \sqrt {x^2  - x} } \right)} \right)^5 }}} \right)$$
A: $x^2-x\ge0\iff x\not\in(0,1)$. Thus, we need to choose whether $x\ge1$ or $x\le0$.

For $x\ge1$, let $x=u+\frac12$ and $u=\frac12\sec(\theta)$. We can assume that $\theta\in[0,\frac\pi2)$ since that gives a full range for $x\ge1$. As is shown in this answer, $\int\sec(\theta)\,\mathrm{d}\theta=\log(\sec(\theta)+\tan(\theta))+C$. Therefore,
$$
\begin{align}
\int\frac{\mathrm{d}x}{\sqrt{x^2-x}}
&=\int\frac{\mathrm{d}u}{\sqrt{u^2-\frac14}}\\
&=\int\frac{\sec(\theta)\tan(\theta)\,\mathrm{d}\theta}{\tan(\theta)}\\[9pt]
&=\log(\sec(\theta)+\tan(\theta))+C\\[9pt]
&=\log\left(2x-1+2\sqrt{x^2-x}\right)+C
\end{align}
$$
Since $2x-1+2\sqrt{x^2-x}\ge0$ for all $x\ge1$, absolute values are not needed.

For $x\le0$, we can assume $\theta\in(\frac\pi2,\pi]$. Then, we get
$$
\int\frac{\mathrm{d}x}{\sqrt{x^2-x}}=\log\left(1-2x-2\sqrt{x^2-x}\right)+C
$$
Since $1-2x-2\sqrt{x^2-x}\ge0$ for all $x\le0$, absolute values are not needed.

The absolute values are needed only if we want to try to give a solution for all $x\not\in(0,1)$. However, since the interval of integration cannot span $(0,1)$, we must have either $x\ge1$ or $x\le0$.

Since you have stated that $x\lt0$ in your question, that means we can use the solution for $x\lt0$:
$$
\int\frac{\mathrm{d}x}{\sqrt{x^2-x}}=\log\left(1-2x-2\sqrt{x^2-x}\right)+C
$$
and we can solve for $x$. If
$$
u=\log\left(1-2x-2\sqrt{x^2-x}\right)
$$
Then
$$
\begin{align}
e^u&=1-2x-2\sqrt{x^2-x}\\
\left(e^u+2x-1\right)^2&=4x^2-4x\\
e^{2u}+(4x-2)e^u+1&=0\\
x&=\frac12-\frac{e^u+e^{-u}}4\\
&=\frac12(1-\cosh(u))
\end{align}
$$
A: setting $$\sqrt{x^2-x}=t+x$$ we obtain $$x=-\frac{t^2}{2t+1}$$ and $$dx=-\frac{2t(1+t)}{(1+2t)^2}dt$$ and our integral is $$-2\int\frac{1}{2t+1}dt$$ 
A: $\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)}$$
A: $$\int \frac{dx}{\sqrt{x^2-x}} = \int \frac{dx}{\sqrt{\left(x-\frac{1}{2}\right)^2 - \frac{1}{4}}}$$
Setting $ x - \frac{1}{2} = t $
$$ \int \frac{dx}{\sqrt{\left(x-\frac{1}{2}\right)^2 - \frac{1}{4}}} = \int \frac{dt}{\sqrt{t^2 - \frac{1}{4}}} $$
It's possible to do this using a trig substitution, but if you want the inverse function, a better way is to use a hyperbolic substitution. Let $t = \frac{1}{2}\cosh u \Rightarrow dt = \frac{1}{2} \sinh u$
$$ \int \frac{dt}{\sqrt{t^2 - \frac{1}{4}}} = \int \frac{\frac{1}{2}\sinh u \, du}{\sqrt{\frac{1}{4}(\cosh^2 u - 1)}} = \int \frac{\frac{1}{2}\sinh u \, du}{\frac{1}{2}\sinh u} = \int du = u + C $$
Working backwards is easy since you already have $t$ as a function of $u$
$$t = \frac{1}{2}\cosh u \Rightarrow x = \frac{1}{2}\cosh u + \frac{1}{2}$$
Where $u$ is the integral in question
A: I'm guessing a bit as to what the OP means, but I think he or she started with the differential equation
$${dx\over dt}=\sqrt{x^2-x}$$
and wishes to find $x$ as a function of $t$.  The formalism
$${dx\over\sqrt{x^2-x}}=dt$$
leads to 
$$\int{dx\over\sqrt{x^2-x}}=\int dt=t+C$$
so that what the OP cites from the table of integrals says
$$\ln\left|2x-1+2\sqrt{x^2-x}\right|=t+C$$
and this is what the OP wants to solve for $x$.  
I'm going to stop at this point until I hear (in a comment) that this is indeed what the OP means.
