Skip to main content

Mathematical Analysis

Section 6.1 The Riemann Integral

Definition 6.1. Integral.

For \(a,b\in\mathbb{R}\) with \(a<b\text{,}\) and a function \(f:[a,b]\rightarrow\mathbb{R}\text{,}\) the integral of \(f\) over \([a,b],\int_a^b f(x)\,dx\text{,}\) when it exists, will represent the net area enclosed by the graph of \(f\text{.}\)
We'll start by approximating the area under the graph by rectangles whose bases form a partition of \([a,b]\) and compute the integral by taking a limit where the width of the rectangles converges to zero.

Definition 6.2. Partition.

A partition of a closed interval \([a,b]\) is a finite set \(P\subseteq[a,b]\) so that \(a,b\in P\text{.}\)
Note that any partition \(P\) has the form \(P=\{{x_0,x_1,\dots,x_n}\}\) with \(a=x_0<x_1<\dots<x_n=b\text{.}\)

Convention 6.3.

Abusing notation, we'll often write “let \(P=\{{a=x_0<x_1<\dots<x_n=b}\}\) be a partition of \([a,b]\text{.}\)” Let \(\mathcal{P}[a,b]\) be the set of all partitions of \([a,b]\text{.}\)

Convention 6.4.

Let \(\mathcal{B}[a,b]\) denote the set of bounded functions \([a,b]\rightarrow\mathbb{R}\text{.}\)

Definition 6.5. Riemann Sums.

Given a partition \(P=\{{a=x_0<x_1<\dots<x_n=b}\}\in\mathcal{P}[a,b]\) and \(f\in\mathcal{B}[a,b]\text{,}\) define the upper and lower Riemann Sums by
\begin{equation*} \begin{aligned} U(f,P) &=\sum_{i=1}^n M_i(f,P)(x_i-x_{i-1}),\\ L(f,P) &=\sum_{i=1}^n m_i(f,P)(x_i-x_{i-1}) \end{aligned} \end{equation*}
where
\begin{equation*} \begin{aligned} M_i(f,P) &=\sup\{{f(x)}\,:\,{x_{i-1}\leq x\leq x_i}\},\\ m_i(f,P) &=\inf\{{f(x)}\,:\,{x_{i-1}\leq x\leq x_i}\}. \end{aligned} \end{equation*}

Definition 6.6. Darboux Integral.

Define the upper (Darboux) integral by \(\overline{\int_a^b}f(t)\,dt=\inf\{{U(f,p)}\,:\,{P\in \mathcal{P}[a,b]}\}\) and the lower (Darboux) integral by \(\underline{\int_a^b}f(t)\,dt=\sup\{{L(f,p)}\,:\,{P\in \mathcal{P}[a,b]}\}\text{.}\)

Definition 6.7. Riemann Integral.

A function \(f\in\mathcal{B}[a,b]\) is called Riemann integrable if \(\overline{\int_a^b}f(t)\,dt=\underline{\int_a^b}f(t)\,dt\text{,}\) and we'll define
\begin{equation*} \int_a^bf(t)\,dt=\overline{\int_a^b}f(t)\,dt=\underline{\int_a^b}f(t)\,dt. \end{equation*}
We'll write \(\mathcal{R}[a,b]\) for the set of all Riemann integrable functions \([a,b]\rightarrow\mathbb{R}\text{.}\)
A bounded function \(f:[a,b]\rightarrow\mathbb{C}\) is called Riemann integrable if its real and imaginary parts are, and in this case
\begin{equation*} \int_a^bf(x)\,dx=\int_a^b\text{Re}f(x)\,dx+i\int_a^b\text{Im}f(x)\,dx. \end{equation*}

Example 6.9.

Let \(f:[a,b]\rightarrow \mathbb{R}\text{,}\)
\begin{equation*} \begin{aligned} f(x)=\begin{cases} 1 & x\in \mathbb{Q}\\ 0 & x\notin \mathbb{Q} \end{cases} \end{aligned} \end{equation*}
Then \(\overline{\int_a^b}f(t)\,dt=b-a,\underline{\int_a^b}f(t)\,dt=0\text{,}\) so \(f\notin\mathcal{R}[a,b]\text{.}\)
Solution.
Let \(P\in\mathcal{P}[a,b]\) and write \(P=\{{a=x_0<x_1<\dots<x_n=b}\}\text{.}\) Then \(M_i(f,P)=\sup\{{f(x)}\,:\,{x_{i-1}\leq x\leq x_i}\}=1\text{,}\) \(m_i(f,P)=\inf\{{f(x)}\,:\,{x_{i-1}\leq x\leq x_i}\}=0\text{.}\) Hence \(U(f,P)=\sum_{i=1}^n M_i(f,P)(x_i-x_j)=x_n-x_0=b-a\text{.}\) Similarly, \(L(f,P)=0\text{.}\) So \(\overline{\int_a^b}f(t)\,dt=b-a,\underline{\int_a^b}f(t)\,dt=0\text{.}\)

