4.1. Review of Integration in 1 dimension

$\newcommand{\R}{\mathbb R }$ $\newcommand{\N}{\mathbb N }$ $\newcommand{\Z}{\mathbb Z }$ $\newcommand{\bfa}{\mathbf a}$ $\newcommand{\bfb}{\mathbf b}$ $\newcommand{\bfc}{\mathbf c}$ $\newcommand{\bft}{\mathbf t}$ $\newcommand{\bff}{\mathbf f}$ $\newcommand{\bfF}{\mathbf F}$ $\newcommand{\bfk}{\mathbf k}$ $\newcommand{\bfg}{\mathbf g}$ $\newcommand{\bfG}{\mathbf G}$ $\newcommand{\bfh}{\mathbf h}$ $\newcommand{\bfu}{\mathbf u}$ $\newcommand{\bfv}{\mathbf v}$ $\newcommand{\bfx}{\mathbf x}$ $\newcommand{\bfp}{\mathbf p}$ $\newcommand{\bfy}{\mathbf y}$ $\newcommand{\ep}{\varepsilon}$

4.1Review of Integration in 1 dimension

  1. The definition of the integral in 1-d
  2. Basic properties of integration
  3. Zero content and a criterion for integrability
  4. Problems

This section discusses material that you have mostly seen in MAT137. These notes will not give a lot of explanation or motivation. More of that will be presented in the lectures. You may find it useful to review the MAT137 videos on the formal definition of the integral.

The definition of the integral in 1-d

Let $[a,b]$ be a closed interval in $\R$, with $a<b$, and assume that $f:[a,b]\to \R$ is a bounded function.

Our goal is to define the integral of $f$ over the interval $[a,b]$. The idea is that if $f(x)\ge 0$ for all $x\in [a,b]$, then its integral should equal the area in the $x-y$ plane below the graph of $f$ and above the interval $[a,b]$ if it is possible to define this area in an unambiguous way. The basic idea is to approximate the regiod from the inside and from the outside by unions of rectangles, and to compute the areas of these approximations.

Definition. A partition $P$ of $[a,b]$ is obtained by choosing points $x_0 , \ldots, x_J$ (for some $J$) such that $$ a = x_0 < x_1 <\ldots < x_J = b. $$ This gives intervals $I_j = [x_{j-1}, x_j]$ such that \begin{equation}\label{P.def1} \cup_{j=1}^J I_j = [a,b], \qquad I_j^{int} \cap I_k^{int} = \emptyset \mbox{ if }j\ne k. \end{equation} where $I_j^{int} = (x_{j-1}, x_j) = $ the interior of $I_j$. We will say that a partition $P$ is a collection of closed intervals satisfying \eqref{P.def1}.

If $P$ and $P'$ are two partitions, with the intervals of $P'$ denoted $I'_j, j=1,\ldots, J'$, then we will say that $P'$ is a refinement of $P$ if $$ \mbox{ for every }j\in\{ 1,\ldots, J\} \mbox{ and }k\in \{1,\ldots, J'\}, \mbox{ either } I_k' \subset I_j\mbox{ or }(I_k')^{int}\cap I_j^{int} = \emptyset. $$ This is the same as saying that we can obtain $P'$ from $P$ by adding more points.

Notation. Given a partition $P$ of $[a,b]$ and a bounded function $f:[a,b]\to \R$, we will write $$ m_j := \inf \{ f(x) : x\in I_j\}, \qquad M_j := \sup \{ f(x) : x\in I_j\}. $$ Sometimes we will write $m_j(f)$ or $M_j(f)$, if we want to indicate explicitly which function we are considering (helpful in settings where we have to consider more than one function simultaneously.)

More notation. Given a function $f$ and partition $P$, we define $$ s_P f :=\sum_{j=1}^J m_j \mbox{length}(I_j), \qquad S_P f :=\sum_{j=1}^J M_j \mbox{length}(I_j), $$ where the length of an interval $[x_{j-1}, x_j]$ equals $x_j - x_{j-1}$. Sometimes $s_Pf$ is called the lower Riemann sum of $f$ (over the interval $[a,b]$, with respect to the partition $P$), and $S_P f$ is called the upper Riemann sum.

As we will see, many properties of integration are just consequences of the following:

Theorem 1: Basic properties of supremum/infimum. Assume that $A$ is a nonempty set (for example, a subset of $\R^n$ for some $n$). For any bounded function $f:A\to \R$ define $$ m_Af := \inf\{ f(x) : x\in A\}, \qquad M_Af := \sup\{ f(x) : x\in A\}, \qquad $$ Then the following hold for any bounded $f$ and $g:A\to \R$.

  1. $m_Af + m_A g \le m_A(f+g)$, and $M_Af + M_A g \ge M_A(f+g)$
  2. $M_Af - m_Af = \sup\{ f(x) - f(y) : x,y\in A\}$.
  3. $M_A|f| - m_A|f| \le M_Af - m_Af.$
  4. for any $c\in \R,\ \ $ $M_A(cf) - m_A(cf) = |c|(M_Af - m_Af).$
  5. If $A'\subset A$, then $m_A f \le m_{A'}f \le M_{A'}f \le M_Af$.

For this theorem, it does not matter at all what kind of set $A$ is. This explains why the basic theory of integration is so similar in $1$ dimensions and in $2$ or more dimensions.

When we integrate functions of a single variable, as in this section, we will use Theorem 1 with $A$ being interval $\subset \R$. When we integrate functions of $2$ variables, we will use Theorem 1 with $A$ being a rectangle in $\R^2$. Theorem 1 is indifferent to these details and is equally happy with any $A$.

Part of the proof.

We will present the proofs of conclusions 2 and 3. THe other conclusions are exercises, all of them straightforward.

First, for any $x$ and $y$ in $A$, $$ f(x)\le M_Af \mbox{ and }f(y)\ge m_Af, \qquad \mbox{ and thus } M_Af - m_Af \ge f(x)-f(y). $$ It follows that $M_Af - m_Af \ge \sup\{ f(x)-f(y) : x,y\in A\}$. Conversely, for any $x,y\in A$, it is immediate that $$ f(x) - f(y) \le \sup\{ f(x)-f(y) : x,y\in A\}. $$ It follows from this that for every $y\in A$, $$ M_A f - f(y)\le \sup\{ f(x)-f(y) : x,y\in A\}, $$ and since $\sup\{-f(y) : y\in A\} = - m_Af$, it now easily follows that $$M_Af - m_Af \le \sup\{ f(x)-f(y) : x,y\in A\}.$$ This proves conclusion 2.

To prove conclusion 3, first note that for any $x$ and $y$ in $A$, $$ \big| \, |f(x)| - |f(y)| \, \big| \le |f(x) - f(y)| = \max \{ f(x) - f(y) , f(y) - f(x)\}. $$ (The $\le$ on the left is a standard consequence of the triangle inequality.) Thus any upper bound for $$ \{ f(x)-f(y) : x,y\in A\} $$ is also an upper bound for $$ \{ |f(x)|-|f(y)| : x,y\in A\}. $$ So conclusion 3 follows from conclusion 2.

It is not much of an exaggeration to say that all basic properties of integration follow from Theorem 1, together with a few other facts, such as the following simple lema.

Lemma 1. Given any two partitions $P$ and $P'$, there is a partition $P''$ that is a refinement of both of them, called a common refinement.

Proof. Define $P''$ to be the partition consisting of all intervals of the form $$ I_j \cap I_k' $$ where $I_j$ and $I_k'$ are intervals in $P$ and $P'$ respectively.

Lemma 2. If $P'$ is a refinement of $P$, then $$ s_{P'}f \ge s_P f\qquad\mbox{ and }\quad S_{P'}f \le S_P f\ . $$

This is easily understood by drawing a picture.

Proof. For any fixed interval $I_j$ of $P$, consider all the intervals $I_k'$ of $P'$ that are contained in $I_j$. Each of these satisfies $$ m_k' \ge m_j $$ due to basic properties of infimum conclusion 5 of Theorem 1. Also, the lengths of these intervals $I_k'\subset I_j$ add up to the length of $I_j$. So $$ \sum_{ \{ k : I_k' \subset I_j \} }m_k' \mbox{length}(I_k') \ge \sum_{ \{ k : I_k' \subset I_j \} }m_j \mbox{length}(I_k') = m_j \mbox{length}(I_j). $$ If we sum the above inequality over all intervals $I_j$ of $P$, we deduce that $s_{P'}f \ge s_Pf$. The proof for $S_P$ is basically identical.

Lemma 3. If $P$ and $P'$ are any partitions of $[a,b]$, then $s_Pf \le S_{P'}f$.

Proof. Let $P''$ be a common refinement of $P$ and $P'$, which exists by Lemma 1. Then by Lemma 2, $$ s_P f \le s_{P''} f = \sum_{ partition\ P''} m_j \mbox{length}(I_j) \le \sum_{ partition\ P''} M_j \mbox{length}(I_j)= S_{P''}f \le S_{P'}f.$$ (The middle inequality is clear, since $m_i \le M_i$.)

