Hi I am confused about the following question. I am trying to understand the conditions for when the rationals intersect the closed interval. I know that $\mathbb{Q}$ is a subset of $\mathbb{R}$ but don't fully grasp how the function is set up.
Let $f \colon[a,b] \to \mathbb{R}$ be defined by $$ f(x) = \begin{cases} 1,& x \in \mathbb{Q} \cap [a,b] \\ -1,& x \in \mathbb{Q}^c \cap [a,b]\end{cases}$$ Determine whether $f$ is Riemann integrable on $[a,b]$.