Definition 6.10. Refinement.

If \(P\in\mathcal{P}[a,b]\text{,}\) then a refinement of \(P\) is a partition \(Q\in\mathcal{P}[a,b]\) such that \(P\subseteq Q\text{.}\)
Let \(P=\{{a=x_0<x_1<\dots<x_n=b}\}\in\mathcal{P}[a,b]\) and let \(Q\) be a refinement of \(P\text{.}\) Then \(Q=\cap_{k=1}^n Q_k\text{,}\) where \(Q_k\in\mathcal{P}[x_{k-1},x_k]\text{.}\) In fact, \(Q_k=Q\cap[x_{k-1},x_k]\text{.}\) Let \(Q_k=\{{x_{k-1}=y_0^{(k)}<y_1^{(k)}<\dots<y_{m_k}^{(k)}=x_k}\}\text{.}\)
For each \(k=1,\dots,n\) and \(i=1,\dots,m_k\text{,}\) we have \([y_{i-1}^{(k)},y_i^{(k)}]\subseteq [x_{k-1},x_k]\) so
\begin{equation*} \sup\{{f(t)}\,:\,{y_{i-1}^{(k)}\leq t\leq y_{i}^{(k)}}\}\leq \sup\{{f(t)}\,:\,{x_{k-1}\leq t\leq x_k}\}. \end{equation*}
That is,
\begin{equation*} M_i(f,Q_k)\leq M_k(f,P). \end{equation*}
Now,
\begin{equation*} \begin{aligned} u(f,Q) &=\sum_{k=1}^n\sum_{i=1}^{m_k}M_i(f,Q_k)(y_i^{(k)}-y_{i-1}^{(k)} \leq \sum_{k=1}^n\sum_{i=1}^{m_k}M_k(f,P)(y_i^{(k)}-y_{i-1}^{(k)}\\ &=\sum_{k=1}^n M_k(f,P)(y_{m_k}^{(k)}-y_0^{(k)} =\sum_{k=1}^n M_k(f,P)(x_k-x_{k-1}) =u(f,P). \end{aligned} \end{equation*}
Thus \(u(f,Q)\leq u(f,P)\text{.}\)
Similarly, \(L(f,Q)\geq L(f,P)\) (swap sups for infs), and it's clear that \(L(f,Q)\leq u(f,Q)\text{.}\) ◻
Fix partitions \(P,Q\in\mathcal{P}[a,b]\text{.}\) It's enough to show that
\begin{equation*} L(f,P)\leq U(f,Q) \end{equation*}
since the result then follows by taking the supremum over \(P\) and the infemum over \(Q\text{.}\) Note that \(P\cup Q\) is a refinement of both \(P\) and \(Q\text{.}\) So
\begin{equation*} L(f,P)\leq L(f,P\cup Q)\leq U(f,P\cup Q)\leq U(f,Q). \end{equation*}

Example 6.13.

Define \(f:[0,1]\rightarrow\mathbb{R}\) by \(f(t)=t\text{.}\) Then \(\int_0^1 f(t)\,dt=\frac{1}{2}\text{.}\)
Solution.
Let \(n\geq 1\text{,}\) and define \(x_i=\frac{i}{n}\) for \(i=0,\dots,n\text{.}\) Then \(P=\{{x_0,\dots,x_n}\}\in\mathcal{P}[0,1]\) and \(M_i(f,P)=\frac{1}{n}\text{.}\) Now, \(U(f,P)=\sum_{i=1}^n M_i(f,P)(x_i-x_{i-1})=\sum_{i=1}^n\frac{i}{n}\frac{1}{n}=\frac{n(n+1)}{2n^2}=\frac{1}{2}+\frac{1}{2n}\text{.}\)
Similarly, \(L(f,P)=\frac{(n-1)n}{2n^2}=\frac{1}{2}-\frac{1}{2n}\text{.}\) Therefore
\begin{equation*} \frac{1}{2}-\frac{1}{2n}\leq \underline{\int_a^b}f(t)\,dt\leq \overline{\int_a^b}f(t)\,dt\leq U(f,P)\leq \frac{1}{2}+\frac{1}{2n}. \end{equation*}
Letting \(n\rightarrow\infty\text{,}\) we have
\begin{equation*} \underline{\int_a^b}f(t)\,dt= \overline{\int_a^b}f(t)\,dt=\frac{1}{2}. \end{equation*}
Suppose for all \(\varepsilon>0\) there exists \(P\in\mathcal{P}[a,b]\) with
\begin{equation*} U(f,P)-L(f,P)<\varepsilon. \end{equation*}
Given \(\varepsilon>0\text{,}\) choose \(P\text{.}\) Then \(\overline{\int_a^b}f(t)\,dt\leq U(f,P)\leq L(f,P)+\varepsilon<\underline{\int_a^b}f(t)\,dt+\varepsilon\text{.}\) Hence \(\overline{\int_a^b}f(t)\,dt\leq \underline{\int_a^b}f(t)\,dt\text{,}\) so \(f\in\mathcal{R}[a,b]\text{.}\)
Conversely, suppose that \(f\in\mathcal{R}[a,b]\text{.}\) Fix \(\varepsilon>0\text{.}\) There are \(P_1,P_2\in\mathcal{P}[a,b]\) so that \(\overline{\int_a^b}f(t)\,dt>U(f,P)-\frac{\varepsilon}{2}\) and \(\int_a^bf(t)\,dt=\underline{\int_a^b}f(t)\,dt<L(f,P_2)+\frac{\varepsilon}{2}\text{.}\) Hence, \(L(f,P_2)+\frac{\varepsilon}{2}>U(f,P_1)-\frac{\varepsilon}{2}\text{,}\) or rearranging
\begin{equation*} U(f,P_1)-L(f,P_2)<\varepsilon. \end{equation*}
Set \(P=P_1\cup P_2\in\mathcal{P}[a,b]\text{.}\) Then
\begin{equation*} \begin{aligned} U(f,P)&\leq U(f,P_1)\\ L(f,P)&\geq L(f,P_2)\\ \implies U(f,P)-L(f,P)&<\varepsilon. \end{aligned} \end{equation*}

Convention 6.15.

Let \(\mathcal{C}[a,b]=\{{\text{continuous functions } [a,b]\rightarrow \mathbb{R}}\}=\mathcal{C}([a,b])\)
The second inclusion holds by definition. Also, by extreme value theorem \(\mathcal{C}[a,b]\subseteq \mathcal{B}[a,b]\text{.}\)
Suppose that \(f\in\mathcal{C}[a,b]\text{.}\) We'll show \(f\) satisfies Riemann's condition. Since \(f\) is continuous on the compact set \([a,b]\text{,}\) we have that \(f\) is uniformly continuous. Fix \(\varepsilon>0\text{.}\) As \(f\) is uniformly continuous, there is a \(\delta>0\) so that if \(x,y\in[a,b]\) and \(\left|{x-y}\right|<\delta\text{,}\) then \(\left|{f(x)-f(y)}\right|<\frac{\varepsilon}{b-a}\text{.}\) Fix \(n\geq 1\) so that \(\frac{1}{n}<\frac{\delta}{b-a}\) and let \(x_i=a+\frac{i}{n}(b-a)\) for \(i=0,\dots,n\) and note that \(P=\{{a=x_0<x+1<\dots<x_n=b}\}\in \mathcal{P}[a,b]\text{.}\) Then \(x_i-x_{i-1}=\frac{b-a}{n}<\delta\) for \(i=1,\dots,n\text{.}\) As \(f\) is continuous on the closed interval \([x_{i-1},x_i]\) (for \(i=1,\dots,n\)), the extreme value theorem implies there are \(x_i^\#,x_i^b\in[x_{i-1},x_i]\) so that
\begin{equation*} \begin{aligned} f(x_i^\#) &= M_i(f,P)\\ f(x_i^b) &= m_i(f,P). \end{aligned} \end{equation*}
Then \(\left|{x_i^\#-x_i^b}\right|\leq x_i-x_{i-1}<\delta\text{,}\) so \(M_i(f,P)-m_i(f,P)<\frac{\varepsilon}{b-a}\) by the choice of \(\delta\text{.}\) Then
\begin{equation*} \begin{aligned} U(f,P)-L(f,P) &=\sum_{i=1}^n(M_i(f,P)-m_i(f,P))(x_i-x_{i-1}) <\sum_{i=1}^n\left({\frac{\varepsilon}{b-a}}\right)(x_i-x_{i-1})\\ &=\frac{\varepsilon}{b-a}(b-a) =\varepsilon. \end{aligned} \end{equation*}
Clearly \(cf+dg\) is bounded since \(f\) and \(g\) are. Also,
\begin{equation*} \begin{aligned} \overline{\int_a^b}(cf+dg)(t)\,dt &\leq c\overline{\int_a^b}f(t)\,dt+d\overline{\int_a^b}g(t)\,dt\\ &=c\int_a^b f(t)\,dt+d\int_a^b g(t)\,dt\\ &=c\underline{\int_a^b}f(t)\,dt+d\underline{\int_a^b}g(t)\,dt\\ &\leq\underline{\int_a^b} cf(t)+dg(t)\,dt\\ &\leq\overline{\int_a^b}(cf+dg)(t)\,dt. \end{aligned} \end{equation*}
So, all the inequalities are equalities.
If \(f,g\in \mathcal{R}[a,b]\) and \(f(x)\leq g(x)\) for all \(x\in [a,b]\text{,}\) then \(\int_a^b f(x)\,dx\leq \int_a^b g(x)\,dx\text{.}\)
Assume \(\left|{f}\right|\in\mathcal{R}[a,b]\text{.}\) Then \(-\left|{f(x)}\right|\leq f(x)\leq\left|{f(x)}\right|\) for \(x\in [a,b]\text{.}\) Then
\begin{equation*} -\int_a^b\left|{f(x)}\right|\,dx\leq\int_a^b f(x)\,dx\leq \int_a^b\left|{f(x)}\right|\,dx. \end{equation*}
Therefore,
\begin{equation*} \left|{\int_a^b f(x)\,dx}\right|\leq\int_a^b\left|{f(x)}\right|\,dx. \end{equation*}
We now show \(\left|{f}\right|\in\mathcal{R}[a,b]\text{.}\) By Riemann's Criterion, it's enough to show that for all partitions \(P\in\mathcal{P}[a,b]\text{,}\)
\begin{equation*} U(\left|{f}\right|,P)-L(\left|{f}\right|,P)\leq U(f,P)-L(f,P). \end{equation*}
To this end, fix \(P\in\mathcal{P}[a,b]\) and write \(P=\{{a=x_0<x_1<\dots<x_n=b}\}\text{.}\) Fix \(i=1,\dots,n\text{.}\) It's enough to show that
\begin{equation*} M-i(\left|{f}\right|,P)-m_i(\left|{f}\right|,P)\leq M_i(f,P)-m_i(f,P). \end{equation*}
Fix \(s,t\in[x_{i-1},x_i]\text{.}\) Then (with sups and infs taken over \(s',t'\in[x_{i-1},x_i]\))
\begin{equation*} \begin{aligned} \left|{f(s)}\right|-\left|{f(t)}\right| &\leq \left|{f(s)-f(t)}\right| \leq\sup_{s',t'}\left|{f(s')-f(t')}\right| =\sup_{s'}f(s')-\inf_{t'}f(t')\\ &=M_i(f,P)-m_i(f,P). \end{aligned} \end{equation*}
Now, taking the supremum over \(s,t\in[x_{i-1},x_i]\text{,}\)
\begin{equation*} \begin{aligned} \sup_{s,t}\left({\left|{f(s)}\right|-\left|{f(t)}\right|}\right) &\leq M_i(f,P)-m_i(f,P),\\ \sup_{s,t}\left({\left|{f(s)}\right|-\left|{f(t)}\right|}\right) &=\sup_s\left|{f(s)}\right|-\inf_t\left|{f(t)}\right| \end{aligned} \end{equation*}
where again sup, inf taken over \(s,t\in[x_{i-1},x_i]\text{.}\) So
\begin{equation*} \begin{aligned} M_i(\left|{f}\right|,P)-m_i(\left|{f}\right|,P) \leq M_i(f,P)-m_i(f,P). \end{aligned} \end{equation*}
For all \(x\in[a,b]\text{,}\) either \(f(a)\leq f(x)\leq f(b)\) or \(f(b)\leq f(x)\leq f(a)\text{.}\) In either case, \(f\) is bounded. Replacing \(f\) with \(-f\) if necessary, we may assume that \(f\) is increasing. Let \(\varepsilon>0\text{.}\) Fix \(n\in\mathbb{Z}, n>\frac{(f(b)+f(a))(b-a)}{\varepsilon}\) and let \(x_i=a+\frac{i}{n}(b-a)\) for \(i=0,\dots,n\text{.}\) Since \(f\) is increasing, \(M_i(f,P)=f(x_i)\) and \(m_i(f,P)=f(x_{i-1})\text{.}\) So
\begin{equation*} \begin{aligned} U(f,P)-L(f,P) &=\sum_{i=1}^n(M_i(f,P)-m_i(f,P))(x_i-x_{i-1}) =\sum_{i=1}^n(f(x_i)-f(x_{i-1}))\frac{b-a}{n}\\ &=(f(b)-f(a))\frac{b-a}{n} <\varepsilon. \end{aligned} \end{equation*}

Remark 6.22.

The last result implies all functions of bounded variation are also Riemann integrable.