if f is Riemann integrable over a set S, is f still Riemann integrable if we remove a subset Q where $ Q\subset S$ Let f be a mapping $R^n \to R$. I was wondering, if f is Riemann integrable over a set S, is f still Riemann integrable if we remove a subset Q where $ Q\subset S$. If this is Lebesgue integration, I don't think this is true. Every measurable set has a non-measurable set, so if we remove the complement of the non-measurable set from S, we would be integration over a non-measurable set which is not even defined for Lebesgue integral. Now, I don't think we can Riemann integral over non-measurable sets, so the answer is that we are not allowed to just remove anything from S and still have f be Riemann integrable. Is this correct?
 A: For an arbitrary set $E \subset \mathbb{R}^n$,  the Riemann integral of a bounded function is defined as
$$\int_E f = \int_R f \chi_E$$
where the indicator function is defined as $\chi_E(x) = \begin{cases}1, & x \in E\\ 0, & x \not\in E \end{cases}$ and $R$ is any rectangle such that $E \subset R$.
You will find this definition in any good book that treats multivariable integration such as Analysis on Manifolds by Munkres or Calculus on Manifolds by Spivak.  The integral is well defined (if it exists) as it can be proved that the value is independent of the choice of the containing rectangle.
The Riemann integral exists if and only if the set of points where $f$ fails to be continuous has measure zero.  Even if $f$ is Riemann integrable on $R$ and the set of discontinuity points in $R$ has measure zero, it is possible that $f$ is not integrable on $E\subset R$.  Since $f\chi_E$ vanishes outside of $E$, then $f\chi_E$ will be discontinuous at all points $a$ on the boundary of $E$ where $f(x) \not\to 0$ as $x \to a$ from within $E$. If the measure of the set of such points is not of measure zero, then $f$ will  not be Riemann integrable on $E$.
In this case, if $f$ is Riemann integrable on $S$, then $\int_R f \chi_S$ exists for any rectangle $R \supset S$.  The integral over $S \setminus Q$ is then given by
$$\int_{S\setminus Q}f = \int_R f \chi_{S\setminus Q},$$
and a sufficient condition for existence is that the boundary of $S\setminus Q$ has measure zero.
For an example where the Rieman integral over $S$ exists but the integral over $S\setminus Q$ does not, take $f \equiv 1$, $S = [0,1]$ and $Q = \mathbb{Q}\cap [0,1]$. The set $S\setminus Q$ in this case consists of the irrational points in $[0,1]$ and the boundary is the entire interval $[0,1]$ since the irrationals are dense. The Riemann integral over $S \setminus Q$ does not exist as $f\chi_{S \setminus Q}$ is the Dirichlet discontinmuous function which is discontinuous at every point in the boundary set $[0,1]$ and this set has nonzero measure.
