To find the domain of the function \( y = \sqrt{\frac{x-2}{x+1}} \), we need to ensure that the expression inside the square root is non-negative, as the square root of a negative number is not defined in the real number system.
### Step-by-Step Solution:
1. **Set up the inequality**:
We need to find when the expression inside the square root is greater than or equal to zero:
\[
\frac{x-2}{x+1} \geq 0
\]
2. **Identify critical points**:
The critical points occur when the numerator or denominator is zero.
- The numerator \( x - 2 = 0 \) gives \( x = 2 \).
- The denominator \( x + 1 = 0 \) gives \( x = -1 \).
3. **Test intervals**:
We will test the sign of the expression in the intervals defined by these critical points:
- \( (-\infty, -1) \)
- \( (-1, 2) \)
- \( (2, \infty) \)
4. **Choose test points**:
- For \( x < -1 \) (e.g., \( x = -2 \)):
\[
\frac{-2-2}{-2+1} = \frac{-4}{-1} = 4 \quad (\text{positive})
\]
- For \( -1 < x < 2 \) (e.g., \( x = 0 \)):
\[
\frac{0-2}{0+1} = \frac{-2}{1} = -2 \quad (\text{negative})
\]
- For \( x > 2 \) (e.g., \( x = 3 \)):
\[
\frac{3-2}{3+1} = \frac{1}{4} \quad (\text{positive})
\]
5. **Determine the intervals**:
From the tests:
- The expression is positive in the intervals \( (-\infty, -1) \) and \( (2, \infty) \).
- The expression is negative in the interval \( (-1, 2) \).
6. **Include critical points**:
- At \( x = 2 \), the expression equals zero, so it is included in the domain.
- At \( x = -1 \), the expression is undefined (division by zero), so it is excluded.
7. **Write the domain**:
The domain of the function is:
\[
(-\infty, -1) \cup [2, \infty)
\]
### Final Answer:
The domain of the function \( y = \sqrt{\frac{x-2}{x+1}} \) is:
\[
(-\infty, -1) \cup [2, \infty)
\]