Next, we define $$ \underline {I_a^b}(f) := \sup_P s_P f,\qquad \overline {I_a^b}(f) := \inf_P S_P f, %% $$ It follows from Lemma 3 that $\underline {I_a^b}(f) \le \overline {I_a^b}(f)$.

Definition. A function $f:[a,b]\to \R$ is integrable if it is bounded and $\underline {I_a^b}(f) = \overline {I_a^b}(f)$. When this holds, we define $$ \int_a^b f(x)\,dx := \mbox{ the integral of }f\mbox{ over }[a,b] := \underline {I_a^b}(f) = \overline {I_a^b}(f) \ . $$ We will sometimes write just $f$ instead of $f(x)$ in the integrand, when this does not result in any ambiguity.

Example 1. A standard example of a non-integrable function, probably familiar from MAT137, is $f:[0,1]\to \R$ defined by $$ f(x) = \begin{cases} 1&\mbox{ if }x\in \mathbb Q \\ 0 &\mbox{ if not}. \end{cases} $$ This can be verified by using the definitions to check that for any partition $P$, $s_Pf = 0$ and $S_Pf = 1$.

We will see many examples of integrable functions below.

If you ever need to check whether a function is integrable, it is often easiest to use the criterion in \eqref{useful} below.

Lemma 4. If $f$ is a bounded function $[a,b]\to \R$, then $f$ is integrable if and only if \begin{equation}\label{useful} \forall \ep>0, \exists\mbox{ a partition }P \mbox{ such that } S_Pf - s_Pf < \ep. \end{equation} In addition, if $f$ is integrable and $P$ is a partition such that \eqref{useful} holds, then \begin{equation} 0\le\int_a^b f(x)\,dx - s_Pf < \ep, \qquad 0\le S_P f - \int_a^b f(x)\,dx < \ep. \label{useful2}\end{equation}

Proof.

If $f$ is integrable, then there exist partitions $P_1$ and $P_2$ such that $$ s_{P_1} f > \int_a^bf(x)dx - \frac \ep 2 , \qquad S_{P_2} f < \int_a^bf(x)dx + \frac \ep 2. $$ If $P$ is a common refinement of $P_1$ and $P_2$ then Lemma 2 implies that $$ S_P f - s_Pf \le S_{P_2}f-s_{P_1}f <\ep, $$ so \eqref{useful} holds. On the other hand, for every partition $P$ it is true that $$ S_Pf - s_P f \ge \overline {I_a^b}(f) - \underline {I_a^b}(f) . $$ Then \eqref{useful} implies that $ \overline {I_a^b}(f) - \underline {I_a^b}(f) < \ep$ for every $\ep>0$, and hence that $f$ is integrable.

