# Formal expression for a proof

Given: $f$ is Riemann integrable on $[a,b]$ and $f(x)\geq 0$ for all $x$. Prove that if $$\int_a^b f(x) dx=0$$ and $f$ is continuous, then $f(x)=0$ for all $x$.

Use the fact that if f is continuous and non-zero at a point, then it's non zero in an interval. f must achieve its minimum value in the interval, which is >0, so the integral is non zero- contradiction.

I understand this proof intuitively. However, what would be the way to state this formally, using the epsilon-delta definition of continuity, or a well-known continuity theorem?

Suppose for contradiction that $f(c) \neq 0$. Then by continuity, there exists $\delta > 0$ such that $f(x) \geq \frac{f(c)}{2} > 0$ when $x \in [c-\frac{\delta}{2}, c+ \frac{\delta}{2} ]$. The integral $\int_a^b f(x) dx > \int_{c-\delta/2}^{c+\delta/2} f(x) dx > \frac{f(c)}{2} \delta > 0$.
• How do you know that $\int_{c-\delta/2}^{c+\delta/2} f(x) dx > \frac{f(c)}{2} \delta$? Feb 10, 2014 at 2:11
If $f$ is continuous and non negative, the function $$F(x)=\int_a^x f(t)\,dt$$ is non decreasing, because $F'(x)=f(x)\ge0$, for $x\in[a,b]$. If $F(b)=0$, then $F(x)=0$ for all $x\in[a,b]$, because $F(a)=0$. So …
You can avoid $\epsilon-\delta$ arguments for this problem. Because $f \ge 0$, then $\int_{a'}^{b'}f(t)\,dt \ge 0$ for all $a \le a' \le b' \le b$. Therefore, if $x \in [a,b]$, $$0 = \int_{a}^{x}f(t)\,dt+\int_{x}^{b}f(t)\,dt \ge \int_{a}^{x}f(t)\,dt \ge 0.$$ So $F(x)=\int_{a}^{x}f(t)\,dt=0$ for all $a \le x \le b$. Assuming $f$ is continuous, then the fundamental theorem of Calculus implies that $F'(x)=f(x)=0$ for all $a \le x \le b$.