Riemann sum proof that if an integral of a non-negative function is $0$ than the function is $0$. Basically what the title says. I'm aware of other proof techniques that can be used to prove the question.
Question: Suppose that $f$ is a continuous function on $[a,b]$ and that $f(x)≥0$ for all $x∈[a,b]$. Show that if $∫^b_af(x)=0$, then $f(x)=0$ for all $x∈[a,b]$.
Solution: Define an equidistant partition $\tau = \{x_k|k=0,\ldots,n\}$, $x_k=a+\frac{k(b-a)}{n}$, $\Delta x_k=\frac{b-a}{n}$.
My sum is equal to $$\sum^{n}_{k=1}f(x_k)\Delta x_k=\sum^{n}_{k=1}[f(a+\frac{k(b-a)}{n})\frac{b-a}{n}]=\frac{b-a}{n}\sum^{n}_{k=1}f(a+\frac{k(b-a)}{n})\stackrel{!}{=}0$$
Finally, my plan was to evaluate the limit of the sum and to show that if $n \rightarrow \infty$ then $f=0$ at every point of the interval $[a,b]$. Do I have to additionally prove that the function is constant and use this fact to factor it out of the sum? It seems very unelegant. Maybe I'm missing something.
 A: This is a perfect problem for proving the contrapositive.   Suppose $ f $ is non-negative but not identically zero, and show that the integral is positive.  To accomplish this, let $ x_0 $ be any point where $ f(x_0) = y_0 > 0 $.  By continuity, there exists $ \delta $ such that $ f(x) > y_0 / 2 > 0 $ for all $ x $ with $ |x - x_0| < \delta $.  Now consider any Riemann sum with $ \|\Delta\| < \delta $ and you can see that $ R_*(f, \Delta) > \delta y_0 / 2 $.  Hence the integral itself is greater than or equal to $ \delta y_0 / 2 $.  Does this argument work for you?
A: I am not sure how much is going to go through without using a proof by contrapositive since any partition you make needs to have a finite number of elements and if you index a sum by the set $\{0,...,n\}$ we don't get information about every $f(x)$, only those $f(x_{k})$ where $k$ is in the index set $\{0,...,n\}$. If you suppose for some $x$ we have $f(x) > 0$ and then create a simple tagged partition where one of your partition elements will be $> 0$ and all the others will be $\geq 0$, then you will eventually get that $∫^b_af(x) > 0$. Your specific approach will not work because all you can prove is that those specific $f(x_{k}) = 0$ and also there is no limiting business for $n$ since $n$ is fixed from the start.