Finally, if $f$ is integrable, then for any partition $P$, $$ s_Pf \le \int_a^bf(x)dx \le S_Pf, $$ so \eqref{useful} easily implies \eqref{useful2}.

Basic properties of integration

Next we summarize some basic properties of integration.

Theorem 2: Basic Properties of Integration and integrability. Assume that $f$ and $g$ are integrable functions on $[a,b]$ and that $c\in \R$.

  1. $f+g$ is integrable, and $\int_a^b (f(x)+g(x))dx = \int_a^b f(x)\, dx+ \int_a^b g(x)\, dx$.

  2. $cf$ is integrable, and $\int_a^b c f(x)\,dx = c\int_a^b f(x)\,dx$.

  3. If $f(x)\le g(x)$ for all $x$, then $\int_a^b f(x)\,dx\le \int_a^b g(x)\,dx$.

  4. $|f|$ is integrable, and $\left|\int_a^b f(x)\,dx\right| \le \int_a^b |f(x)|\,dx$.

  5. If $a < b < c$ and $f$ is integrable on both $[a,b]$ and $[b,c]$, then $f$ is integrable on $[a,c]$ and $\int_a^c f(x)\,dx = \int_a^b f(x)\,dx+\int_b^c f(x)\,dx$.

  6. If $[c,d]\subset [a,b]$, then $f$ is integrable on $[c,d]$.

Parts of the proof.

We will prove the conclusions 1 and 4. The proof of 4 illustrates the use of Lemma 4 to establish integrability.


