$\int_a^b |f|=0\implies f=0$ Let $f:[a,b]\to\mathbb R$ continuous. I want to show that $\int_a^b |f|=0\implies f=0$. By contradiction, suppose $f\neq 0$ and denote $A=\{x\mid f(x)\neq 0\}$. We have that $$0=\int_{[a,b]}|f|=\int_{[a,b]\backslash A}|f|+\int_A|f|\implies \underbrace{\int_{[a,b]\backslash A}|f|}_{\geq 0}=\underbrace{-\int_A|f|}_{\leq 0},$$
which is a contradiction. Therefore $|f|=0$ and thus $f=0$. 
Is it correct ? (the problem is that I didn't use the continuity, and I know that for a non-continuous function, we can have $\int_a^b|f|=0$ and $f\neq 0$). Do you have other proofs ?
 A: You haven't invoked continuity anywhere. A counterexample for your proof is a $f$ that takes the value $1$ at a single point and is zero elsewhere.
Hint: show the contrapositive. If $f \ne 0$, then there is a point $x_0$ such that $f(x_0) \ne 0$. By continuity of $f$, there is a neighborhood of $x_0$ that is mapped by $|f|$ to strictly positive values. Then what does that say about $\int_a^b |f|$?
A: The problem with your proof is that even though $$\int_{[a,b]\setminus A}|f(y)|\,\mathrm dy=0$$ by the definition of $A$, the quantity $$\int_{A}|f(y)|\,\mathrm dy=0$$ can also vanish if the set $A$ has measure zero for a generic measurable function $f$, despite the fact $|f|$ is strictly positive on $A$.
However, for continuous functions (which assumption you admittedly never used), if $A$ is non-empty, then it actually has positive measure, because if $|f(x)|$ is positive for some $x\in[a,b]$, then continuity forces it to be positive, too, on a sufficiently small non-degenerate interval containing $x$, which interval has positive measure. In this case, you do reach the desired contradiction.

Formally, suppose, for the sake of contradiction, that $f(x)\neq 0$ for some $x\in[a,b]$. Let $\varepsilon\equiv|f(x)|/2>0$ Since $|f|$ is continuous at $x$, there exists some $\delta>0$ such that if $$y\in[a,b]\text{ and }|y-x|<\delta\Rightarrow |f(y)-f(x)|<\varepsilon.$$ But then $$2\varepsilon=|f(x)|\leq|f(x)-f(y)|+|f(y)|<\varepsilon+|f(y)|,$$ so that $|f(y)|>\varepsilon$ whenever $y\in[a,b]\cap(x-\delta,x+\delta)$. Therefore, $$\int_{a}^{b}|f(y)|\,\mathrm dy\geq\int_{\max\{x-\delta,a\}}^{\min\{x+\delta,b\}}|f(y)|\mathrm dy\geq\big(\min\{x+\delta,b\}-\max\{x-\delta,a\}\big)\varepsilon\geq\min\{\delta,b-a\}\varepsilon>0,$$ which is a contradiction.

The penultimate inequality in the last formula follows from the fact that the quantity $$\big(\min\{x+\delta,b\}-\max\{x-\delta,a\}\big)$$ can take on at most four different values:


*

*$(x+\delta)-(x-\delta)=2\delta>\delta$;

*$(x+\delta)-a\geq(a+\delta)-a=\delta$;

*$b-(x-\delta)=b-x+\delta\geq b-b+\delta=\delta$; or

*$b-a$,


all of which are greater than or equal to $\min\{\delta,b-a\}>0$.

The tedious shenanigans with the min’s and max’s are required because the interval $(x-\delta,x+\delta)$ may extend beyond the limits of the interval $[a,b]$, for example if $x=a$ or $x=b$. Then, one needs to “trim” the interval $(x-\delta,x+\delta)$ and integrate only on the segment which falls into $[a,b]$.
A: Your proof is NOT correct. Continuity is important. You need to let $f\neq 0$ at some point $x_0$, use continuity to bound $f(x)$ above the $x$ axis for some neighborhood, and use a comparison theorem.
