An example of a function which is non-negative and continuous on a closed and bounded subset of $\mathbb{R}^2$ which is not Riemann-integrable I am TAing a Calculus 3 class this semester, and I got this really interesting question from a student that I could not answer. I wonder if anyone could help with this.
Our Calculus 3 textbook seems to imply that it is possible to have a non-negative, continuous function on a closed and bounded subset of $\mathbb{R}^2$ such that the boundary of the region is sufficiently complicated that the function is not Riemann-integrable on this subset. I wonder if anyone has an example of such a region and function. Any insight would be appreciated.
 A: By definition of Riemann integrability and Lebesgue's criterion for integrability, a function $f \colon \mathbb{R}^2 \to \mathbb{R}$ is Riemann integrable if and only if $f$ is bounded and $\{x \in \mathbb{R}^2 \colon f(x) \neq 0\}$ is bounded (this is by definition) and the set of points where $f$ is discontinuous has Lebesgue measure $0$ (this is Lebesgue's theorem). Applying this theorem to characteristic functions of bounded $S \subset \mathbb{R}^2$, we get that $\chi_S$ is Riemann integrable if and only if the boundary of $S$ has Lebesgue measure $0$.
If $K \subset \mathbb{R}^2$ is closed and bounded, then $f = \chi_K$ is continuous on $K$, so if you can find $K$ such that the boundary of $K$ has positive Lebesgue measure or is not Lebesgue measurable, then $\chi_K$ is your desired counterexample. In one dimension we have fat Cantor sets. In view of the identities $\overline{A \times B} = \overline{A} \times \overline{B}$, $\text{int}(A \times B) = \text{int}(A) \times \text{int}(B)$, a product of a fat Cantor set with itself will be closed and bounded, will be equal to it's boundary, and have positive measure.
A: Take $A =\{(x,y): 2\geq y\geq\sin\frac{1}{x} \wedge 0<x\leq 2\}\cup (\{0\}\times [-1,1]) $ and $f:A\to\mathbb{R} ,$ $f(x,y) =1 $  for all $(x,y)\in A.$ The set $A$ is compact.
Then the curve $\gamma$ given by equation  $y=\sin\frac{1}{x}$ lies in bonduary of $A$ but $$\int_{\gamma} f(x,y) dl =\int_0^1\sqrt{1+\frac{\cos^2 \frac{1}{t}}{t^2}}dt=\int_1^{\infty}\frac{\sqrt{1+u^2\cos^2 u}}{u^2}du\geq \int_1^{\infty}\frac{|\cos u |}{u}du =\infty .$$
So the integral over bonduary of this set cannot be finite.
