# 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?

• What is the meaning of $f_S$ -- is it the restriction of $f$ to the set $S$? Also what is $\delta(S)$? – coffeemath Mar 4 '17 at 0:39
• To clarify here: You're talking about Riemann integration. So you might want to think about just the function $f=1$ on $S$. But you want to make the boundary of $S$ not have measure $0$. Can you design such a set $S$? – Ted Shifrin Mar 4 '17 at 0:40
• $f_S (x) = \begin{cases} f(x), & x\in S \\ 0, & x\notin S\end{cases}$, as a function on an enclosing rectangle. – Ted Shifrin Mar 4 '17 at 0:41
• I believe that the boundary of a compact set in $\mathbb{R}^n$ always has measure 0. This is certainly true if your set is a manifold. – ChocolateAndCheese Mar 4 '17 at 0:53
• @RobArthan: I was just trying to switch the focus from the function to the set $S$ itself, which could be troublesome. If the boundary of $S$ has measure $0$, then the function $f$ becomes irrelevant, does it not, in trying to violate the criterion? – Ted Shifrin Mar 4 '17 at 0:54

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}$.
• Isn't $\delta(S) = [0,1]^{n}$ since every point in $S$ has a neighborhood intersecting both $int(S)$ and $int(S^{C})$? Also, $S$ is not closed in your example, so it can't be compact (I think). – Muno Mar 4 '17 at 1:33
• If you want $S$ compact, call $U$ the union of the balls and $S=[0,1]^N\setminus U$. Then $S$ is compact. – Gio67 Mar 4 '17 at 1:41
• If you construct $S$ to make it compact ($S = [0,1]^{N} - U$), then the function $1$ on $S$ is no longer continuous. Is that true? – Muno Mar 4 '17 at 16:34
• You take f=1 which is continuous. But then $f_S$ is not. I edited my question. Hope it is clear now. – Gio67 Mar 4 '17 at 16:48