<s>[INST] Indefinite integral of $\sqrt{x^2-x}$ i was trying to compute the indefinite integral:
$$
\int\sqrt{x^2-x}dx
$$
but i got stuck: after a few (unsuccessful) attempts for some $u$-substitution, i tried integration by parts:
$$
\int\sqrt{x^2-x} \ dx=\int(x)'\sqrt{x^2-x} \ dx= \\ x\sqrt{x^2-x}-\int x(\sqrt{x^2-x})'dx= \\
=x\sqrt{x^2-x}-\frac{1}{2}\int x\frac{2x-1}{\sqrt{x^2-x}}dx= \\
=x\sqrt{x^2-x}-\int \frac{x^2}{\sqrt{x^2-x}}dx+\frac{1}{2}\int \frac{x}{\sqrt{x^2-x}}dx=...
$$
and now what? Can anybody help? 
 [/INST] complete the square
$$\begin{align}
\int\sqrt{x^2-x} \ dx &=I \\
x^2-x&=\left(x-\frac{1}{2}\right)^2-\frac{1}{4} \\
\text{set} \quad u&=x-\frac{1}{2} \quad \text{then} \quad dx=du\\
I&=\int\sqrt{u^2-a} \ du \quad \text{such that} \quad a=\frac{1}{4}\\
\end{align}$$
This type of integral is well known.  You should now use a trig substitution.
</s>