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.
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.