1. given any partition $P$ of $[a,b]$, it follows from Theorem 1 that for the $j$th interval in $P$, $$ m_j(f+g) \ge m_j(f)+m_j(g), \qquad M_j(f+g) \le M_j(f)+ M_j(g). $$ Multiplying these inequalities by $(x_j-x_{j-1})$ and summing over $j$, it follows that $$ s_P f + s_P g \le s_P(f+g) , \qquad S_P(f+g)\le S_Pf+S_Pg. $$ From this we and Lemma 2, we deduce that, given any partitions $P$ and $P'$ of $[a,b]$, for a common refinement $P''$ we have $$ s_P f + s_{P'} g \le s_{P''}(f+g) , \qquad S_{P''}(f+g)\le S_Pf+S_{P'}g. $$ It follows that for any $P,P'$ as above, $$ s_P f + s_{P'} g \le \underline {I_a^b}(f+g) \le \overline {I_a^b}(f+g) \le S_Pf+S_{P'}g. $$ Taking the supremum (on the left) over all partitions $P, P'$, and similarly the infimum on the right, and using the integrability of $f$and $g$, we find that $$ \int_a^b f(x)\,dx+\int_a^b g(x)\,dx \le \underline {I_a^b}(f+g) \le \overline {I_a^b}(f+g) \le \int_a^b f(x)\,dx+\int_a^b g(x)\,dx . $$ This implies conclusion 1. of the theorem.

(An alternate proof of the integrability of $f+g$ can given using Lemma 4.)

4. For any partition $P$ of $[a,b]$ and any $j=1,\ldots, J$, Theorem 1 implies that $$ M_j(|f|) - m_j(|f|)\le M_j(f) - m_j(f). $$ Multiplying by $(x_j-x_{j-1})$ and summing over $j$, it follows that $$ S_P|f|-s_P|f| \le S_P f -s_P f . $$ For any $\ep>0$, Lemma 4 implies that there exists a partition $P$ such that the right-hand side is less than $\ep$. Thus there exists a partition such that the left-hand side is less that $\ep$. By Lemma 4, this proves the integrability of $|f|$.

Once we know that $|f|$ is integrable, since both $f(x)\le |f(x)|$ and $-f(x)\le |f(x)|$ everywhere, it follows from 3. (which is left to you to verify) that $$ \int_a^b f(x)\, dx \le \int_a^b |f(x)|\, dx \qquad\mbox{ and }\qquad -\int_a^b f(x)\, dx \le \int_a^b |f(x)|\, dx $$ and this says exactly that $|\int_a^b f(x)\, dx| \le \int_a^b |f(x)|\, dx$.

The other parts of the theorem are omitted. $\quad \Box$

Zero content and a criterion for integrability

So far we have not yet actually proved that there are any integrable functions. We will now remedy this.

First, an important definition.

A set $A\subset \R$ has zero content if $$ \forall \ep>0, \mbox{ there exist closed intervals } I_1,\ldots, I_L\mbox{ such that } \begin{cases} A\subset \cup_{\ell=1}^L I_\ell, \ \ \mbox{and }& \\ \sum_{\ell=1}^L\mbox{length}(I_\ell)<\ep. &\ \end{cases} $$

Informally, zero content means small enough to be negligible, for purposes of integration.

Example 2. Any finite subset of $\R$ has zero content.

Proof. Consider a finite set, say $S = \{ x_1,\ldots, x_L\}$. Given $\ep>0$, we choose the intervals $$ I_\ell = [x_\ell - \frac{\ep}{4L}, x_\ell +\frac \ep{4L}]. $$ Then since $x_\ell\in I_\ell$ for every $\ell$, it is clear that $$ S\subset \cup_{\ell=1}^L I_\ell $$ and since each interval has length $\frac \ep{2L}$, and there are $L$ intervals, their lengths add up to $\ep/2$, which is strictly less than $\ep$. $\quad\Box$

Technical Remark 1.

In Example 1 we have chosen the intervals so that $S$ is covered by the interiors of the intervals, that is $$ S\subset \cup_{\ell=1}^L I_\ell^{int}. $$ This is not strictly speaking needed to prove that $S$ has zero content, according to our definition, but in fact if can always be done, for a set of zero content, and it is useful in some proofs later.
It is easy to see that the same thing can be done (covering $S$ by the interiors of the intervals) in Example 2 below.

Example 3. Certain infinte sets also have zero content. For example, this is true of $S := \{ \frac 1 k : k\in \mathbb N\}$

Proof. Given $\ep>0$, we first define $$ I_0 := [-\frac \ep 4, \frac\ep 4],\qquad $$ Note that $I_0$ has length $\frac \ep 2$, and all but finitely many points in $S$ belong to $I_0$. By the previous example, we can cover these finitely many points by a finite collection of intervals $I_1,\ldots, I_L$ whose lengths add up to less than $\ep/2$. Then it is easy to see that the intervals $I_0,\ldots, ,I_L$ cover $S$ and have lengths that add up to less than $\ep$. It follows that $S$ has zero content. $\quad \Box$.

Theorem 4. Every continuous function $f:[a,b]\to \R$ is integrable. In fact, $f$ need not even be continuous; a bounded function $f:[a,b]\to \R$ is integrable if \begin{equation}\label{dzc} \{ x\in [a,b] : f\mbox{ is discontinuous at }x\} \quad\mbox{ has zero content}. \end{equation}

Part of the proof.

First assume that $f$ is continuous. We will show that \eqref{useful} holds. Thus, given $\ep>0$, we must find a partition $P$ such that $$ \ep > S_P f - s_P f = \sum_{j=1}^J (M_j-m_j)(x_j-x_{j-1}). $$ This will hold if we can find a partition $P$ such that \begin{equation}\label{nuc} M_j-m_j < \frac \ep{b-a}\quad\mbox{ for every }j\ . \end{equation}

To do this, we recall from Section 1.4 that every continuous function on a compact set is uniformly continuous. Remember the definition: a function $f:[a,b]\to \R$ is uniformly continuous if $$ \forall \ep_1 >0, \ \exists \delta>0 \mbox{ such that } \ \ \left. \begin{array}{r} x,y\in [a,b] \mbox{ and } \\ |x-y|< \delta \end{array} \right\} \Rightarrow |f(x)-f(y)|<\ep_1. $$ Let us apply this with $\ep_1 := \frac \ep{b-a}$. The definition of uniform continuity then gives a $\delta$. We choose any partition $P$ such that every interval has length less than $\delta$. It then follows that \eqref{nuc} holds, and hence that $S_Pf-s_Pf<\ep$.

