A calculus problem from Spivak Suppose $f$ is integrable on [$a$,$b$] and $f(x)>0$ for all $x$ in [$a$,$b$]. Prove that  $\displaystyle\int_a^b f(x) \mathrm{d}x>0$.
 A: For any Riemann sum on $\,[a,b]\,$ with partition $\,\{a=x_0<x_2,\ldots <x_n=b\}\,$ , we get
$$\sum_{n=0,\,||\Delta_x||\to 0}f(c_i)(x_i-x_{i-1})>0\ldots$$
with
$$\Delta_x:=\max_{i}(x_i-x_{i-1})$$
A: If $f$ is Riemann integrable on $[a,b]$ then the set of points $x$ at which $f$ is not continuous has measure zero. So we may choose some $x_1$ with $a<x_1<b$ for which $f$ is continuous at $x_1$. Since by assumption $k=f(x_1)>0$ we may choose some small $\delta$ so that $f(x) \ge k/2$ for $x_1-\delta \le x \le x_1+\delta$. Then since $f(x)>0$ on $[a,b]$ we have $\int_a^b f(x)dx \ge (2 \delta)\cdot k/2$. Here it is understood that $\delta$ is small enough that the interval $[x_1-\delta,x_1+\delta]$ is contained in $[a.b]$.
A: Ok, so I hope that you know that (with obvious meaning of notation) (all depending on your definition of the integral)
$$
\int_a^b f(x)\; dx \geq \sum_{i}[\inf_{[x_i, x_{i+1}]} f(x)]\Delta x
$$
for all partitions of $[a,b]$, where $\inf$ is the infimum of $f$ over each subinterval.
Claim: There is a $\delta >0$ and a subinterval $[x_1 , x_{i+1}]$ such that $f(x) \geq \delta$ for $x\in [x_i, x_{i+1}]$.
Proof Suppose this wasn't true. Then
$$
\sum_{i}[\inf_{[x_i, x_{i+1}]} f(x)]\Delta x = 0
$$
for all pertitions. And so (taking the limit) the integral would be $0$. $\quad\quad\quad\square$
So there is an interval $[x_i, x_{i+1}]$ and a $\delta > 0$ such that $f(x)\geq \delta$ for all $x\in [x_i, x_{i+1}]$.
So now you have that $f(x)\geq \delta >0$ on an interval $[x_i , x_{i+1}]$. So then
$$
\int_{x_i}^{x_{i+1}} f(x)\; dx \geq \delta(x_{i+1} - x_i) > 0.
$$
So
$$
\int_{a}^b f(x)\; dx = \int_a^{x_i} f(x)\; dx + \int_{x_i}^{x_{i+1}} f(x)\; dx + \int_{x_{i+1}}^b f(x)\; dx > 0.
$$
(Assuming that you are fine with saying that the first and last integral definitely are greater then or equal to $0$).
