$\int_0^1|f(x)|dx=0$ if and only if $f(x)=0$ for all $x\in[0,1]$ If $f:[0,1]\rightarrow\Bbb R$ is a continuous function and not negative function such that
$$
\int_0^1f(x)dx=0
$$
then could exist $x_0\in [0,1]$ such that $f(x_0)$ is not zero? I know this result but unfortunately it does not help now. So is the result still true with my restrictive hypothesis? if not could you give a counterexample, plese? Could someone help me, please?
 A: To follow the proof that Tommy1234 suggested to me in the comments above.
Let $F:[0,1]\rightarrow\Bbb R$ be the integral function of $f$, that is
$$
F(x):=\int_0^x f(t)dt\,.
$$
By the fundamental theorem of calculus and the non-negativity of $f$, $$F'(x)=f(x)\geq 0$$ for all $x\in [0,1]$, so $F(x)$ is non-decreasing there. Thus,
$$
F(0)\le F(x)\le F(1)
$$
for any $x\in[0,1]$. However, by the assumption,
$$
F(0)=F(1)=0,
$$
so we conclude that
$
F(x)\equiv 0
$
in $[0,1]$. This implies that $$f(x)=F'(x)\equiv 0$$ as well.
A: Let $f: [0, 1] \rightarrow \mathbb{R}$ be continuous, and let $x_0 \in [0, 1]$ be such that $f(x_0) > 0$.
If $f(y) > \frac {f(x_0)} {2}$ for all $y \in [0, 1]$, then
$$
\int_0^1 f(x) dx > \frac {f(x_0)} {2} \cdot 1 = \frac {f(x_0)} {2} > 0
$$
Otherwise, $f(y) \le \frac{f(x_0)}{2}$ for some $y \in [0, 1]$. By the Intermediate Value Theorem, $f$ is onto $\big[ f(y), f(x_0) \big]$.
Now, since $f$ is continuous, $N = f^{-1} \big(\frac{f(x_0)}{2}, f(x_0) \big)$ is open, and $a = f^{-1}\big(\frac{3}{4} \cdot f(x_0) \big) \in N$ (since $f$ is onto). Hence there exists an open ball $(a - \epsilon, a + \epsilon) \subseteq N$, whence $f(a - \epsilon, a + \epsilon) \subseteq f(N) = \big(\frac{f(x_0)}{2}, f(x_0) \big)$ (equality, since $f$ is onto).
I.e., $f(y) > \frac {f(x_0)} {2} > 0$ for all $y \in (a - \epsilon, a + \epsilon)$. But then since $f \ge 0$ on all of $[0, 1]$ ($f = |f|$),
$$
\int_0^1 f(x) dx \ge
\int_{a - \epsilon}^{a + \epsilon} f(x) dx >
2 \epsilon \cdot \frac{f(x_0)}{2} =
\epsilon \cdot f(x_0)
> 0
$$
EDIT:
There's a better argument here. Let $B = B_{\frac{f(x_0)}{2}}\big( f(x_0) \big) = \big(\frac{1}{2}f(x_0), \frac{3}{2} f(x_0)\big)$. Then $f(x_0) \in B$, $N = f^{-1}(B)$ is open by continuity of $f$, and $x_0 \in N$. Now we may find an open ball $(x_0 - \epsilon, x_0 + \epsilon) \subseteq N$, whence $f(x_0 - \epsilon, x_0 + \epsilon) \subseteq f(N) \subseteq \big(\frac{1}{2}f(x_0), \frac{3}{2} f(x_0)\big)$. I.e., $f(y) > \frac{1}{2} f(x_0)$ for all $y \in (x_0 - \epsilon, x_0 + \epsilon)$. Now, as before,
$$
\int_0^1 f(x) dx \ge
\int_{x_0 - \epsilon}^{x_0 + \epsilon} f(x) dx >
2 \epsilon \cdot \frac{f(x_0)}{2} =
\epsilon \cdot f(x_0)
> 0
$$
This avoids altogether the whole issue of $f$ having to be onto the interval $\big( \frac{1}{2}f(x_0), f(x_0) \big)$ (and indeed, is a much shorter proof).
