Let $f$ be continuous on $[a,b]$. Suppose that $f(x)\geqslant 0$ for every $x \in [a,b]$ and that $$\int_a^b f(x)\mathsf dx = 0.$$ Prove that $f$ is identically zero on $[a,b]$.
So I know to use Riemann Sums to show that the integral is being canceled out due to the fact that the function can't go below the $x$-axis. However, I am not sure how to show that in proof form.
$$\int\limits_a^b f(x)\,dx=\lim_{h\to 0} h\left(\sum_{i=0}^{n-1}f(a+ih)\right)=\lim_{h\to 0} h\left(\sum_{i=1}^{n}f(a+ih)\right)=0$$
where $nh=b-a~\land~n\to\infty$
As you already said that $f(x)\geq 0~\forall~x\in [a,b]$, then, $h\cdot f(a+ih)\geq 0~\forall~0\leq i\leq n~\land~h\to 0$
Assume that the function is not identically zero on $[a,b]$ That implies one of the elements of the sum is $\gt 0$ since we have restricted $f(x)$ to above/on the x-axis by the condition $f(x)\geq 0$.
If one of the elements $\gt 0$, we need an additive inverse for that element in the sum to make the sum zero. If the element $\gt 0$ is denoted by $x~,~x\gt 0$, then we need another element of the sum to be $(-x)$ but that contradicts the fact that $f(x)\geq 0~\forall~x\in [a,b]$.
Hence, our assumption is wrong and it follows that the function $f$ is identically zero on $[a,b]$.
$$\Bbb{Q.E.D}$$