Tutorials › AP Calculus › Positivity and Integral Comparison

Riemann Sums and Definite Integrals · Tutorial 448 of 999

Positivity and Integral Comparison

Use nonnegativity and pointwise bounds to determine the sign of an integral and compare integral values on a shared interval.

Beginner 9 min read

What You'll Learn

  • Determine when a nonnegative function has a nonnegative definite integral.
  • Compare the integrals of two Riemann-integrable functions on the same interval.
  • Use constant bounds to estimate an integral.
  • Justify integral inequalities with Riemann sums.
  • Recognize why a pointwise inequality must hold throughout the interval.

Why Pointwise Information Can Compare Integrals

A definite integral records accumulated signed area across an interval. If a function never falls below zero, its accumulated value cannot be negative. More generally, if one function stays below another at every point of an interval, its accumulated value cannot exceed the other function’s.

These conclusions let you reason about an integral even when you do not know its exact value. The key is to keep track of the interval and to check that the relevant pointwise condition holds throughout it.

Nonnegative Functions and the Sign of an Integral

Assume \(f\) is Riemann integrable on a closed interval \([a,b]\), where \(a\le b\). The phrase nonnegative on \([a,b]\) means \(f(x)\ge 0\) for every \(x\) in that interval.

Theorem: If \(f\) is Riemann integrable on \([a,b]\) and \(f(x)\ge 0\) for every \(x\in[a,b]\), then \(\int_a^b f(x)\,dx\ge 0\).

Continuity on \([a,b]\) is a common sufficient condition for Riemann integrability. The theorem’s sign conclusion follows from the Riemann-sum definition of the integral. Divide the interval into subintervals of positive width, choose a sample point in each, and form the sum of each function value times its subinterval width. Each term is nonnegative, so the sum is nonnegative. If these sums converge to the definite integral as the partition is refined, their limit is also nonnegative.

$$ \sum_{i=1}^{n} f(x_i^*)\,\Delta x_i \ge 0 \quad\Longrightarrow\quad \int_a^b f(x)\,dx\ge 0. $$

Here \(\Delta x_i\) is the width of the \(i\)th subinterval and \(x_i^*\) is its chosen sample point. When \(a=b\), the integral is \(0\), so the conclusion also holds.

Nonnegativity guarantees that the integral is at least zero; it does not by itself guarantee that the integral is strictly positive. For example, the zero function is nonnegative but its integral is zero. A useful stricter conclusion is available for continuous functions: if \(f\ge 0\) on \([a,b]\), \(a<b\), and \(f(c)>0\) at some point \(c\in[a,b]\), then \(\int_a^b f(x)\,dx>0\). By continuity, \(f\) stays greater than \(f(c)/2>0\) on a sufficiently short interval around \(c\), or on a one-sided interval if \(c\) is an endpoint. That interval has positive length, so its contribution is positive; the rest of the integral is nonnegative.

Worked Example: Establishing a Nonnegative Integral

Find the sign and value of \(\int_0^2 (2-x)\,dx\) using Riemann sums.

For \(0\le x\le 2\), \(2-x\ge 0\), so the theorem already tells us that the integral is nonnegative. To compute it, divide \([0,2]\) into \(n\) equal subintervals, each of width \(\Delta x=2/n\), and choose right endpoints \(x_i=2i/n\), for \(i=1,\ldots,n\).

$$ \begin{aligned} \sum_{i=1}^{n}(2-x_i)\Delta x &=\sum_{i=1}^{n}\left(2-\frac{2i}{n}\right)\frac{2}{n}\\ &=\sum_{i=1}^{n}\left(\frac{4}{n}-\frac{4i}{n^2}\right)\\ &=4-\frac{4}{n^2}\sum_{i=1}^{n}i\\ &=4-\frac{4}{n^2}\cdot\frac{n(n+1)}{2}\\ &=4-\frac{2(n+1)}{n}\\ &=2-\frac{2}{n}. \end{aligned} $$

Taking the limit as \(n\to\infty\) gives \(\int_0^2(2-x)\,dx=2\). This agrees with the area of the triangle under the line: its base is \(2\), its height is \(2\), and \(\frac12(2)(2)=2\). The computed value is positive, as the nonnegativity theorem requires.

Comparing Two Integrals on the Same Interval

The same reasoning compares two functions. Suppose \(f\) and \(g\) are Riemann integrable on the same interval \([a,b]\), and \(f(x)\le g(x)\) at every point of that interval. Then \(g-f\ge 0\). By linearity of the definite integral and the nonnegativity theorem, the integral of \(g-f\) is nonnegative. Rearranging gives the comparison result.

Theorem: If \(f\) and \(g\) are Riemann integrable on \([a,b]\), where \(a\le b\), and \(f(x)\le g(x)\) for every \(x\in[a,b]\), then \(\int_a^b f(x)\,dx\le\int_a^b g(x)\,dx\).

This argument explains why the pointwise condition matters: subtracting the lower function from the upper one produces a nonnegative function whose integral cannot be negative. The integrals must be taken over the same interval so that this subtraction and comparison apply across the same set of points.

1
Check the functions and interval.
Both functions must be integrable on the same interval \([a,b]\).
2
Check the pointwise inequality.
Verify \(f(x)\le g(x)\) for every \(x\in[a,b]\), not just at selected points.
3
Compare the integrals.
The integral of \(f\) is no greater than the integral of \(g\).

