Prove that $f\equiv 0$ Let $f$ be continuous on $[a,b]$. Suppose that $\int_c^d f(x)dx=0$ holds for every $a\le c<d\le b$. Show that $f$ must be identically zero on $[a,b]$. 
I have solved the problem as stated in the answer posted by me, but a better solution will be appreciated. And is the answer rigorous enough?
 A: Given that $f$ is continuous on $[a,b]$. Also, it is given that $\int_c^df(x)dx=0$, holds for every $a\le c<d\le b$. Now let us assume that $f(x)>0$ for some $x_1\in(a,b)$. Then since $f$ is continuous on $[a,b]\implies \exists \delta>0,$ such that $f(x)>0$ $\forall, x\in(x_1-\delta,x_1+\delta).$ Now let $x_2>x_3\in(x_1-\delta,x_1+\delta)$. 
Now applying MVT for integrals on the interval $[x_3,x_2]$ for the function $f$, we can conclude that $\exists c\in(x_3,x_2)$, such that $$f(c)=\frac{\int_{x_3}^{x_2}f(x)dx}{x_2-x_3}.$$ But $\int_{x_3}^{x_2}f(x)dx=0$, which implies that $f(c)=0$. But, since $c\in(x_3,x_2)\implies f(c)>0.$ Contradiction. Therefore, $\nexists x\in(a,b)$, such that $f(x)>0$. 
A similar argument tells that, $\nexists x\in(a,b)$, such that $f(x)<0$. 
Therefore, $\forall x\in(a,b), f(x)=0$. 
This also implies that $\lim_{x\to a^+}f(x)=0$ and $\lim_{x\to b^-}f(x)=0$. 
Now since $f$ is continuous at $a$ and $b$, implies $f(a)=f(b)=0$.
This implies that $\forall x\in[a,b]$, we have, $f(x)=0$. 
A: Your proof is fine. But here is a little bit different solution:
Let's assume that $f \neq 0$. This implies that $\exists c \in (a, b) $ so that $f(c) \neq 0$. (It can't be non-zero at the endpoints only because of the continuity). Let's assume that $f(c) >0$. Then, from the definition of continuity, we have that $\exists \varepsilon > 0$ so that $f(x) > \frac{f(c) } {2}$ on a interval centered at $c$ with radius $\varepsilon$. But then we can bound the integral from below of $f$ on this interval by $\frac{f(c)} {2} 2\varepsilon$, which is positive.
