To evaluate the integral \( I = \int \frac{x-1}{\sqrt{x^2 - x}} \, dx \), we can follow these steps:
### Step 1: Rewrite the Integral
We start with the integral:
\[
I = \int \frac{x-1}{\sqrt{x^2 - x}} \, dx
\]
### Step 2: Simplify the Numerator
We can express \( x - 1 \) in a different form. Notice that:
\[
x - 1 = \frac{2x - 2}{2} = \frac{2(x - 1)}{2} = \frac{2x - 1 - 1}{2}
\]
Thus, we can rewrite the integral as:
\[
I = \int \frac{1}{2} \left( \frac{2x - 1}{\sqrt{x^2 - x}} - \frac{1}{\sqrt{x^2 - x}} \right) \, dx
\]
### Step 3: Split the Integral
Now we can split the integral into two parts:
\[
I = \frac{1}{2} \int \frac{2x - 1}{\sqrt{x^2 - x}} \, dx - \frac{1}{2} \int \frac{1}{\sqrt{x^2 - x}} \, dx
\]
### Step 4: Substitution for the First Integral
Let \( y = x^2 - x \). Then, the derivative \( dy = (2x - 1) \, dx \). Thus, we can rewrite the first integral:
\[
\int \frac{2x - 1}{\sqrt{x^2 - x}} \, dx = \int \frac{1}{\sqrt{y}} \, dy
\]
This evaluates to:
\[
2\sqrt{y} + C_1 = 2\sqrt{x^2 - x} + C_1
\]
### Step 5: Evaluate the Second Integral
For the second integral, we have:
\[
\int \frac{1}{\sqrt{x^2 - x}} \, dx
\]
This integral can be simplified further. We rewrite \( x^2 - x \) as:
\[
x^2 - x = \left( x - \frac{1}{2} \right)^2 - \frac{1}{4}
\]
Thus, we can use the formula for the integral of the form \( \int \frac{1}{\sqrt{x^2 - a^2}} \, dx \):
\[
\int \frac{1}{\sqrt{\left( x - \frac{1}{2} \right)^2 - \left( \frac{1}{2} \right)^2}} \, dx = \ln \left| x - \frac{1}{2} + \sqrt{\left( x - \frac{1}{2} \right)^2 - \frac{1}{4}} \right| + C_2
\]
### Step 6: Combine the Results
Combining both parts, we get:
\[
I = \frac{1}{2} \left( 2\sqrt{x^2 - x} \right) - \frac{1}{2} \ln \left| x - \frac{1}{2} + \sqrt{\left( x - \frac{1}{2} \right)^2 - \frac{1}{4}} \right| + C
\]
This simplifies to:
\[
I = \sqrt{x^2 - x} - \frac{1}{2} \ln \left| x - \frac{1}{2} + \sqrt{\left( x - \frac{1}{2} \right)^2 - \frac{1}{4}} \right| + C
\]
### Final Answer
Thus, the evaluated integral is:
\[
I = \sqrt{x^2 - x} - \frac{1}{2} \ln \left| x - \frac{1}{2} + \sqrt{\left( x - \frac{1}{2} \right)^2 - \frac{1}{4}} \right| + C
\]