Worked Example: Comparing Two Linear Functions

Compare \(\int_0^2 x\,dx\) and \(\int_0^2(2x+1)\,dx\).

For every \(x\in[0,2]\), \(x\ge 0\), so \(2x+1-x=x+1\ge 0\). Thus \(x\le 2x+1\) throughout the interval, and the comparison theorem says the first integral is no greater than the second.

Using equal subintervals of width \(2/n\) and right endpoints \(x_i=2i/n\), the Riemann sum for the first function is

$$ \begin{aligned} \sum_{i=1}^{n}x_i\frac{2}{n} &=\sum_{i=1}^{n}\frac{2i}{n}\frac{2}{n}\\ &=\frac{4}{n^2}\cdot\frac{n(n+1)}{2}\\ &=\frac{2(n+1)}{n} \longrightarrow 2. \end{aligned} $$

For the second function, the sum is

$$ \begin{aligned} \sum_{i=1}^{n}\left(2\cdot\frac{2i}{n}+1\right)\frac{2}{n} &=\sum_{i=1}^{n}\left(\frac{8i}{n^2}+\frac{2}{n}\right)\\ &=\frac{8}{n^2}\cdot\frac{n(n+1)}{2}+2\\ &=\frac{4(n+1)}{n}+2 \longrightarrow 6. \end{aligned} $$

Therefore, \(\int_0^2x\,dx=2\) and \(\int_0^2(2x+1)\,dx=6\), so \(2\le 6\), as predicted. As a check, the difference of the integrals is \(6-2=4\), which is the integral of \(x+1\) over \([0,2]\). Its value is positive, consistent with \(x+1\ge0\) on that interval.

Constant Bounds Give Integral Estimates

A pointwise comparison with a constant function produces simple upper and lower bounds. If \(m\le f(x)\le M\) for every \(x\in[a,b]\), where \(m\) and \(M\) are constants and \(a\le b\), then \(m\le f\le M\). Integrating these inequalities gives \(m(b-a)\le\int_a^b f(x)\,dx\le M(b-a)\), since the integral of a constant \(c\) on that interval is \(c(b-a)\). The interval length is nonnegative, which preserves the inequalities.

Worked Example: Bounding an Integral with Constants

Bound \(\int_0^2(1+x)\,dx\) using constant functions, then compute it to check the bounds.

On \([0,2]\), \(0\le x\le 2\), so \(1\le1+x\le3\). Integrating the constant bounds over an interval of length \(2\) gives

$$ 1\cdot2\le\int_0^2(1+x)\,dx\le3\cdot2, \qquad\text{so}\qquad 2\le\int_0^2(1+x)\,dx\le6. $$

For a direct computation, use right endpoints \(x_i=2i/n\) and width \(2/n\):

$$ \begin{aligned} \sum_{i=1}^{n}\left(1+\frac{2i}{n}\right)\frac{2}{n} &=2+\frac{4}{n^2}\sum_{i=1}^{n}i\\ &=2+\frac{4}{n^2}\cdot\frac{n(n+1)}{2}\\ &=2+\frac{2(n+1)}{n} \longrightarrow 4. \end{aligned} $$

The integral is \(4\), which satisfies the bounds \(2\le4\le6\). The result also agrees with the trapezoid’s area: its parallel sides have lengths \(1\) and \(3\), and its width is \(2\), giving \(\frac12(1+3)(2)=4\).

A Common Mistake: Checking the Inequality at Too Few Points

The comparison theorem requires the pointwise inequality to hold over the entire interval. Checking only an endpoint, or observing the inequality at a few sample points, is not enough. For example, one might incorrectly claim \(x\le1\) on \([0,3]\) because it is true at \(x=0\). But at \(x=2\), the claim fails: \(2\not\le1\).

The resulting integrals show why that unchecked claim would be misleading. On \([0,3]\), \(\int_0^3x\,dx=9/2\), while \(\int_0^3 1\,dx=3\). Thus the first integral is greater, not less. The comparison theorem does not apply in the claimed direction because its pointwise condition is false. On the shorter interval \([0,1]\), however, \(x\le1\) holds everywhere, and the valid comparison is \(\int_0^1x\,dx=1/2\le1=\int_0^1 1\,dx\).

Takeaway: Nonnegativity and pointwise comparison give reliable conclusions about definite integrals only when their conditions hold on the whole interval of integration.

Check Your Understanding

Use the sign and comparison properties of definite integrals to answer these questions.

  1. If \(f\) is Riemann integrable on \([1,4]\) and \(f(x)\ge0\) throughout the interval, what can you conclude about \(\int_1^4 f(x)\,dx\)?
  2. If \(f(x)\le g(x)\) for every \(x\in[0,2]\), what inequality relates their integrals over \([0,2]\)?
  3. If \(2\le h(x)\le5\) for every \(x\in[1,4]\), give lower and upper bounds for \(\int_1^4h(x)\,dx\).
  4. Why is it not enough to verify \(f(x)\le g(x)\) at only a few points before comparing their integrals?
  5. Does \(f(x)\ge0\) throughout an interval guarantee that its integral is strictly positive? Explain.

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon