Skip to main content
Logo image

Section 10.4 The set of Riemann integrable functions

Note: 1 lecture

Subsection 10.4.1 Oscillation and continuity

Consider \(D \subset \R^n\) and \(f \colon D \to \R\text{.}\) Instead of just saying that \(f\) is or is not continuous at a point \(x \in D\text{,}\) we want to quantify how discontinuous is \(f\) at \(x\text{.}\) For every \(\delta > 0\text{,}\) define the oscillation of \(f\) on the \(\delta\)-ball in subspace topology, \(B_D(x,\delta) = B_{\R^n}(x,\delta) \cap D\text{,}\) as
\begin{equation*} o(f,x,\delta) \coloneqq {\sup_{y \in B_D(x,\delta)} f(y)} - {\inf_{y \in B_D(x,\delta)} f(y)} = \sup_{y_1,y_2 \in B_D(x,\delta)} \bigl(f(y_1)-f(y_2)\bigr) . \end{equation*}
That is, \(o(f,x,\delta)\) is the length of the smallest interval that contains the image \(f\bigl(B_D(x,\delta)\bigr)\text{.}\) The definition makes sense for unbounded functions, where the oscillation can be \(\infty\text{,}\) although we will mainly consider bounded functions. Clearly \(o(f,x,\delta) \geq 0\) and \(o(f,x,\delta) \leq o(f,x,\delta')\) whenever \(\delta < \delta'\text{.}\) Therefore, the limit as \(\delta \to 0\) from the right exists, and we define the oscillation of \(f\) at \(x\) as
\begin{equation*} o(f,x) \coloneqq \lim_{\delta \to 0^+} o(f,x,\delta) = \inf_{\delta > 0} o(f,x,\delta) . \end{equation*}
We will prove that function is continuous at \(x\) if and only if \(o(f,x) = 0\text{.}\) Fox example, if \(f \colon \R \to \R\) is the Dirichlet function where \(f(x)=1\) if \(x \in \Q\) and \(f(x)=0\) otherwise, then \(o(f,x) = 1\) for every \(x\text{,}\) as any interval contains both rational and irrational numbers. Accordingly, \(f\) is not continuous at any \(x\text{.}\) For another example, which is perhaps the origin of the terminology, let \(g \colon \R \to \R\) be given by \(g(x) = \sin(\nicefrac{1}{x})\) for \(x\neq 0\) and \(g(0)=0\text{,}\) see Figure 10.11. Then at the discontinuity at \(x=0\text{,}\) we find \(o(g,0) = 2\text{,}\) as in any neighborhood of \(0\text{,}\) the function takes both values \(1\) and \(-1\text{.}\) For all \(x \neq 0\text{,}\) the function is continuous and so, as we will see, \(o(g,x) = 0\text{.}\)

Figure 10.11. Graph of \(\sin(\nicefrac{1}{x})\text{.}\)

Proof.

First suppose that \(f\) is continuous at \(x \in D\text{.}\) Given \(\epsilon > 0\text{,}\) there exists a \(\delta > 0\) such that for \(y \in B_D(x,\delta)\text{,}\) we have \(\sabs{f(x)-f(y)} < \epsilon\text{.}\) Therefore, if \(y_1,y_2 \in B_D(x,\delta)\text{,}\) then
\begin{equation*} f(y_1)-f(y_2) = \bigl(f(y_1)-f(x)\bigr)-\bigl(f(y_2)-f(x)\bigr) < \epsilon + \epsilon = 2 \epsilon . \end{equation*}
Take the supremum over \(y_1\) and \(y_2\) to find
\begin{equation*} o(f,x,\delta) = \sup_{y_1,y_2 \in B_D(x,\delta)} \bigl(f(y_1)-f(y_2)\bigr) \leq 2 \epsilon . \end{equation*}
As \(o(x,f) \leq o(f,x,\delta) \leq 2\epsilon\text{,}\) and \(\epsilon > 0\) was arbitrary, \(o(x,f) = 0\text{.}\)
On the other hand, suppose \(o(x,f) = 0\text{.}\) Given \(\epsilon > 0\text{,}\) find a \(\delta > 0\) such that \(o(f,x,\delta) < \epsilon\text{.}\) If \(y \in B_D(x,\delta)\text{,}\) then
\begin{equation*} \sabs{f(x)-f(y)} \leq \sup_{y_1,y_2 \in B_D(x,\delta)} \bigl(f(y_1)-f(y_2)\bigr) = o(f,x,\delta) < \epsilon. \qedhere \end{equation*}

Proof.

Equivalently, we want to show that \(G \coloneqq \bigl\{ x \in D : o(f,x) < \epsilon \bigr\}\) is open in the subspace topology. Consider \(x \in G\text{.}\) As \(\inf_{\delta > 0} o(f,x,\delta) < \epsilon\text{,}\) find a \(\delta > 0\) such that
\begin{equation*} o(f,x,\delta) < \epsilon . \end{equation*}
Take any \(\xi \in B_D(x,\nicefrac{\delta}{2})\text{.}\) Notice that \(B_D(\xi,\nicefrac{\delta}{2}) \subset B_D(x,\delta)\text{.}\) Therefore,
\begin{equation*} o(f,\xi,\nicefrac{\delta}{2}) = \sup_{y_1,y_2 \in B_D(\xi,\nicefrac{\delta}{2})} \bigl(f(y_1)-f(y_2)\bigr) \leq \sup_{y_1,y_2 \in B_D(x,\delta)} \bigl(f(y_1)-f(y_2)\bigr) = o(f,x,\delta) < \epsilon . \end{equation*}
So \(o(f,\xi) < \epsilon\) as well. As this is true for all \(\xi \in B_D(x,\nicefrac{\delta}{2})\text{,}\) we get that \(G\) is open in the subspace topology, and \(D \setminus G\) is closed as claimed.

Subsection 10.4.2 The set of Riemann integrable functions

We have seen that continuous functions are Riemann integrable, but we also know that certain kinds of discontinuities are allowed. It turns out that as long as the discontinuities happen on a set of measure zero, the function is integrable, and vice versa.

Proof.

Let \(S \subset R\) be the set of discontinuities of \(f\text{,}\) that is, \(S = \bigl\{ x \in R : o(f,x) > 0 \bigr\}\text{.}\) Suppose \(S\) is a measure zero set: \(m^*(S) = 0\text{.}\) The trick to proving that \(f\) is integrable is to isolate the bad set into a small set of subrectangles of a partition. A partition has finitely many subrectangles, so we need compactness. If \(S\) were closed, then it would be compact and we could cover it by finitely many small rectangles. Unfortunately, \(S\) itself is not closed in general, but the following set is. Given \(\epsilon > 0\text{,}\) define
\begin{equation*} S_\epsilon \coloneqq \bigl\{ x \in R : o(f,x) \geq \epsilon \bigr\} . \end{equation*}
By Proposition 10.4.2, \(S_\epsilon\) is closed, and as it is also a subset of the bounded \(R\text{,}\) \(S_\epsilon\) is compact. Moreover, \(S_\epsilon \subset S\) and \(S\) is of measure zero, so \(S_\epsilon\) is of measure zero. Via Proposition 10.3.7, finitely many open rectangles \(O_1,O_2,\ldots,O_k\) cover \(S_\epsilon\) and \(\sum_{j=1}^\infty V(O_j) < \epsilon\text{.}\)
The set \(T \coloneqq R \setminus ( O_1 \cup \cdots \cup O_k )\) is closed, bounded, and so compact. As \(o(f,x) < \epsilon\) for all \(x \in T\text{,}\) for each \(x \in T\text{,}\) there is a \(\delta > 0\) such that \(o(f,x,\delta) < \epsilon\text{,}\) so there exists a small closed rectangle \(T_x \subset B(x,\delta)\) with \(x\) in the interior of \(T_x\text{,}\) such that
\begin{equation*} \sup_{y\in T_x} f(y) - \inf_{y\in T_x} f(y) < \epsilon. \end{equation*}
The interiors of the rectangles \(T_x\) cover \(T\text{.}\) As \(T\) is compact, finitely many such rectangles \(T_1, T_2, \ldots, T_m\) cover \(T\text{.}\) Construct a partition \(P\) out of the endpoints of the rectangles \(T_1,T_2,\ldots,T_m\) and \(O_1,O_2,\ldots,O_k\) (ignoring those that are outside the endpoints of \(R\)). The subrectangles \(R_1,R_2,\ldots,R_p\) of \(P\) are such that every \(R_j\) is contained in \(T_\ell\) for some \(\ell\) or the closure of \(O_\ell\) for some \(\ell\text{.}\) Order the rectangles so that \(R_1,R_2,\ldots,R_q\) are those that are contained in some \(T_\ell\text{,}\) and \(R_{q+1},R_{q+2},\ldots,R_{p}\) are the rest. See Figure 10.12. So
\begin{equation*} \sum_{j=1}^q V(R_j) \leq V(R) \qquad \text{and} \qquad \sum_{j=q+1}^p V(R_j) \leq \sum_{\ell=1}^k V(O_\ell) < \epsilon . \end{equation*}
The second estimate holds because the \(R_j\) that are subsets of \(\widebar{O}_\ell\) give a partition of \(\widebar{O}_\ell\) and hence their volumes sum to \(V(O_\ell)\text{.}\) Let \(m_j\) and \(M_j\) be the inf and sup of \(f\) over \(R_j\) as usual. If \(R_j \subset T_\ell\) for some \(\ell\text{,}\) then \(M_j-m_j < \epsilon\text{.}\) Let \(B \in \R\) be such that \(\sabs{f(x)} \leq B\) for all \(x \in R\text{,}\) so \(M_j-m_j \leq 2B\) over all rectangles. Then
\begin{equation*} \begin{split} U(P,f)-L(P,f) & = \sum_{j=1}^p (M_j-m_j) V(R_j) \\ & = \left( \sum_{j=1}^q (M_j-m_j) V(R_j) \right) + \left( \sum_{j=q+1}^p (M_j-m_j) V(R_j) \right) \\ & < \left( \sum_{j=1}^q \epsilon\, V(R_j) \right) + \left( \sum_{j=q+1}^p 2 B\, V(R_j) \right) \\ & < \epsilon\, V(R) + 2B \epsilon = \epsilon \bigl(V(R)+2B\bigr) . \end{split} \end{equation*}
We can make the right-hand side as small as we want, and hence \(f\) is integrable.

Figure 10.12. A rectangle \(R\) with \(S_\epsilon\) marked as thick black line, and the \(O_\ell\) as shaded rectangles. The partition is given by the dotted lines. Note how the \(R_j\) partition the \(O_\ell\text{.}\)

For the other direction, suppose \(f\) is Riemann integrable on \(R\text{.}\) Let \(S\) be the set of discontinuities of \(f\) again. Consider the sequence of sets
\begin{equation*} S_{1/k} = \bigl\{ x \in R : o(f,x) \geq \nicefrac{1}{k} \bigr\}. \end{equation*}
Fix a \(k \in \N\text{.}\) Given an \(\epsilon > 0\text{,}\) find a partition \(P\) with subrectangles \(R_1,R_2,\ldots,R_p\) such that
\begin{equation*} U(P,f)-L(P,f) = \sum_{j=1}^p (M_j-m_j) V(R_j) < \epsilon . \end{equation*}
Suppose \(R_1,R_2,\ldots,R_p\) are ordered so that the interiors of \(R_1,R_2,\ldots,R_{q}\) intersect \(S_{1/k}\text{,}\) while the interiors of \(R_{q+1},R_{q+2},\ldots,R_p\) are disjoint from \(S_{1/k}\text{.}\) Let \(R_j^\circ\) denote the interior of \(R_j\text{.}\) Suppose \(j \leq q\) and consider \(x \in R_j^\circ \cap S_{1/k}\text{.}\) Let \(\delta > 0\) be small enough so that \(B(x,\delta) \subset R_j\text{.}\) As \(x \in S_{1/k}\text{,}\) we get \(o(f,x,\delta) \geq o(f,x) \geq \nicefrac{1}{k}\text{,}\) which, along with \(B(x,\delta) \subset R_j\text{,}\) implies \(M_j-m_j \geq \nicefrac{1}{k}\text{.}\) Then
\begin{equation*} \epsilon > \sum_{j=1}^p (M_j-m_j) V(R_j) \geq \sum_{j=1}^q (M_j-m_j) V(R_j) \geq \frac{1}{k} \sum_{j=1}^q V(R_j) . \end{equation*}
In other words, \(\sum_{j=1}^q V(R_j) < k \epsilon\text{.}\) Let \(G\) be the set of all boundaries of all the subrectangles of \(P\text{.}\) The set \(G\) is of measure zero (it can be covered by finitely many sets from Example 10.3.5). We find
\begin{equation*} S_{1/k} \subset R_1^\circ \cup R_2^\circ \cup \cdots \cup R_q^\circ \cup G . \end{equation*}
As \(G\) can also be covered by open rectangles arbitrarily small volume, \(S_{1/k}\) must be of measure zero. As
\begin{equation*} S = \bigcup_{k=1}^\infty S_{1/k} \end{equation*}
and a countable union of measure zero sets is of measure zero, \(S\) is of measure zero.
The proof is contained in the exercises.

Exercises 10.4.3 Exercises

10.4.1.

Suppose \(f \colon (a,b) \times (c,d) \to \R\) is a bounded continuous function. Show that the integral of \(f\) over \(R = [a,b] \times [c,d]\) makes sense and is uniquely defined. That is, set \(f\) to be anything (bounded) on the boundary of \(R\) and compute the integral, showing that the values on the boundary are irrelevant.

10.4.2.

Suppose \(R \subset \R^n\) is a closed rectangle. Show that \(\sR(R)\text{,}\) the set of Riemann integrable functions, is an algebra. That is, show that if \(f,g \in \sR(R)\) and \(a \in \R\text{,}\) then \(af \in \sR(R)\text{,}\) \(f+g \in \sR(R)\text{,}\) and \(fg \in \sR(R)\text{.}\)

10.4.3.

Suppose \(R \subset \R^n\) is a closed rectangle and \(f \colon R \to \R\) is a bounded function which is zero except on a closed set \(E \subset R\) of measure zero. Show that \(\int_R f\) exists and compute it.

10.4.4.

Suppose \(R \subset \R^n\) is a closed rectangle and \(f \colon R \to \R\) and \(g \colon R \to \R\) are two Riemann integrable functions. Suppose \(f = g\) except for a closed set \(E \subset R\) of measure zero. Show that \(\int_R f = \int_R g\text{.}\)

10.4.5.

Suppose \(R \subset \R^n\) is a closed rectangle and \(f \colon R \to \R\) is a bounded function.
  1. Suppose there exists a closed set \(E \subset R\) of measure zero such that \(f|_{R\setminus E}\) is continuous. Then \(f \in \sR(R)\text{.}\)
  2. Find an example where \(E \subset R\) is a set of measure zero (not closed) such that \(f|_{R\setminus E}\) is continuous and \(f \not\in \sR(R)\text{.}\)

10.4.6.

Suppose \(R \subset \R^n\) is a closed rectangle and \(f \colon R \to \R\) and \(g \colon R \to \R\) are Riemann integrable. Show that
\begin{equation*} \varphi(x) \coloneqq \max \bigl\{ f(x) , g(x) \bigr\} , \qquad \psi(x) \coloneqq \min \bigl\{ f(x) , g(x) \bigr\} , \end{equation*}
are Riemann integrable.

10.4.7.

Suppose \(R \subset \R^n\) is a closed rectangle and \(f \colon R \to \R\) is Riemann integrable. Show that \(\sabs{f}\) is Riemann integrable. Hint: Define \(f_+(x) \coloneqq \max \bigl\{ f(x) , 0 \bigr\}\) and \(f_-(x) \coloneqq \max \bigl\{ -f(x) , 0 \bigr\}\text{,}\) and then write \(\sabs{f}\) in terms of \(f_+\) and \(f_-\text{.}\)

10.4.8.

  1. Suppose \(R \subset \R^n\) and \(R' \subset \R^n\) are closed rectangles, \(U \subset \R^n\) and \(U' \subset \R^n\) are open sets such that \(R \subset U\) and \(R' \subset U'\text{,}\) \(g \colon U \to U'\) is continuously differentiable, bijective, \(g^{-1}\) is continuously differentiable, \(g(R) \subset R'\text{,}\) and \(f \in \sR(R')\text{,}\) then the composition \(f \circ g\) is Riemann integrable on \(R\text{.}\)
  2. Find a counterexample when \(g\) is not one-to-one. Hint: Try \(g(x,y) \coloneqq (x,0)\) and \(R=R'=[0,1] \times [0,1]\text{.}\)

10.4.9.

Suppose \(f \colon [0,1]^2 \to \R\) is defined by
\begin{equation*} f(x,y) \coloneqq \begin{cases} \frac{1}{kq} & \text{if } x,y \in \Q \text{ and } x = \frac{\ell}{k} \text{ and } y=\frac{p}{q} \text{ in lowest terms,} \\ 0 & \text{else.} \end{cases} \end{equation*}
Show that \(f \in \sR\bigl({[0,1]}^2\bigr)\text{.}\)

10.4.10.

Compute the oscillation \(o\bigl(f,(x,y)\bigr)\) for all \((x,y) \in \R^2\) for the function
\begin{equation*} f(x,y) \coloneqq \begin{cases} \frac{xy}{x^2+y^2} & \text{if } (x,y) \not= (0,0), \\ 0 & \text{if } (x,y) = (0,0) . \end{cases} \end{equation*}

10.4.11.

Consider the popcorn function \(f \colon [0,1] \to \R\text{,}\)
\begin{equation*} f(x) \coloneqq \begin{cases} \frac{1}{q} & \text{if } x \in \Q \text{ and } x = \frac{p}{q} \text{ in lowest terms,} \\ 0 & \text{else.} \end{cases} \end{equation*}
Compute \(o(f,x)\) for all \(x \in [0,1]\text{.}\)

10.4.12.

Suppose \(f \colon [a,b] \to \R\) and \(g \colon [c,d] \to \R\) are Riemann integrable. Show that \(h \colon [a,b] \times [c,d] \to \R\) defined by \(h(x,y) \coloneqq f(x) g(y)\) is Riemann integrable and
\begin{equation*} \int_{[a,b] \times [c,d]} h = \left( \int_a^b f \right) \left( \int_c^d g \right) . \end{equation*}

10.4.13.

Let \(R \subset \R^n\) be a closed rectangle and \(f \colon R \to \R\) a Riemann integrable function such that \(f(x) \geq 0\) for all \(x \in R\text{.}\) Show that if \(\int_R f = 0\text{,}\) then there is a measure zero set \(E \subset R\) such that \(f(x) = 0\) for all \(x \in R \setminus E\) (one says “\(f=0\) almost everywhere”). Note: This exercise in particular implies the rather subtle statement: If \(f(x) > 0\) for all \(x \in R\text{,}\) then \(\int_R f > 0\text{.}\)
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf