TITLE: When does the integral preserve strict inequalities?
QUESTION [10 upvotes]: Hi everyone: Suppose that $f(t)$ is a continuous function on $[a,b]$, where we also have 
$$\alpha<f<\beta.$$
 Under which condition(s) do the above strict inequalities are preserved by taking the integral: 
$$\alpha<\frac{1}{b-a}\int_{a}^{b}f(t)dt<\beta?$$ Thanks for your reply.

REPLY [15 votes]: In fact, something way more general holds. Let $(X,\mathscr M,\mu)$ be an arbitrary measure space and $f:X\to\mathbb R$ a measurable function (that is $f^{-1}(U)\in\mathscr M$ for any Borel set $U\subseteq \mathbb R$). If

$E\in\mathscr M$,
$\mu(E)>0$, and
$f(x)>0$ for all $x\in E$,

then $$\int_E f(x)\,\mathrm d\mu(x)>0.$$
Proof: Define $E_1\equiv\{x\in E\,|\,f(x)>1\}$ and for each $n\in\mathbb N$, $n\geq 2$, define $$E_n\equiv\left\{x\in E\,\Big|\,\frac{1}{n}<f(x)\leq\frac{1}{n-1}\right\}.$$
Since $f(x)>0$ for all $x\in E$, it follows that $E=\bigcup_{n=1}^{\infty} E_n$ and the members of the union are disjoint. Therefore, $$0<\mu(E)=\sum_{n=1}^{\infty} \mu(E_n),$$
so it follows that $\mu(E_n)>0$ for at least one $n\in\mathbb N$. Since $E_n\subseteq E$, it follows that $$\int_Ef(x)\,\mathrm d\mu(x)\geq\int_{E_n}f(x)\,\mathrm d\mu(x)\geq \int_{E_n}\frac{1}{n}\,\mathrm d\mu(x)=\frac{\mu(E_n)}{n}>0,$$
proving the claim.

In your case, $X=\mathbb R$, $\mathscr M$ is the Borel $\sigma$-algebra on $\mathbb R$, and $\mu$ is the Lebesgue measure. The function $x\mapsto f(x)-\alpha$ is continuous (and hence measurable) and strictly positive on $E=[a,b]$. Finally, $\mu([a,b])=b-a>0$. Hence,
\begin{align*}
0<&\int_{[a,b]}[f(x)-\alpha]\,\mathrm d x=\int_{[a,b]} f(x)\,\mathrm dx-\int_{[a,b]}\alpha\,\mathrm dx=\int_{[a,b]} f(x)\,\mathrm dx-\alpha\mu([a,b])\\
=&\int_{[a,b]} f(x)\,\mathrm dx-\alpha(b-a).\end{align*}
Your claim follows by simple rearrangement and the reasoning for the function $x\mapsto\beta-f(x)$ is totally analogous.