# If $f: A \to \mathbb{R}$ is non-negative and $\int_A f = 0$, then $\{x : f(x) \neq 0\}$ has measure $0$

We're assuming that $A \subset \mathbb{R^n}$ is a closed rectangle. I just want to know if my proof is correct.

Proof: Let $B_n = \{x: f(x) > \frac{1}{n}\}$ Since $\{x : f(x) \neq 0\} = \bigcup\limits_{n\in\mathbb{N}}B_n$

it suffices to prove that each $B_n$ has measure $0$ (or in this case, I'll prove that $B_n$ has content $0$). Choose a partition $P$ of $A$ such that $U(f, P) < \epsilon/n$. If we let $K$ be the set of subrectangles of $P$ that intersect $B_n$, then for each $S \in K$,

$$M_S(f) := \sup\{f(x) : x \in S\} > \frac{1}{n}$$ So

$$\sum\limits_{S \in K}\frac{1}{n}v(S) \le U(f, P) < \epsilon/n$$

And the result follows since $K$ is a cover of $B_n$ by closed rectangles.

In case my terminology isn't clear:

-A subset $A \subset \mathbb{R^n}$ has measure $0$ if for every $\epsilon > 0$, there is a cover $\{U_1, U_2,...\}$ of $A$ by closed rectangles such that $\sum\limits_{i = 1}^{\infty} v(U_i) < \epsilon$.

-For a rectangle $A = [a_1, b_1] \times ...\times [a_m, b_m] \subset \mathbb{R^n}$, $$v(A) = (b_1 - a_1)...(b_m - a_m)$$

-$A$ has content $0$ if for every $\epsilon > 0$, there is a finite cover $\{U_1,U_2,...,U_n\}$ of $A$ by closed rectangles such that $\sum\limits_{i = 1}^{n} v(U_i) < \epsilon$.

-
What integral are you using here? And what are $U$ and $M_S$? –  Nate Eldredge Aug 3 '12 at 3:11
$M_S(f)$ is defined to be $\sup\{f(x): x \in S\}$, and $U(f, P)$ is the upper sum. –  WacDonald's Aug 3 '12 at 3:15
The proof looks good. –  copper.hat Aug 3 '12 at 3:39

Another way is to use Markov's inequality: if $f$ is a non-negative function, then for every $\lambda > 0$,
$$v(\{x: f(x)>\lambda\}) \leq \frac{1}{\lambda}\int f.$$
In your case the right side is zero, hence $v(\{x: f(x)>\lambda\})=0$ for each $\lambda>0$, in particular for $\lambda = 1, \frac{1}{2}, \frac{1}{3}, \dots$. Since the set $\{x: f(x) > 0\}$ is the union of $\{x: f(x) > 1/n\}$ over $n\geq 1$, we are done.
@did: Presumably one needs something like the boundary of the set $\{x | f(x) > \lambda \}$ has measure 0? –  copper.hat Aug 30 '12 at 15:02
@copper.hat No, since the Riemann integral of $f$ restricted to any bounded interval, if it exists, coincides with its Lebesgue integral on this interval hence one can proceed directly with the Lebesgue integral. –  Did Aug 30 '12 at 15:07