Real Analysis · Undergraduate

The Riemann Integral: Upper and Lower Sums

Quick answer

For a bounded function on [a, b] and a partition P, the lower sum L(f, P) uses the smallest value of f on each piece and the upper sum U(f, P) the largest. The function is integrable when the largest lower sum and the smallest upper sum agree, and that common value is the integral. Equivalently, for every ε > 0 some partition has U(f, P) − L(f, P) < ε. Monotone and continuous functions pass this test; the Dirichlet function, 1 on rationals and 0 on irrationals, does not.

What you'll learn

  • Compute upper and lower sums for a partition
  • State the definition of the Riemann (Darboux) integral
  • Use the criterion U − L < ε to prove integrability
  • Show the Dirichlet function is not integrable

Squeezing the area

Let ff be bounded on [a,b][a, b] and let P={x0,x1,…,xn}P = \{x_0, x_1, \ldots, x_n\} with a=x0<x1<⋯<xn=ba = x_0 < x_1 < \cdots < x_n = b be a partition. On the iith piece, let mim_i and MiM_i be the infimum and supremum of ff, and Δxi=xi−xi−1\Delta x_i = x_i - x_{i-1}:

L(f,P)=∑i=1nmi ΔxiU(f,P)=∑i=1nMi ΔxiL(f, P) = \sum_{i=1}^{n} m_i\,\Delta x_i \qquad U(f, P) = \sum_{i=1}^{n} M_i\,\Delta x_i

Adding points to a partition raises lower sums and lowers upper sums, so every lower sum is at most every upper sum. The function is integrable when sup⁡PL(f,P)=inf⁡PU(f,P)\sup_P L(f, P) = \inf_P U(f, P), and this number is ∫abf\int_a^b f. These are the Riemann sums of calculus with the most extreme choice of sample point.

Upper and lower sums for f(x) = x with P = {0, ½, 1} The line y = x on [0, 1] with two upper rectangles, of heights 1/2 on [0, 1/2] and 1 on [1/2, 1], whose total area 3/4 is the upper sum, and a dashed line at height 1/2 over [1/2, 1] marking the one lower rectangle, whose area 1/4 is the lower sum. 11xy
  • y = x
Upper and lower sums for f(x) = x with P = {0, ½, 1}

Why U − L < ε is the right test

If some partition has U(f,P)−L(f,P)<εU(f, P) - L(f, P) < \varepsilon, then inf⁡U−sup⁡L≤U(f,P)−L(f,P)<ε\inf U - \sup L \le U(f, P) - L(f, P) < \varepsilon. Since this holds for every ε>0\varepsilon > 0, the gap between sup⁡L\sup L and inf⁡U\inf U is 00, and ff is integrable. The converse holds too, by taking a partition fine enough for both. For an increasing ff and nn equal pieces, the sum telescopes: U−L=(f(b)−f(a))(b−a)nU - L = \tfrac{(f(b) - f(a))(b - a)}{n}, which shrinks to 00. For continuous ff, uniform continuity makes every Mi−miM_i - m_i small at once.

Worked examples

Common mistakes

Practice problems

  1. Find L(f,P)L(f, P) for f(x)=x2f(x) = x^2 on [0,2][0, 2] with P={0,1,2}P = \{0, 1, 2\}.

    Answer

    11

    Full solution

    ff is increasing, so mim_i is the left value: 0⋅1+1⋅10 \cdot 1 + 1 \cdot 1.

  2. Find U(f,P)U(f, P) for f(x)=x2f(x) = x^2 on [0,2][0, 2] with P={0,1,2}P = \{0, 1, 2\}.

    Answer

    55

    Full solution

    1⋅1+4⋅11 \cdot 1 + 4 \cdot 1.

  3. For f(x)=2xf(x) = 2x on [0,1][0, 1] with 44 equal pieces, find U−LU - L.

    Answer

    12\tfrac{1}{2}

    Full solution

    (f(1)−f(0))(1−0)4=24\tfrac{(f(1) - f(0))(1 - 0)}{4} = \tfrac{2}{4}.

  4. For f(x)=xf(x) = x on [0,1][0, 1], how many equal pieces make U−L=0.01U - L = 0.01?

    Answer

    100100

    Full solution

    U−L=1nU - L = \tfrac{1}{n}.

  5. Find L(f,P)L(f, P) for f(x)=3−xf(x) = 3 - x on [0,3][0, 3] with P={0,1,2,3}P = \{0, 1, 2, 3\}.

    Answer

    33

    Full solution

    ff is decreasing, so mim_i is the right value: 2+1+02 + 1 + 0.

  6. Find U(f,P)U(f, P) for f(x)=3−xf(x) = 3 - x on [0,3][0, 3] with P={0,1,2,3}P = \{0, 1, 2, 3\}.

    Answer

    66

    Full solution

    The left values: 3+2+13 + 2 + 1.

  7. Is the Dirichlet function integrable on [0,2][0, 2]?

    Answer

    No

    Full solution

    Every lower sum is 00 and every upper sum is 22.

  8. For f(x)=xf(x) = x on [0,1][0, 1] with 1010 equal pieces, a student claims U−L=0U - L = 0. Find U−LU - L.

    Answer

    0.10.1

    Full solution

    U−L=1n=110U - L = \tfrac{1}{n} = \tfrac{1}{10}.

Frequently asked questions

What are upper and lower sums?

For a partition of [a, b], the lower sum adds (smallest value of f on each piece) × (piece width), and the upper sum uses the largest value.

When is a function Riemann integrable?

When the supremum of the lower sums equals the infimum of the upper sums. That common number is the integral.

What is the integrability criterion?

f is integrable if and only if for every ε > 0 there is a partition P with U(f, P) − L(f, P) < ε.

Which functions are integrable?

Every monotone function and every continuous function on [a, b]. The Dirichlet function is a standard example that is not.

What to learn next