To solve the problem, we need to analyze the function \( f: [a, b] \to \mathbb{R} \) defined such that:
- \( f(x) \) is rational for irrational \( x \)
- \( f(x) \) is irrational for rational \( x \)
We need to determine the continuity of the function \( f \) over the interval \([a, b]\).
### Step-by-Step Solution:
1. **Understanding the Function**:
- We know that the rationals (\( \mathbb{Q} \)) and irrationals (\( \mathbb{R} \setminus \mathbb{Q} \)) are dense in the real numbers. This means that in any interval, no matter how small, there are both rational and irrational numbers.
2. **Choosing a Point**:
- Let \( c \) be any point in the interval \([a, b]\). We will analyze the continuity of \( f \) at this point \( c \).
3. **Case Analysis**:
- **Case 1**: If \( c \) is rational (\( c \in \mathbb{Q} \)):
- By the definition of \( f \), since \( c \) is rational, \( f(c) \) is irrational.
- Now consider a sequence of irrational numbers \( x_n \) converging to \( c \). For each \( x_n \), \( f(x_n) \) is rational.
- Thus, \( \lim_{n \to \infty} f(x_n) \) is the limit of rational numbers, which is rational.
- Therefore, \( \lim_{x \to c} f(x) \) does not equal \( f(c) \) (since \( f(c) \) is irrational). Hence, \( f \) is discontinuous at \( c \).
- **Case 2**: If \( c \) is irrational (\( c \in \mathbb{R} \setminus \mathbb{Q} \)):
- By the definition of \( f \), since \( c \) is irrational, \( f(c) \) is rational.
- Now consider a sequence of rational numbers \( y_n \) converging to \( c \). For each \( y_n \), \( f(y_n) \) is irrational.
- Thus, \( \lim_{n \to \infty} f(y_n) \) is the limit of irrational numbers, which is irrational.
- Therefore, \( \lim_{x \to c} f(x) \) does not equal \( f(c) \) (since \( f(c) \) is rational). Hence, \( f \) is also discontinuous at \( c \).
4. **Conclusion**:
- Since \( c \) was chosen arbitrarily in \([a, b]\) and we found that \( f \) is discontinuous at both rational and irrational points, we conclude that \( f \) is discontinuous everywhere in the interval \([a, b]\).
### Final Answer:
The function \( f \) is discontinuous everywhere in \([a, b]\).
---