Prove that for $f\in L^1(\mathbb R)$, $\int_{\mathbb R}|f|=0\implies f=0$ a.e.

Let $$f\in L^1(\mathbb R)$$ s.t. $$\int_{\mathbb R}|f|=0\implies f=0\ a.e.$$

My attempt

Suppose $$f$$ continuous and that there is $$y$$ s.t. $$|f(y)|\neq 0$$. In particular, there is $$\delta >0$$ s.t. $$f(x)\neq 0$$ for all $$x\in [y-\delta ,y+\delta ]$$. By continuity, there is $$m>0$$ s.t. $$|f(x)|\geq m$$ for all $$x\in [y-\delta ,y+\delta ]$$. Therefore, $$0<2m\delta\leq \int_{[y-\delta ,y+\delta ]}|f(x)|\leq \int_{\mathbb R}|f|,$$ which is a contradiction. Therefore $$f=0$$ everywhere.

Since $$f\in L^1$$. There is a sequence of continuous function s.t. $$\|f_n-f\|_{L^1}\to 0.$$ In particular, $$\int_{\mathbb R}|f_n|\to \int_{\mathbb R}|f|=0.$$

How can I prove that $$f_n=0$$ for all $$n$$ ?

• Why would $f$ be continuous? How can you suppose it? Suppose instead $f > 0$ on non null set. – dEmigOd Feb 16 at 10:19
• @dEmigOd. If you continue reading the proof you will see that he first considers the case where $f$ is continuous, and then approximates a general $f \in L^1$ with continuous functions. – md2perpe Feb 16 at 10:51

There is no reason to have $$f_n=0$$ for all $$n$$... Your proof would be fine if $$\left\{f\in L^1(\mathbb R)\mid \int_{\mathbb R}|f|=0\right\},$$ would be a dense subspace of $$L^1(\mathbb R)$$. Since it's not the case, your proof can't work.
For a proof, let $$E=\{x\mid |f(x)|>0\}$$. Suppose that $$m(E)>0$$. Let $$E_n=\left\{x\mid |f(x)|\geq\frac{1}{n}\right\}.$$ Then, $$\frac{1}{n}\boldsymbol 1_{E_n}<|f|\boldsymbol 1_{E_n} \leq |f|,$$ and thus, $$\frac{1}{n}m(E_n)\leq \int_{\mathbb R}|f|=0.$$ Therefore, $$m(E_n)=0$$ for all $$n$$. Since $$\lim_{n\to \infty }m(E_n)=m(E)$$, you get a contradiction.