# If the Riemann Integral of a continuous nonnegative function is 0, then that function is identically 0.

Here's what I'm doing:

Prove that if $$f: [a,b] \to [0,+\infty)$$ is a continuous nonnegative function with $$\int_{a}^{b} f(x) \ dx = 0$$, then $$f(x) = 0$$ for all $$x \in [a,b]$$.

Proof Attempt:

Suppose that $$f(x) \neq 0$$ for some $$x \in [a,b]$$. Let $$c$$ be one of those points in $$[a,b]$$ where $$f(c) \neq 0$$. Let $$\epsilon > 0$$ be given. Since $$f$$ is Riemann Integrable, there exists a $$\delta > 0$$ such that for all partitions $$P$$ with partition norm $$|P| < \delta$$ and all associated evaluation sets $$T$$:

$$|R(f,P,T)-0| = |R(f,P,T)| < \epsilon$$

where $$R(f,P,T)$$ is shorthand for the Riemann Sum taken over some partition and evaluation set. Now, we know that $$R(f,P,T) \geq 0$$ and, in fact, if $$c \in T$$, then $$R(f,P,T) > 0$$.

So, then, pick $$T$$ above so that $$c \in T$$ and let $$\epsilon = R(f,P,T)$$. Then, we get:

$$R(f,P,T) < R(f,P,T)$$

which is impossible. Hence, $$f(x) = 0$$ for all $$x \in [a,b]$$. $$\Box$$

Does the proof above work? If it doesn't, then why? How can I fix it?

An usual and simple way would be to say, like you did, if there exists $$c\in [a,b]$$ such that $$f(c)>0$$ than by continuity, given $$\epsilon =f(c)/2$$, there exists $$\delta >0$$ for which for every $$x\in (c-\delta,c+\delta)$$, $$f(x)\ge \frac{f(x)}{2}$$. So we have this: $$\int_a^bf(x)dx \ge \int_{c-\delta}^{c+\delta}f(x)dx\ge \int_{c-\delta}^{c+\delta}\frac{f(c)}{2}dx=\frac{f(c)}{2}2\delta>0\mbox,$$ which goes against our hipoyhesys