$f\geq 0$, continuous and $\int_a^b f=0$ implies $f=0$ everywhere on $[a,b]$

Solution 1:

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.

Solution 2:

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

Solution 3:

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