# Integrand non-negative everywhere, integral negative?

Suppose I have an integral:

$F \equiv \int_{a}^{b} f(x) dx$

I know that $f(x)$ is real-valued, finite and non-negative everywhere on the interval $(a, b)$ where $a$, $b$ are real numbers or $\pm \infty$ and $a \leq b$. I know that in the obvious, well-behaved cases this implies $F \geq 0$.

Is there any obscure pathological case where $F < 0$? You may generalize to cases that involve double, triple or higher order integrals. However, for each integral the property that the upper bound is greater than or equal to the lower bound and the bounds are always real numbers or $\pm \infty$ must hold.

-
No. Integrals are monotone. If they weren't, they wouldn't be integrals. – Qiaochu Yuan Jan 21 '11 at 15:21
I think you mean $a\leq b$. Otherwise your integral will be negative unless $f(x)$ is zero almost everywhere. – Christian Blatter Jan 21 '11 at 16:28
@Christian: Exactly right. Fixed. – dsimcha Jan 21 '11 at 16:56
A geometrical way to think about it is that the value of $F$ is the area under the graph of $f$ and above the $x$-axis, and so if $f$ is non-negative this area cannot be negative. – Asaf Karagila Jan 21 '11 at 19:28
@Asaf: I thought of the geometric interpretation. It's just that this assumption is an intermediate step in a proof I'm working on, the proof needs to work even in pathological cases, and in my experience such geometric, intuitive arguments often fall apart in pathological cases. – dsimcha Jan 21 '11 at 20:28

No, there is no pathological case. If $f(x)$ is integrable, and $m\leq f(x)\leq M$ for all $x\in[a,b]$, then $$m(b-a) \leq \int_a^b f(x)\,dx \leq M(b-a).$$ This follows easily from the definition of the integral as a limit of Riemann sums. If $a=x_0\lt x_1\lt\cdots \lt x_n = b$ is a partition of $[a,b]$, $\Delta x_i = x_i - x_{i-1}$, and $x_i^*$ is a point in $[x_{i-1},x_i]$, then $m\leq f(x_i^*)\leq M$ for each $i$, so the Riemann sum satisfies $$m(b-a) = \sum_{i=1}^n m\Delta x_i \leq \sum_{i=1}^n f(x_i^*)\Delta x_i \leq \sum_{i=1}^n M\Delta x_i = M(b-a),$$ so taking limits you get $$m(b-a) \leq \lim_{||P||\to 0}\sum_{i=1}^n f(x_i^*)\Delta x_i \leq M(b-a)$$ or $$m(b-a) \leq \int_a^b f(x)\,dx \leq M(b-a)$$ (using the assumption that $f$ is integrable on $[a,b]$.
In particular, if $f(x)\geq 0$ for all $x\in [a,b]$, then $$0 = 0(b-a) \leq \int_a^b f(x)\,dx = F.$$ Redefining a function at a finite number of points on $[a,b]$ does not change its integrability, nor the value of the integral, so if all you know is that $f(x)\geq 0$ on $(a,b)$, you can always redefine it at $a$ and $b$ so that you get $f(x)\geq 0$ on $[a,b]$ without changing the value of the integral.
(In fact, you only need $f(x)\geq 0$ "almost everywhere on $[a,b]$", meaning at all $x$ except perhaps for a set of measure $0$ that is contained on $[a,b]$).