Comparing Functions by Comparing Their Integrals
Definite integrals record signed accumulation across an interval. If one function is at least as large as another at every point, it is natural to expect its accumulated value to be at least as large too. The integral comparison principle makes that expectation precise.
The principle is useful when an integral is difficult to compute directly but its integrand can be compared with a simpler one. It also raises an important question: if the functions are ordered, when must their integrals be strictly ordered, and when can the integrals be equal?
The Integral Comparison Principle
The condition must hold across the whole interval, not just at selected points. The theorem compares the integrals over the same interval and in the same orientation. The strict inequality \(a<b\) avoids the zero-length case, where both integrals are zero.
The reason behind the comparison is already contained in two basic properties: linearity of the integral and positivity for nonnegative functions. Subtract the smaller function from the larger one. The difference is nonnegative at every point, so its integral is nonnegative. Linearity then expresses that integral as the difference between the two original integrals:
Rearranging the final inequality gives the comparison principle. This argument explains why the method works: the pointwise gap cannot accumulate to a negative value. The key is to compare the difference \(g-f\), rather than to try to compare the two integral calculations separately.
Worked Comparisons
Worked Example: A Strict Inequality Across the Interval
Compare the integrals of \(f(x)=2x+1\) and \(g(x)=3x+2\) on \([0,2]\).
First check the pointwise order by subtracting:
For \(0\le x\le 2\), \(x+1\ge 1>0\), so \(f(x)<g(x)\) throughout the interval. Compute the first integral:
Compute the second:
Thus \(6<10\), in agreement with the pointwise comparison. As a check, integrate the difference: \(\int_0^2(x+1)\,dx=[x^2/2+x]_0^2=2+2=4\), and the difference of the computed integrals is also \(10-6=4\).
Worked Example: Equal Functions in Different Algebraic Forms
Compare \(f(x)=(x-1)^2\) and \(g(x)=x^2-2x+1\) on \([0,2]\). Expanding \(f\) gives \(f(x)=x^2-2x+1=g(x)\) at every point. Therefore, the pointwise inequality holds in both directions, and the integrals must be equal.
Calculate the integral using either expression:
At the upper endpoint, the antiderivative is \(8/3-4+2=8/3-2=2/3\). At the lower endpoint it is \(0\). Hence both integrals equal \(2/3\). Substitution into the antiderivative confirms the result: its derivative is \(x^2-2x+1=(x-1)^2\). Equality here occurs because the functions themselves agree everywhere.
Worked Example: Ordered Functions That Touch at One Point
Let \(f(x)=x^2\) and \(g(x)=x^2+(x-1)^2\) on \([0,2]\). Since \((x-1)^2\ge0\), we have \(f(x)\le g(x)\) everywhere. At \(x=1\) the functions are equal, while at every other point they are strictly ordered.
The integral of \(f\) is
For \(g\), first expand \((x-1)^2=x^2-2x+1\), so \(g(x)=2x^2-2x+1\). Then
The difference is \(10/3-8/3=2/3\). Checking directly, \(\int_0^2(g-f)\,dx=\int_0^2(x-1)^2\,dx=2/3\), the same value. A single point of equality does not make the integrals equal: the functions differ over the rest of the interval.
When Can Equality Occur?
The comparison theorem gives a non-strict inequality. Pointwise order alone does not always guarantee a strict inequality between the integrals. The answer depends in part on whether the functions are continuous.
To see why, let \(h=g-f\). This function is continuous and nonnegative, and linearity gives \(\int_a^b h(x)\,dx=\int_a^b g(x)\,dx-\int_a^b f(x)\,dx\). If the integrals are equal, then \(\int_a^b h(x)\,dx=0\). Suppose instead that \(h(c)>0\) at some \(c\in[a,b]\). By continuity, \(h\) stays above \(h(c)/2>0\) in a sufficiently small interval around \(c\), or in a one-sided interval if \(c\) is an endpoint. That interval has positive length. Positivity of the integral then implies that the integral of \(h\) is positive, contradicting \(\int_a^b h(x)\,dx=0\). Therefore \(h(c)=0\) at every point, so \(f=g\) everywhere. Conversely, if \(f=g\) everywhere, their integrals are equal by substitution.
Continuity matters. For general Riemann integrable functions, values at isolated points can differ without changing an integral. Thus equal integrals do not always imply that two ordered functions agree pointwise.
Worked Example: A Difference at One Point Does Not Change the Integral
On \([0,2]\), define \(f(x)=0\) for every \(x\), and define \(g(1)=1\) while \(g(x)=0\) for \(x\ne1\). Then \(f(x)\le g(x)\) everywhere, and \(f\) and \(g\) differ at \(x=1\).
The integral of \(f\) is \(\int_0^2 0\,dx=0\). To see the value for \(g\), take a partition with mesh (the largest subinterval length) less than \(\varepsilon\). Every subinterval not containing \(1\) contributes zero to any tagged Riemann sum. Only a subinterval containing \(1\) can contribute a nonzero term, and its contribution has absolute value at most its length, which is less than \(\varepsilon\). Since this can be done for every \(\varepsilon>0\), the Riemann sums converge to zero, so \(\int_0^2g(x)\,dx=0\). The integrals are equal although the functions differ at one point. The discontinuity at that point is why the continuous-function equality criterion does not apply.
A Common Mistake
A frequent error is to reverse the direction of the comparison. For example, on \([0,2]\), let \(f(x)=0\) and \(g(x)=1\). Since \(0\le1\), a mistaken calculation might claim \(\int_0^2 f(x)\,dx\ge\int_0^2g(x)\,dx\). But the actual integrals are
so the correct order is \(0\le2\). A reliable check is to form \(g-f\): if \(f\le g\), then \(g-f\ge0\), and therefore its integral must equal \(\int g-\int f\ge0\), not the reverse.
Using Comparison Carefully
Before applying the principle, verify its conditions. Both functions must be integrable on the same interval, and the pointwise inequality must hold throughout that interval. Once those facts are established, compare their integrals without needing to compute either one. If exact values are available, comparing the difference integral is a useful check. For equality, distinguish the continuous case, where equality of integrals forces equality everywhere, from the general integrable case, where isolated differences can have no effect on the integral.
Check Your Understanding
Answer each question using the comparison principle and the equality discussion.
- If \(f\) and \(g\) are integrable on \([1,4]\) and \(f(x)\le g(x)\) for every \(x\), what inequality must their integrals satisfy?
- Why does the nonnegativity of \(g-f\) explain the direction of the integral comparison?
- If continuous functions satisfy \(f\le g\) and their integrals are equal, what must be true at every point?
- Can two Riemann integrable functions differ at one point and still have equal integrals? Explain briefly.
- For \(f(x)=x\) and \(g(x)=x+2\) on \([0,1]\), determine the order of their integrals without computing their exact values.