While trying to prepare for my Real Analysis exam I encoutered the following exercise:
Problem: Let $f:[a, b] \rightarrow \mathbb{R}$ be Riemann integrable. If the set $$ X=\{x \in[a, b] ; f(x) \neq 0\} $$ has empty interior (notation: $\operatorname{int}(x)=\varnothing$) then $$\int_{a}^{b}|f(x)| d x=0$$
What have i tried? I started by trying to write what empty interior means and it went like this:
Since $\operatorname{int}(x)=\varnothing$ there does not exist $\epsilon > 0$ such that $$(\bar{x}-\varepsilon, \bar{x}+\varepsilon) \subset X$$ which means that $\forall \epsilon > 0$:
$$(\bar{x}-\varepsilon, \bar{x}+\varepsilon) \cap X^{c} \neq \varnothing$$
Let's call it $z$ the element in the set $(\bar{x}-\varepsilon, \bar{x}+\varepsilon) \cap X^{c}$
Since $z$ is in the intersection of the aforementioned set, we have that $z \in X^{c}$ and therefore $$\left\{\begin{array}{l}z \in[a, b] \\ f(z)=0\end{array}\right.$$
Finally, one is able to infer that $|z-\bar{x}|<\varepsilon$ since $z \in (\bar{x}-\varepsilon, \bar{x}+\varepsilon)$
But now I am stuck. I did find the same exercise already answered here If the set on which a Riemann integrable function $f$ is nonzero has empty interior then the integral of $|f|$ is $0$. but i am looking forward to someone looking at what i have tried so far. Also, i am very curious to know whether one can finish the exercise using what i have already done.
Thanks in advance, Lucas
This community wiki solution is intended to clear the question from the unanswered queue.
Brian M. Scott has answered your question in his comments. Let $[r,s]$, $r < s$, be any closed subinterval of $[a,b]$. Then $\inf_{x \in [r,s]} \lvert f(x) \rvert = 0$; otherwise $(r,s) \subset X$ which would show that $X$ has non-empty interior. Hence for each partition $P = (x_0,\ldots, x_n)$ of $[a,b]$ the lower sum is $$L(\lvert f \rvert;P) = \sum_{i=1}^n \inf_{x \in [x_{i-1},x_i]} \lvert f(x) \rvert (x_i - x_{i-1}) = 0 .$$ Since $f$ is Riemann integrable, also $\lvert f \rvert$ is and we get $$\int_a^b \lvert f(x) \rvert dx = \sup_P L(\lvert f \rvert;P) = 0 .$$