<s>[INST] How to evaluate $\int x \sqrt{x^2 - x}\ dx$ 
Problem is to integrate $ x \sqrt{x^2 - x}$.

My attempt:
I made it ready for a substitution $u = x^2 - x$
$$\begin{aligned} \int x \sqrt{x^2  -x}\ dx &= \int (2x-1)\sqrt{x^2 - x} \ dx - \int(x - 1)\sqrt{x^2 - x}\ dx\\& = \int \sqrt u\ du  - \int(x - 1)\sqrt{x^2 - x}\ dx\\& = \frac23(x^2 -x)^{3/2} + C_1 - \int(x-1) \sqrt{x^2 -x}\ dx\end{aligned}$$
I don't know how to continue from here.

Alternatively I tried this:
$$\begin{aligned} \int x \sqrt{x^2 - x}\ dx &= \int x^2 \sqrt{1- \frac{1}{x}}dx\\ & \overset{1- \frac1x = t^2}{=} \int  \frac{2t^2}{(1-t^2)^4}\ dt\\& \overset{t =\sin(\theta)}{=} \int \frac{2\sin^2(\theta) \cos(\theta)\ d\theta}{\cos^4(\theta)}\\& = \int 2 \tan(\theta)\tan(\theta) \sec(\theta) \ d\theta\\ & = \int 2\sqrt{\sec^2(\theta) - 1}\tan(\theta) \sec(\theta) \ d\theta\\& \overset{\sec(\theta) = u}{=} \int 2 \sqrt{\sec^2(\theta) - 1}\tan(\theta) \sec(\theta) \ d\theta\\& = \int 2 \sqrt{u^2 - 1}\ du\\& = u \sqrt{u^2 - 1} - \ln|u + \sqrt{u^2- 1}| + C\\& = \sqrt{x^2 - x} - \ln|x + \sqrt{x^2 - x}| + C\end{aligned}$$
This method is very tedious. Is there any easy way to do the original integral?
 [/INST] $$
\begin{aligned}
I & =\int x \sqrt{x^2-x} d x \\
& =\int\left(\frac{2 x-1}{2}+\frac{1}{2}\right) \sqrt{x^2-x} d x \\
& =\frac{1}{2} \int \sqrt{x^2-x} d\left(x^2-x\right)+\frac{1}{2} \int \sqrt{x^2-x} d x \\
& =\frac{1}{3}\left(x^2-x\right)^{\frac{3}{2}}+\frac{1}{2} \underbrace{\int \sqrt{\left(x-\frac{1}{2}\right)^2-\frac{1}{4}} d x}_{J}
\end{aligned}
$$
Let $x-\frac{1}{2}=\frac{1}{2} \sec \theta$ and using integration by parts, then
$$
\begin{aligned}
J & =\frac{1}{4} \int \tan ^2 \theta \sec \theta d \theta \\
& =\frac{1}{8}(\tan \theta \sec \theta-\ln |\tan \theta+\sec \theta \mid)+C
\end{aligned}
$$
Plugging back $x$ yields
$$
I=\frac{1}{3}\left(x^2-x\right)^{\frac{3}{2}}+\frac{1}{16}\left[2(2 x-1) \sqrt{x^2-x}-\ln \left|2 \sqrt{x^2-x}+2 x-1\right|\right]+C
$$
</s>