Why Comparison of Integrals Follows from Positivity
The integral comparison principle connects two kinds of information about functions. One is pointwise: at every input in an interval, one function is no larger than another. The other concerns the total accumulation represented by their definite integrals. The proof is short, but its key step is worth making explicit: subtract the smaller function from the larger one, then apply positivity to the resulting nonnegative function.
We will work with Riemann integrals on a closed interval. The functions in the theorem must be Riemann integrable, and the interval must be oriented from its smaller endpoint to its larger endpoint. Those conditions ensure that the positivity result applies in the direction needed.
The theorem gives a non-strict inequality. It does not say that the integrals must differ just because the functions differ at some point. We will see why that distinction matters.
The Proof: Integrate the Difference
The earlier material on positivity for nonnegative functions establishes that if an integrable function \(h\) satisfies \(h(x)\ge 0\) throughout \([a,b]\), then \(\int_a^b h(x)\,dx\ge 0\). The earlier material on sums and differences of integrands establishes that the difference of two Riemann-integrable functions is Riemann integrable, and that integration is linear. These are exactly the facts needed here.
Set \(h(x)=g(x)-f(x)\). Since \(f(x)\le g(x)\) for every \(x\in[a,b]\), we have \(h(x)\ge 0\) throughout that interval.
Because \(f\) and \(g\) are Riemann integrable, their difference \(h=g-f\) is Riemann integrable on \([a,b]\).
The positivity result gives \(\int_a^b h(x)\,dx\ge 0\).
Since \(h=g-f\), linearity gives \(\int_a^b g(x)\,dx-\int_a^b f(x)\,dx\ge 0\), which is the claimed comparison.
In equation form, the last two steps are
Adding \(\int_a^b f(x)\,dx\) to both sides yields \(\int_a^b f(x)\,dx\le\int_a^b g(x)\,dx\). This proves the theorem. The proof does not estimate either integral separately: it reduces the desired comparison to positivity of one integral.
Worked Examples
Worked Example: Comparing Two Polynomial Functions
On \([0,2]\), let \(f(x)=x^2+1\) and \(g(x)=2x+3\). We will first check the pointwise hypothesis, then compare the integrals directly.
Subtract carefully:
For \(0\le x\le2\), we have \(-1\le x-1\le1\), so \((x-1)^2\le1\). Therefore
Thus \(f(x)\le g(x)\) everywhere on the interval. Compute the two integrals:
The antiderivatives check: \(\frac{d}{dx}(\frac{x^3}{3}+x)=x^2+1=f(x)\), and \(\frac{d}{dx}(x^2+3x)=2x+3=g(x)\). The comparison is confirmed by \(\frac{14}{3}\le10\). As an additional check, the integral of the difference is \[ \int_0^2 (g(x)-f(x))\,dx =10-\frac{14}{3} =\frac{16}{3}\ge0. \]
Worked Example: Comparing a Piecewise Function with a Constant
Define \(f\) on \([0,2]\) by
On \(0\le x\le1\), \(0\le x^2\le1\le2\). On \(1<x\le2\), \(0\le2-x<1\le2\). Hence \(f(x)\le g(x)\) at every point of \([0,2]\), including \(x=1\), where \(f(1)=1\). Both functions are bounded and piecewise continuous, so they are Riemann integrable.
Split the integral of \(f\) at \(1\):
The antiderivatives check because \(\frac{d}{dx}(\frac{x^3}{3})=x^2\) and \(\frac{d}{dx}(2x-\frac{x^2}{2})=2-x\). The integral of the constant function is
Therefore \(\frac56\le4\), as the theorem predicts. Check the proof through the difference as well: on \([0,1]\), \(g-f=2-x^2\), and on \((1,2]\), \(g-f=x\). Thus
This agrees with \(4-\frac56=\frac{19}{6}\), verifying the subtraction and the integral comparison.
Worked Example: Strict Pointwise Order Except at an Endpoint
On \([0,1]\), let \(f(x)=x^2\) and \(g(x)=x^2+x\). Their difference is \(g(x)-f(x)=x\), which is nonnegative on the whole interval and positive whenever \(x>0\). The theorem therefore gives the integral comparison. Computing both sides,
The antiderivatives differentiate to \(x^2\) and \(x^2+x\), respectively. The difference check gives \[ \int_0^1(g-f)\,dx=\int_0^1x\,dx=\left[\frac{x^2}{2}\right]_0^1=\frac12 =\frac56-\frac13\ge0. \] Thus the comparison holds, with equality of the functions at \(x=0\) and strict inequality for \(x>0\).
Why the Hypotheses and Direction Matter
The order of the endpoints is part of the theorem. If \(a>b\), the convention for oriented integrals is \(\int_a^b f(x)\,dx=-\int_b^a f(x)\,dx\). Consequently, pointwise order \(f\le g\) on \([b,a]\) gives the reversed comparison when the limits are written from \(a\) to \(b\):
For instance, take \(f(x)=1\) and \(g(x)=2\) on \([0,2]\). Although \(1\le2\), the forward integrals are \(2\le4\). With reversed limits, they are \(\int_2^0 1\,dx=-2\) and \(\int_2^0 2\,dx=-4\), so \(-2\ge-4\), not \(-2\le-4\).
Another condition is integrability. Pointwise order alone is not the complete hypothesis: the theorem concerns functions whose Riemann integrals exist. In the examples, integrability follows from continuity or piecewise continuity; in the proof, integrability of the difference follows from linearity properties of Riemann integration.
Common Mistake: Reversing the Difference
A frequent error is to subtract in the wrong order and then claim the resulting function is nonnegative. If \(f\le g\), it is \(g-f\), not \(f-g\), that is nonnegative. For the functions in the first example, at \(x=0\) we have \(f(0)=1\) and \(g(0)=3\), so
Thus a proof that applies positivity to \(f-g\) under the assumption \(f\le g\) has the sign backwards. The correction is to set \(h=g-f\), verify \(h\ge0\) throughout the interval, and then write \[ \int_a^b g(x)\,dx-\int_a^b f(x)\,dx =\int_a^b h(x)\,dx\ge0. \] This last inequality yields the desired direction.
What the Proof Does—and Does Not—Say
The proof explains why pointwise order controls the order of the integrals: the difference of the two integrals is exactly the integral of a nonnegative function. It establishes a non-strict comparison. A pointwise difference at a single point does not by itself guarantee a strictly positive difference of integrals. For example, changing a Riemann-integrable function at just one point does not change its integral. The comparison theorem requires no stronger conclusion: it guarantees that the integral of the smaller function is no larger than the integral of the greater one.
This principle is useful whenever an integral is difficult to evaluate directly but the integrand can be compared with another integrable function whose integral is known. The proof itself remains the same: establish the order on the entire interval, form the nonnegative difference, and invoke positivity. The accuracy of the conclusion depends on checking both the pointwise inequality and the direction of integration.
Check Your Understanding
For each question, identify the pointwise difference before drawing a conclusion about the integrals.
- If \(f\) and \(g\) are Riemann integrable on \([a,b]\), with \(a\le b\) and \(f(x)\le g(x)\) throughout, which difference should be integrated to prove the comparison?
- Why is that difference Riemann integrable under the theorem's hypotheses?
- For \(f(x)=x^2\) and \(g(x)=x^2+x\) on \([0,1]\), compute \(g-f\) and state the resulting order of the integrals.
- If \(f\le g\) on \([b,a]\) but the integral limits are written from \(a\) to \(b\), which way does the integral inequality point?
- Does a strict pointwise inequality at only one point necessarily imply strict inequality between the integrals? Explain briefly.