$f\geq 0$, continuous and $\int_a^b f=0$ implies $f=0$ everywhere on $[a,b]$ This is problem 6.2 from the 3rd edition of Principles of Mathematical Analysis. 

Problem 6.2: Suppose $f\geq 0$, f is continuous on $[a, b]$, and $\int_a^b f(x) \, dx = 0$. Prove that $f(x)=0$ for all $x \in [a, b]$.

I'm looking for a critique of my proof. It's a pretty easy problem, but I am always wary of making too bold of assumptions, especially on these low level/fundamental proofs. I'll be using Rudin's notation and refer to theorems from the text (If I should include the text of each theorem, feel free to leave a comment... I'm lazy but could probably use the TeX practice :p)
Proof: Assume, for contradiction, that $f>0$. Then, for any partition $P$ we have the Lower Riemann Sum: $L(P, f)=\sum_{i=1}^n m_i \, \Delta x_i$. At least one $\Delta x_i$ must be positive, since $a < b$, and each $m_i$ must be positive since we have $f>0$ by assumption, so certainly $\sup f > 0$. That means $L(P, f)>0$. Thus, we have:
$$0 = 0(b-a) < L(P,f)\leq \sup L(P, f) = \inf U(P,f) =L$$
where the last string of equalities holds because our function is continuous on a compact interval, so is integrable by theorems 6.8 and 6.6. So our integral has value $L>0$. This is in contradiction to our given assumption that $\int_a^b f(x) \, dx = 0$, so we must have that $f=0$ on $[a, b]$. $\Box$
So, I am wondering if my proof is correct (and is presented well). Also if someone could enlighten me as to what Rudin means when he say "Compare this with exercise 1," I'd be appreciative. Is it a hint or is there something else he expects you to notice? there are a lot of things I could compare :)...
Exercise 6.1: Suppose $\alpha$ increases on $[a, b]$, $a \leq x_0 \leq b$, $\alpha$ is continuous at $x_0$, $f(x_0)=1$, and $f(x)=0$ if $x\neq x_0$. Prove that $f$ is Riemann-Stieltjes Integrable and that $\int f \, d\alpha = 0$
 A: You do not need an argument by contradiction. You can use the contraposititive instead.  Suppose that at some $x_0\in [a,b]$, we have $f(x_0) > 0$.  Then, by continuity, there is an interval containing $x_0$ on which $f(x) \ge f(x_0)/2$.  Define a function $g$ which is zero off the interval and $f(x_0)/2$ on the interval.  Let $\delta$ be the length of the interval.   We have $f \ge g$ so
$$\int_a^b f(x)\,dx \ge \delta f(x_0)/2  > 0.$$
A: You're plenty of advices for how to prove that by contradiction, but some others mistakes must be pointed out. For example, $\Delta x_i=x_i-x_{i-1}\gt 0$ for $i\in\{1,\ldots,n\}$ and $m_i=\inf_{x\in[x_{i-1},x_i]}f(x)$ so, you must argue: since $f\gt 0$ certainly $\inf f\gt 0$...
However, it's possible to prove this directly. You can argue as follows.
Since $f\geq 0$ everywhere in $[a,b]$, the function $F:[a,b]\to\mathbb{R}$, given by $$F(x):=\int_a^x f(t)\, dt,$$
is increasing. Then you have $$0=F(a)\leq F(x)\leq F(b)=0.$$
Therefore $F$ is the constant function $0$. Now, since $f$ is continuous in $[a,b]$ by the fundamental theorem of calculus,  we have $$f(x)=F'(x)=0.$$
A: A proof: If $f\ge0$ everywhere and $f(x_0)>0$ and $f$ is continuous, we could do a little $\varepsilon$-$\delta$ argument like this: Let $\varepsilon=f(x_0)/2$.  Let $\delta>0$ be small enough so that if $x$ is within distance $\delta$ of $x_0$, then $f(x)$ is within $\varepsilon$ of $f(x_0)$.  So $f\ge f(x_0)/2$ on the interval whose endpoints are $x_0 \pm \delta$, and so
$$
\int_a^b f(x) \; dx \ge (2\delta) (f(x_0)/2) = \delta f(x_0) > 0.
$$
To allow for $x_0$ being near an endpoint, you could just integrate over half that interval.
Some comments on the posted proof:  The assumption in a proof by contradiction should not be stated as "$f>0$".  Rather it should be stated as saying there is at least one point $x_0$ such that $f(x_0)>0$.  Whenever the conclusion says "All A are B", then the assumption in a proof by contradiction should be "At least one A is not B".
Your argument to the conclusion that $\sup f>0$ is too complicated.  If you've assumed $f$ is not everywhere $0$ and you have $f\ge 0$ everywhere, then as soon as you've assumed there is one point $x_0$ where $f>0$, you've already got $\sup f\ge f(x_0)$.
Since you're working with Riemann integrals defined by Riemann sums, you might make the partition $\{a, x_0-\delta,x_0+\delta, b\}$ and then you have the lower Riemann sum $\ge (2\delta) (f(x_0)/2)$.  If the lower Riemann sum for just one partition is positive, then the integral is positive.
Saying "Then for any partition..." seems at best a needless complication.  Just one partition, as noted above, is enough if you do the right things with it.
A: Your proof is incorrect.
You need to show that at every point $x \in [a,b]$, $f(x) = 0$.
To argue by contradiction, you need to assume, there is at least one $c \in [a,b]$ such that $f(c) \gt 0$.
You are assuming that $f(x) \gt 0 \ \forall x \in [a,b]$ and proving that is false.
In effect, you have only shown that there is at least one point $c \in [a,b]$ for which $f(c) = 0$.