In the next section, we will revisit this question in a more general setting, and we defer until then a sketch of the proof that $f$ is integrable if we assume only \eqref{dzc}, instead of continuity.

Example 5. The function $f:[0,1]\to \R$ defined by $$ f(x) := \begin{cases}e^{x^2\cos x}&\mbox{ if }\frac 1{2k+1}\le x \le \frac 1{2k} \mbox{ for some } k\in \mathbb N \\ 0&\mbox{ if not} \end{cases} $$ is integrable.

This follows from Theorem 3, because $f$ is continuous except at points in the set $S$ considered in Example 2, which we know has zero content.

Problems

Basic skills

  1. State the defintion of integrability, for a function $f:[a,b]\to \R$, and the definition of the integral $$ \int_a^b f(x)\,dx. $$

  2. State the definition of a set of $S$ of zero content, when $S\subset \R$.

Other questions

  1. Assume that $f:[a,b]\to \R$ is a continuous function such that $f(x)\ge 0$ for all $x\in [a,b]$, and $f(p)>0$ for at least one point $p\in [a,b]$. Prove that $$ \int_a^b f(x)\,dx > 0. $$

  2. Let $f:[a,b]\to \R$ be an integrable function. Prove the following, using only the definition of the integral, not any theorems about integration that you may remember from MAT137.

  3. Prove that if $A$ is a set and $f,g:A\to \R$ are bounded nonnegative functions, then (in notation from Theorem 1) $$ m_A f \, m_A g \le m_A(fg), \qquad\mbox{ and }\quad M_A(fg) \le M_A f \, M_A g . $$

  4. Prove that if $f,g$ are nonegative integrable functions $[a,b]\to \R$, then $fg$ is integrable on $[a,b]$.
    Hint. For any numbers $m,m', M, M'$, $$ MM'-mm' = M(M'-m') + m'(M-m). $$

  5. Consider the function $f:[0,1]\to \R$ defined by $$ f(x) = \begin{cases} 0&\mbox{ if }x\not\in {\mathbb Q}\\ \frac 1q&\mbox{ if }x= \frac pq,\ \mbox{ and }p,q\mbox{ have no common factors.} \end{cases} $$ This is a famous example of a function that is continuous at every irrational point and discontinuous at every rational point. (Check this if you like.)
    Prove that $f$ is integrable, and that $$ \int_0^1 f(x) dx = 0. $$

  6. Fill in some parts of the proofs of Theorem 1 or 2 that were skipped above.

    Below are a lot of questions about the notion of zero content. Do not do all of them, unless you happen to find the topic really interesting.

  7. Prove that if a set $S$ has zero content, then it is bounded. (Or equivalently, an unbounded set cannot have zero content.)

  8. Prove that a set $S$ has zero content if and only if $\bar S$ has zero content.
    Hint. You may use, without proof, the fact that if $S$ and $T$ are sets such that $S\subset T$ and $T$ is closed, then $\bar S\subset T$. (In principle this is not hard to prove, if one remembers properties of open and closed sets from Chapter 1.)

  9. Prove that the interval $[0,1]$ does not have zero content.
    Remark. It may require some effort to write down a clear, detailed proof. It is possible that you might spend the same amount of effort more productively in other ways. But it's a good idea to try to understand the idea.

  10. Deduce from the previous exercises that the set $\{ x\in [0,1]: x\mbox{ is rational}\}$ does not have zero content.
    (In view of Question 5 above, this shows that condition \eqref{dzc} in Theorem 3 is sufficient, but not necessary, for integrability.

$\Leftarrow$  $\Uparrow$  $\Rightarrow$