# Prove the integral of $f$ is positive if $f ≥ 0$, $f$ continuous at $x_0$ and $f(x_0)>0$

Prove that $\int_a^b f(x)\,dx \gt 0$ if $f \geq 0$ for all $x \in [a,b]$ and $f$ is continuous at $x_0 \in [a,b]$ and $f(x_0) \gt 0$

EDIT. Please ignore below. It is very confusing actually -.-

Note: After typing this all out, I think I realized that my proof is complete, but I'll just post it to make sure :)

Attempt:

Find a partition $P = \{t_0,\ldots,t_n\}$ of $[a,b]$ s.t. $f(x)\gt f(x_0)/2$ for any $x \in [t_{i-1},t_i]$

Thus, the lower sum, $L(f,P)\geq x_0 (t_{i}-t_{i-1})/2 > 0$

[Basic Idea: since f is continuous at $x_0$, in the worst case scenario (i.e. $f=0$ at all points except in a nbhd of $x_0$) there must be some "bump" at $x_0$, which prevents the integral from actually equaling $0$. If we can find just one lower sum of a partition to be $> 0$, we will be done (I think...)]

• [I am not sure if your attempt is correct or not, but here's an alternate approach.] Instead of resorting to Riemann sums, perhaps you can use the monotonicity property. By continuity, there exists an open neighborhood $(x_0 - r, x_0 + r)$ where $f$ is at least $f(x_0)/2$. Now, consider the function $g = \frac{f(x_0)}{2} \mathbf 1_{(x_0 - r, x_0 + r)}$. Observe that $f \geqslant g$ and the integral of $g$ is positive. So by monotonicity of integration, the integral of $f$ is positive as well. Nov 16, 2011 at 22:10
• @Srivatsan Thanks. I think my attempt was supposed to be something like that, but I see it's really messy Nov 17, 2011 at 23:01
• Mar 8, 2017 at 15:40

$f(x_0) > 0, f(x)$ continuous there means that there is a $\delta$ such that for $|x-x_0|< \delta$, $|f(x) - f(x_0)| < \frac{f(x_0)}{2}$.
So consider the interval $[x-\delta, x+\delta]$.
I think this problem can be solved with Reductio ad absurdum. If it is not true, then the integral must equal to zero, so the upper sums must equal zero. This means the supremum in each interval is equal to zero, therefore $f(x) = 0$ in every subinterval, so $f(x) = 0$ for all $x$. This contradicts the fact that $f(x_0) > 0$ for some $x_0$.