If $f$ is continuous, nonnegative on $[a, b]$, show that $\int_{a}^{b} f(x) d(x) = 0$ iff $f(x) = 0$

If $f$ is continuous, nonnegative on $[a, b]$, show that $\int_{a}^{b} f(x) dx = 0$ iff $f(x) = 0$

"$\Rightarrow$" Assume by contradiction that $f(x) \neq 0$ for some $x_0 \in [a, b]$. Without loss of generality, assume that $f(x_0) > 0$. Since $f$ is continuous, $\exists \delta > 0$ such that $f(x) > 0, \forall x \in (x_0 - \delta, x_0 + \delta)$. Since $f$ is continuous on $[a, b]$, then it is Riemann integrable. Therefore $\int_{a}^{b} f(x) dx = \sup L(f, p)$ for some partition $p$. Now what I want to do is to show that the lower sum, $L(f, p) > 0$, in that case its supremum is $>0$, and that contradicts the condition that $\int_{a}^{b} f(x) dx = 0$. However, I don't know how to articulate it.

"$\Leftarrow$" If $f(x) = 0, \forall x \in [a, b]$, then $\int_{a}^{b} f(x) dx = \int_{a}^{b} 0 dx = 0$

• "Without loss of generality"... You might want to note that $f(x_0)\geq 0$ and $f(x_0)\neq 0$ is equivalent to $f(x_0)>0$. – Jonas Meyer Apr 8 '15 at 1:25

Using continuity of $f$ at $x = x_0$, you can find an open interval $(x_0-\delta,x_0+\delta)$ such that $|f(x)-f(x_0)| < \dfrac{f(x_0)}{2} \to f(x) > \dfrac{f(x_0)}{2} \to \displaystyle \int_{a}^b f(x)dx \geq \displaystyle \int_{x_0-\delta}^{x_0+\delta} f(x)dx > \displaystyle \int_{x_0-\delta}^{x_0+\delta} \dfrac{f(x_0)}{2}dx = \delta\cdot f(x_0) > 0$
I would work not with the lower Riemann sums but with the upper Riemann sums instead. Here is an outline. Without loss of generality assume there is an $t$ in $(a,b)$ instead of $[a,b]$ with $f(t)>0$. Use continuity of $f$ to find a neighborhood $(c,d)$ such that $(c,d)\subset (a,b)$ and $f(x)>\frac{f(t)}{2}$ for all $x$ in $(c,d)$. Now given any partition $P=\{a=p_1,\dots,b=p_n\}$, let $i$ be such that $p_i<c\leq p_{i+1}$ and let $j$ be such that $p_{j-1}<d\leq p_j$. The upper Riemann sum on $P$ is then bounded below by $(d-c)*\frac{f(t)}{2}>0$, so the integral is bounded above by $(d-c)*\frac{f(t)}{2}$.