$f:[a,b]\to\mathbb{R}$ is Rieman integrable and $X=\{x\in [a,b] : f(x)\neq 0\}$ has empty interior.
show that $\int_a^b|f(x)|dx=0.$
I think that it is an easy exercise of measure theory. But how to solve it without the knowledge of measure theory and just using real analysis.
Thanks in advance.
Let $a=x_0<x_1<...<x_n=b$ be a partition $P$ of $[a,b].$ Then since $X$ has empty interior, the lower Riemann sum $$ L(f,P)=\sum_{k=0}^{n-1} \min_{x\in[x_k,x_{k+1}]} |f(x)|\Delta_k=0. $$ Take the supremum over all partitions $P$ and we have that the lower Riemann integral is zero. By integrability, the result follows.