Is a continuous function $\mathbb{R}^{n} \rightarrow \mathbb{R}$ on a compact set Riemann integrable? From the standpoint of the higher dimensional Riemann Integral:
For a general bounded set, $S$, that is not a rectangle, the convention is to integrate $f$ over $S$ by first subsuming $S$ within some rectangle $Q$ and then integrating $f_{S}$ (the characteristic function of $f$ with respect to $S$; ie $f(x) = f$ for $x \in S$ and $f(x) = 0$ for $x \not \in S$) over $Q$.
As a consequence, $f_{S}$ is integrable over this rectangle $iff$ the set $E$ of points $x_{0} \in \delta(S)$ for which $$\lim_{x \to x_{0}}f(x) \not = 0$$ is measure zero.
Here $\delta(S)$ is the border of $S$.
That is,
$$m(\{x_{0} \in \delta(S) | \lim_{x \to x_{0}}f(x) \not = 0 \}) = 0$$
A continuous function may, thus, fail to be integrable over a compact set, if $E$ is not measure zero. Could someone propose an example of such an instance?
 A: Consider an enumeration $\{q_{n}\}_{n}$ of the sets of points in $(0,1)^{N}$
with rational coordinates $\mathbb{R}^{N}$, that is, $(0,1)^{N}\cap
\mathbb{Q}^{N}=\{q_{n}:\,n\in\mathbb{N}\}$. Fix $\varepsilon>0$ and for each
$n$ consider the ball $B(q_{n},r_{n})$, where $r_{n}\leq\frac{\varepsilon
}{2^{n}}$ and $r_{n}>0$ is so small that $B(q_{n},r_{n})\subseteq(0,1)^{N}$.
Let $U:=\bigcup_{n=`1}^{\infty}B(q_{n},r_{n})$. Denoting by $\mathcal{L}^{N}$
the Lebesgue measure, we have that
$$
\mathcal{L}^{N}(U)\leq\sum_{n=`1}^{\infty}\mathcal{L}^{N}(B(q_{n}%
,r_{n}))=\alpha_{N}\sum_{n=`1}^{\infty}r_{n}^{N}\leq\alpha_{N}\sum
_{n=`1}^{\infty}\frac{\varepsilon^{N}}{2^{Nn}}\leq\alpha_{N}\varepsilon^{N}<1
$$
provided $\varepsilon>0$ is sufficiently small. On the other hand, by the
density of the rationals, the closure of $U$ is $[0,1]^{N}$. Thus the boundary
of $U$, $S=\partial U=[0,1]^{N}\setminus U$ has positive Lebesgue measure.
Taking $f=1$, we have that
$$
f_{S}(x)=\left\{
\begin{array}
[c]{ll}%
1 & \text{if }x\in S,\\
0 & \text{if }x\in U.
\end{array}
\right.
$$
It follows that $f_{S}$ is discontinuos at every point of $S$ and so
it cannot be Riemann integrable in $[0,1]^{N}$.
