Upper and lower sums
Let \(f\) be a bounded function on \([a, b]\). Cut the interval into pieces with a partition \(P\): points \(a = x_0 < x_1 < \cdots < x_n = b\). On each piece, let \(m_i\) and \(M_i\) be the infimum and supremum of \(f\) there. Then
\[ L(f, P) = \sum_{i=1}^n m_i\,(x_i - x_{i-1}), \qquad U(f, P) = \sum_{i=1}^n M_i\,(x_i - x_{i-1}) \]are the lower and upper sums: the total area of rectangles sitting under the graph, and of rectangles covering it. Using infimum and supremum rather than minimum and maximum means this works even for functions that don't reach their extreme values (Unit 3's completeness at work again).
The amber gap between the two sums shrinks as the strips get thinner. With 64 strips, \(L = 5.964\) and \(U = 6.060\). The true area, \(6.0121\ldots\), is trapped in between every time.
The definition
Two facts make the squeeze work. First, refining a partition (adding more points) can only raise the lower sum and lower the upper sum: splitting a strip can't make its infimum smaller or its supremum bigger. Second, it follows that every lower sum is at most every upper sum, even for unrelated partitions: compare both with their common refinement.
So the set of all lower sums is bounded above (by any upper sum), and has a supremum; the set of all upper sums has an infimum. These are the lower and upper integrals, and \(\text{lower} \le \text{upper}\).
Definition
A bounded function \(f\) is (Riemann) integrable on \([a, b]\) if its lower and upper integrals are equal:
\[ \sup_P L(f, P) = \inf_P U(f, P). \]This common value is the integral \(\displaystyle\int_a^b f(x)\,dx\).
Riemann's own definition uses Riemann sums \(\sum f(t_i)(x_i - x_{i-1})\), with any sample point \(t_i\) in each piece, and asks them to converge as the pieces get thinner. Since every Riemann sum lies between \(L\) and \(U\), the two definitions agree.
A practical test
Riemann's criterion
\(f\) is integrable on \([a, b]\) if and only if for every \(\varepsilon > 0\) there is a partition \(P\) with \(U(f, P) - L(f, P) < \varepsilon\).
In pictures: you can make the total amber area as small as you like. This is the version used in practice, because it involves one partition at a time.
Example: \(\int_0^1 x^2\,dx\)
Split \([0, 1]\) into \(n\) equal pieces. Since \(x^2\) is increasing, the infimum on each piece is at its left end, the supremum at its right end:
\[ L_n = \frac1n\sum_{i=0}^{n-1}\left(\frac in\right)^2 = \frac{(n - 1)n(2n - 1)}{6n^3}, \qquad U_n = \frac1n\sum_{i=1}^{n}\left(\frac in\right)^2 = \frac{n(n + 1)(2n + 1)}{6n^3}. \]Both tend to \(\frac13\), and \(U_n - L_n = \frac1n \to 0\). For \(n = 10\): \(0.285 \le \int_0^1 x^2\,dx \le 0.385\). The integral is \(\frac13\), as Archimedes found for the parabola over two thousand years ago.
Which functions are integrable?
Theorem
Every monotone function on \([a, b]\) is integrable. Every continuous function on \([a, b]\) is integrable.
Proof for monotone functions
Say \(f\) is increasing, and use \(n\) equal pieces of width \(h = \frac{b - a}n\). On each piece the supremum is the value at the right end, the infimum at the left end. So the differences telescope:
\[ U - L = h\sum_{i=1}^n \big(f(x_i) - f(x_{i-1})\big) = h\,\big(f(b) - f(a)\big) \to 0. \]Stack the amber blocks of the picture in one column and you can see it: their heights add up to the total rise. ∎
Proof for continuous functions
By the Heine–Cantor theorem of Unit 6, \(f\) is uniformly continuous on \([a, b]\). Given \(\varepsilon\), pick \(\delta\) so that \(|x - y| < \delta\) forces \(|f(x) - f(y)| < \frac{\varepsilon}{b - a}\). Use any partition with pieces narrower than \(\delta\). On each piece, \(M_i - m_i \le \frac{\varepsilon}{b - a}\) (both are attained, by the EVT). So
\[ U - L = \sum (M_i - m_i)(x_i - x_{i-1}) \le \frac{\varepsilon}{b - a}\,(b - a) = \varepsilon. \]Uniformity is exactly what's needed: one \(\delta\) has to work for every strip at once. ∎
Integrability is forgiving. Changing a function at finitely many points doesn't change whether it's integrable, or its integral: each changed point sits in strips that can be made as thin as you like. So a step function, or a function with a few jumps, is integrable too.
A function with no integral
Yet "most" points are irrational (Unit 1: the rationals are countable), so intuitively the area should be 0. The Riemann integral can't see that. This weakness led Lebesgue, in 1902, to a more powerful integral that measures the size of the set where a function takes each value, rather than chopping up the \(x\)-axis. The Lebesgue integral of Dirichlet's function is 0. More on this in Unit 12.
Going deeper: exactly which functions are integrable
Thomae's popcorn function from Unit 5 is discontinuous at every rational, infinitely many points, yet it is integrable, with integral 0. Only finitely many points have height above any \(\varepsilon\), and they can be fenced into strips of tiny total width.
Lebesgue found the exact answer: a bounded function is Riemann integrable if and only if its set of discontinuities has measure zero, meaning it can be covered by intervals of total length as small as you like. Any countable set has measure zero (cover the \(k\)th point by an interval of length \(\varepsilon/2^k\)), so Thomae passes. Dirichlet's function is discontinuous everywhere, and \([0, 1]\) does not have measure zero.
Properties of the integral
All of these follow from the definition by working with upper and lower sums:
| Property | Statement |
|---|---|
| Linearity | \(\int (cf + g) = c\int f + \int g\) |
| Additivity | \(\int_a^b f = \int_a^c f + \int_c^b f\) |
| Monotonicity | If \(f \le g\), then \(\int f \le \int g\) |
| Triangle inequality | \(\left|\int f\right| \le \int |f|\) |
| Bounds | If \(m \le f \le M\), then \(m(b - a) \le \int_a^b f \le M(b - a)\) |
Mean value theorem for integrals
If \(f\) is continuous on \([a, b]\), then \(\displaystyle\int_a^b f = f(c)\,(b - a)\) for some \(c\) in \([a, b]\).
By the bounds property, \(\frac1{b - a}\int_a^b f\) lies between the minimum and maximum of \(f\), and the IVT says \(f\) takes that value somewhere. The average height of a continuous function is one of its heights.
History
Archimedes found the area under a parabola around 250 BC by exhaustion, a squeeze much like the one here. Newton and Leibniz treated integrals as antiderivatives. Cauchy defined the integral of a continuous function as a limit of sums in 1823; Riemann extended the definition to discontinuous functions in 1854, in a paper on Fourier series; Darboux introduced upper and lower sums in 1875.
Practice set
Mixed questions covering the whole unit. Try each one before opening the answer.
1. Use upper and lower sums with \(n\) equal pieces to show \(\int_0^1 x\,dx = \frac12\).
Show answer
\(L_n = \frac1n\sum_{i=0}^{n-1}\frac in = \frac{n - 1}{2n}\) and \(U_n = \frac{n + 1}{2n}\). Both tend to \(\frac12\), and \(U_n - L_n = \frac1n \to 0\).
2. Let \(f = 0\) on \([0, 1]\) except \(f(\frac12) = 5\). Show \(f\) is integrable with integral 0.
Show answer
Every lower sum is 0. Take a partition with \(\frac12\) inside one piece of width \(\delta\): the upper sum is \(5\delta\). Making \(\delta\) small gives \(U - L < \varepsilon\), and the integral is 0.
3. Why does every lower sum lie below every upper sum, even for two unrelated partitions?
Show answer
Let \(Q\) be the union of the partitions \(P_1\) and \(P_2\). Refining raises lower sums and lowers upper sums, so \(L(P_1) \le L(Q) \le U(Q) \le U(P_2)\).
4. Is \(f(x) = \sin(1/x)\) (with \(f(0) = 0\)) integrable on \([0, 1]\)?
Show answer
Yes. It's bounded and continuous except at one point. Put 0 in a piece of width \(\delta\): that piece contributes at most \(2\delta\) to \(U - L\). On \([\delta, 1]\) the function is continuous, hence integrable, so the rest can be made small too.
5. Find \(c\) as in the mean value theorem for integrals for \(f(x) = x^2\) on \([0, 1]\).
Show answer
\(\int_0^1 x^2 = \frac13 = c^2\cdot1\), so \(c = \frac1{\sqrt3} \approx 0.577\).
6. If \(f\) is integrable, must \(|f|\) be? And the converse?
Show answer
Yes: on each piece, the spread of \(|f|\) is at most the spread of \(f\), so \(U - L\) only shrinks. The converse fails: \(f = 1\) on rationals and \(-1\) on irrationals is not integrable, but \(|f| = 1\) is.
Summary and glossary
- Lower sums use the infimum on each piece, upper sums the supremum; refining squeezes them together.
- \(f\) is integrable when the best lower and upper bounds meet: \(\sup L = \inf U\).
- Test: for every \(\varepsilon\), some partition has \(U - L < \varepsilon\).
- Monotone and continuous functions are integrable; the continuous case needs uniform continuity.
- Dirichlet's function is not Riemann integrable: every \(U = 1\), every \(L = 0\).
- Partition
- A finite set of points cutting \([a, b]\) into pieces.
- Lower and upper sums
- Areas of rectangles under and over the graph.
- Refinement
- A partition containing all the points of another, and more.
- Riemann sum
- \(\sum f(t_i)\,\Delta x_i\), with a sample point in each piece.
- Measure zero
- Coverable by intervals of arbitrarily small total length.