If the set on which a Riemann integrable function $f$ is nonzero has empty interior then the integral of $|f|$ is $0$. $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.
 A: 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.
A: This is more like a comment regarding your remark about measure theory but it's too long so I'll put it here instead.

The statement you want to prove is actually false if we interpret the word integrable in the Lebesgue sense.

Indeed, consider $[a,b] = [0,1]$ and let $X\subset [0,1]$ be the fat Cantor set. $X$ is a closed set (hence measurable) with empty interior but has positive measure, so the function
$$
f(x)=\begin{cases} 1 &; x\in X \\
0 &; x\notin X\end{cases}
$$ 
is integrable, the set $\{x\in [0,1] : f(x)\neq 0\}$ has empty interior but $\int_0^1 |f(x)| dx>0$.
However, the above $f$ is not Riemann integrable. The statement you're trying to prove most likely is about Riemann integration.
