Show that $\int_{a}^{c}f(x)dx = 0$ for all $c\in [a,b]$ if and only if $f(x) = 0$ for all $x\in [a,b]$. Exercise: 
Suppose that $a<b$ and that $f:[a,b]\rightarrow R$   is continuous. Show that $\int_{a}^{c}f(x)dx = 0$ for all $c\in [a,b]$ if and only if $f(x) = 0$ for all $x\in [a,b]$.
attempt of proof: 
Suppose  that $a<b$ and that $f:[a,b]\rightarrow R$   is continuous. 
Let $m$ and $M$ be the infimum and supremum of f. Since $f(x) = 0 $ for all $x\in [a,b]$ $m = 0$ since  $f(x) = 0$. Thus, for all any partition $P$ of $[a,b]$, $L(f,P) = m(b-a) = 0$ implies $L(f,P) = 0$. Hence,  $(L)\int_{a}^{c}f(x)dx$ = $sup{L(f,P)}$ = $0$.
In a similar way we can working with the supremum. Thus, if both the lower integral of f and the upper integral of f have the same value , we can conclude then the value of the 
$\int_{a}^{c}f(x)dx = 0$ for all $c\in [a,b]$
The converse is trivial, since $\forall c\in [a,b]$ $f(c) = 0$ since $f(x)=0$ , so $\int_{a}^{c}f(x)dx = 0$
Can someone please help me? I don't know if this is a way to prove it. Any feedback/hint or better way would be really appreciated.Thank you in advance.
 A: The basic idea is that,
if $f$ is continuous
and there is a point $z$
such that $f(z) \ne 0$,
then there is a neighborhood of $z$
such that
$f(x) \ne 0$ 
and has the same sign as $f(z)$
in that neighborhood.
We then look at the integral of $f$
in that neighborhood
and prove that the integral of $f$
over that neighborhood
is non-zero.
Suppose
$f(z) \ne 0$
for some $z$.
Then,
since $f$ is continuous,
for any $\epsilon > 0$
there is a $\delta$
such that
$|f(z)-f(x)| < \epsilon$
for all $x$ such that
$|z-x| < \delta$.
In what follows,
assume that
$f(z) > 0$.
If $f(z) < 0$,
reverse the sign of $f$.
Now choose $\epsilon = |f(z)/2|$.
Let $d$ be the $\delta$
for this $\epsilon$.
Then
$|f(z)-f(x)| < |f(z)/2|$
for all $x$ such that
$|z-x| < d$.
Therefore,
by the triangle inequality,
for
$|x-z|
\le d
$,
$|f(z)|
=|f(z)-f(x) + f(x)|
\le |f(z)-f(x)| + |f(x)| 
$
or
$|f(x)|
\ge |f(z)|-|f(z)-f(x)|
\ge |f(z)|-|f(z)|/2
= |f(z)|/2
$.
Since
$|f(x)-f(z)|
\le
f(z)/2
$,
$f(x) \ge f(z)/2$.
Therefore,
$\int_{z-d}^{z+d} f(x)dx
\ge \int_{z-d}^{z+d} f(z)/2\ dx
= (2d)(f(z)/2)
=d f(z)
> 0
$.
Therefore,
since
$\int_a^{z+d} f(x) dx
=\int_a^{z-d} f(x) dx
+\int_{z-d}^{z+d} f(x) dx
$,
since
$\int_{z-d}^{z+d} f(x) dx
> 0
$,
if
$\int_a^{z+d} f(x) dx
= 0
$,
then
$\int_a^{z-d} f(x) dx
< 0
$.
Therefore,
if $f$ is continuous
and there is a $z$
such that
$f(z) \ne 0$,
it is not true that
$\int_a^c f(x) dx
= 0
$
for all $c \in [a, b]$.
Taking the contrapositive,
if $f$ is continuous
and $\int_a^c f(x) dx
= 0
$
for all $c \in [a, b]$,
then
$f(x) = 0$
for all $c \in [a, b]$.
A: You have proved that if $f(x)=0$, then $\int_a^c f(x)\;dx=0$ just fine - just clean it up a bit. However, the other direction you have not shown. You want to show that if $\int_a^c f(x)\;dx=0$ for all $c\in[a,b]$ then $f(x)=0$. You do not yet know that $f(x)=0$. I shall give a hint:
You know that $\int_a^cf(x)\;dx=0$ for $c \in [a,b]$. But what of the area for the curve between $[c,b]$? You know that $f$ is continuous. Use the fact that it has a well defined inf and sup. How large/small can the integral be for $f$ on $[c,b]$? Can you make this very small despite any choice of partition by choosing $c$ very close to $b$?
