$\newcommand{\ds}{\displaystyle}$ $\newcommand{\Rr}{\mathbb{R}}$ $\newcommand{\Qq}{\mathbb{Q}}$ $\newcommand{\lint}{\underline{\int}}$ $\newcommand{\uint}{\overline{\int}}$ $\newcommand{\ve}{\varepsilon}$
The Reimann Integral¶
Read Section 5.1. Goal: Define the Riemann integral.
Keywords: Partition, Refinement of Partition, Darboux sums, Upper integral, Lower integral.
Upper and Lower Integrals¶
A partition of a closed interval $[a,b]$ is a finite set subset of $[a,b]$ that contains both $a$ and $b$.
We list a partition in ascending order: $$ a = x_0 \lt x_1 \lt \cdots \lt x_n = b$$
Write $I_i = [x_{i-1}, x_i]$ and $\Delta x_i = x_i - x_{i-1}$ ($1 \le i \le n$).
Let $f \colon [a,b] \to \mathbb{R}$ be bounded and $P$ be a partition of $[a,b]$. Define
$$ L(P,f) = \sum_{i=1}^n m_i\Delta x_i \quad \text{and} \quad U(P,f) = \sum_{i=1}^n M_i\Delta x_i $$
where $m_i = \inf\left\{ f(x) \colon x \in I_i \right\}$ and $M_i = \sup\left\{ f(x) \colon x \in I_i \right\}$. $U(P,f)$ and $L(P,f)$
are, respectively, called the lower Darboux sum and the upper Darboux sum of $f$ with respect to $P$.
Clearly, we have $L(P,f) \le U(P,f)$ for any partition of $[a,b]$.
It is also common to denote the Darboux sums as $L(f,P)$ and $U(f,P)$
If $f$ is bounded between some $m \le M \in \Rr$ on $[a,b]$, then for any partition $P$ of $[a,b]$, we have
$$m \le m_i \le M_i \le M$$
for all $i$ and so
$$ m(b-a) \le L(P,f) \le U(P,f) \le M(b-a). $$
Consequently, the set of Darboux sums of $f$ on $[a,b]$ is bounded and so we can define \begin{align*} \lint_a^b f = \lint_a^b f(x)dx &= \sup\left\{ L(P,f) \colon P\ \text{a partition of}\ [a,b] \right\} \\ \uint_a^b f = \uint_a^b f(x)dx &= \inf\left\{ U(P,f) \colon P\ \text{a partition of}\ [a,b] \right\} \\ \end{align*}
Refinement of Partitions¶
Suppose $P$ and $P'$ are two partitions of $[a,b]$, we say that $P'$ is a refinement of $P$ if $P \subseteq P'$.
The main reason for us to consider refinements is the following result (we give a variation of the proof in the textbook here).
Proposition (5.1.7) Suppose $f \colon [a,b] \to \Rr$ is bounded and $P,P'$ are partitions of $[a,b]$ with $P'$ refining $P$. Then,
$$ L(P,f) \le L(P',f) \le U(P',f) \le U(P,f). $$
Proof. Since $P'$ is finite, it suffices to prove the special case where $P'$ has just one more point $x'$ then $P = \{x_0, x_1, \ldots, x_n\}$.
One of the subinterval $\Delta x_i$ of $P$ contains $x'$, say $x_{i_0} < x' < x_{i_0+1}$ ($0 \le i_0 \le n-1$).
So $U(P,f)$ and $U(P',f)$ have the same terms except the $M(x_{i_0+1} - x_{i_0})$ is replaced by the sum $M'_1(x'-x_{i_0}) + M'_2(x_{i_0+1}-x')$ where $M, M'_1$ are $M'_2$ are the suprema of $f$ over $[x_{i_0}, x_{i_0+1}],[x_{i_0},x']$ and $[x',x_{i_0+1}]$, respectively.
Now all we need to prove is that the sum is at least the term that it replaces. But this is clear: since both $[x_{i_0},x']$ and $[x',x_{i_0+1}]$ are subsets of $[x_{i_0}, x_{i_0+1}]$, $M_1', M_2' \le M$. Therefore,
$$ M'_1(x'-x_{i_0}) + M'_2(x_{i_0+1}-x') \le M((x'-x_{i_0})+(x_{i_0+1}-x')) = M(x_{i_0+1} -x_{i_0}). $$
The proof of the corresponding inequality for the lower sums is similar.
For any two partitions $P,P'$ of $[a,b]$, $P \cup P'$ is a partition that refines both of them. Thus, it follows from the proposition above that
$$ L(P'f) \le L(P\cup P',f) \le U(P\cup P',f) \le U(P,f). $$
That means any lower sum of $f$ is a lower bound of the set of upper sums and so does not exceed the upper integral $\uint_a^b f$. But this in turns implies the upper integral of $f$, is an upper bound of the set of lower sums of $f$. Hence, we have for any partition $P$ of $[a,b]$, $$ L(P,f) \le \lint_a^b f \le \uint_a^b f \le U(P,f). $$
Question. What are the lower and upper integral of the Dirichlet function: $f \colon [0,1] \to \Rr$, defined by $f(x) = 0$ for $x \in [0,1] \setminus \Qq$ and $f(x) = 1$ for $x \in [0,1] \cap \Qq$?
Riemann Integrals¶
Let $f$ be a bounded function on $[a,b]$. We say that $f$ is Riemann integrable (or simply integrable) if
$$ \lint_a^b f = \uint_a^b f $$.
If $f$ is integrable on $[a,b]$, the common value of its lower and upper integrals is call the integral of $f$ and is denoted by $\int_a^b f$.
Denoted by $R[a,b]$ the set of Riemann integrable functions on $[a,b]$.
Example. Constant functions on $[a,b]$ are integrable.
Example. A step function on $[a,b]$ is function on $[a,b]$ that takes only finitely many values and each value is assumed on some finitely many subintervals of $[a,b]$.
A step function is precisely a linear combination of the indicator functions of subintervals of $I$.
Step functions are integrable. (Read example 5.1.11, 5.1.12).
Here is a criteria the guarantees integrability.
Proposition (5.1.13) A function $f$ bounded on $[a,b]$ is integrable if and only if for any $\varepsilon > 0$, there exists a partition $P_{\varepsilon}$ of $[a,b]$ such that $$ U(P_{\varepsilon},f) - L(P_{\varepsilon},f) < \varepsilon. $$
Proof. Suppose for any $\varepsilon >0$, there exists a partition $P_{\varepsilon}$ of $[a,b]$ with the proposed property. Then since $$ 0 \le \uint_a^b f - \lint_a^b f \le U(P ,f) - L(P,f) $$ for any partition $P$ of $[a,b]$, in particular the difference between the upper and lower integral of $f$ is at most $U(P_{\varepsilon},f) - L(P_{\varepsilon},f) < \varepsilon$. Since $\varepsilon > 0$, is arbitrary, we must have $\lint_a^b f = \uint_a^b f$, i.e. $f$ is integrable.
Conversely, suppose $f$ is integrable. Then for any $\ve > 0$, there exist partition $P'$ and $P''$ of $[a,b]$ such that
$\ds \int_a^b f - \dfrac{\ve}{2} < L(P'',f)$ and $\ds U(P',f) < \int_a^b f +\dfrac{\ve}{2}$.
Take $P_{\varepsilon} = P' \cup P''$, then $P_{\varepsilon}$ is a common refinement of $P'$ and $P''$ and so we have
$$ \int_a^b f - \frac{\ve}{2} < L(P_{\varepsilon},f) \le U(P_{\varepsilon},f) < \int_a^b f + \frac{\ve}{2}. $$
Consequently, $U(P_{\varepsilon},f) - L(P_{\varepsilon},f) < \ve$. This finishes the proof.
Read Example 5.1.14 for an application of this proposition.
For $f \in S \to \Rr$ and $[a,b] \subseteq S$ ($a < b$), if the restriction of $f$ on $[a,b]$ is integrable, we define
$$\int_a^a f = 0, \int_b^a f = -\int_a^b f.$$