To solve the integral \( \int \sqrt{\frac{x-1}{x+1}} \, dx \), we will follow a systematic approach.
### Step-by-Step Solution:
1. **Rewrite the Integral**:
We start with the integral:
\[
I = \int \sqrt{\frac{x-1}{x+1}} \, dx
\]
2. **Multiply by the Denominator**:
To simplify the expression under the square root, we can multiply both the numerator and the denominator by \( \sqrt{x+1} \):
\[
I = \int \frac{\sqrt{x-1} \cdot \sqrt{x+1}}{x+1} \, dx
\]
3. **Simplify the Square Root**:
This can be rewritten as:
\[
I = \int \frac{\sqrt{(x-1)(x+1)}}{x+1} \, dx = \int \frac{\sqrt{x^2 - 1}}{x+1} \, dx
\]
4. **Separate the Integral**:
We can separate this integral into two parts:
\[
I = \int \frac{x \, dx}{\sqrt{x^2 - 1}} - \int \frac{dx}{\sqrt{x^2 - 1}}
\]
5. **Substitution for the First Integral**:
For the first integral, let \( z^2 = x^2 - 1 \). Then, differentiating gives:
\[
2z \, dz = 2x \, dx \quad \Rightarrow \quad x \, dx = z \, dz
\]
Thus, we can rewrite the first integral as:
\[
\int \frac{z \, dz}{\sqrt{z^2}} = \int z \, dz = \frac{z^2}{2} = \frac{x^2 - 1}{2}
\]
6. **Evaluate the Second Integral**:
The second integral is a standard form:
\[
-\int \frac{dx}{\sqrt{x^2 - 1}} = -\ln |x + \sqrt{x^2 - 1}|
\]
7. **Combine the Results**:
Putting it all together, we have:
\[
I = \frac{x^2 - 1}{2} - \ln |x + \sqrt{x^2 - 1}| + C
\]
### Final Result:
Thus, the integral evaluates to:
\[
\int \sqrt{\frac{x-1}{x+1}} \, dx = \frac{x^2 - 1}{2} - \ln |x + \sqrt{x^2 - 1}| + C
\]