An integral is a way to “sum” the values of a function. There is sometimes confusion among students of calculus between the integral and the antiderivative. The integral is (informally) the area under the curve, nothing else. That we can compute an antiderivative using the integral is a nontrivial result we must prove. We will define the Riemann integral 1
, an equivalent but technically simpler definition.
Subsection5.1.1Partitions and lower and upper integrals
We want to integrate a bounded function defined on an interval \([a,b]\text{.}\) We first define two auxiliary integrals that are defined for all bounded functions. Only then can we talk about the Riemann integral and the Riemann integrable functions.
Definition5.1.1.
A partition\(P\) of \([a,b]\) is a finite set of numbers \(\{ x_0,x_1,x_2,\ldots,x_n \}\) such that
\begin{equation*}
a = x_0 < x_1 < x_2 < \cdots < x_{n-1} < x_n = b .
\end{equation*}
We call \(L(P,f)\) the lower Darboux sum and \(U(P,f)\) the upper Darboux sum.
The geometric idea of Darboux sums is indicated in Figure 5.1. The lower sum is the area of the shaded rectangles, and the upper sum is the area of the entire rectangles, shaded plus unshaded parts. The width of the \(i\)th rectangle is \(\Delta x_i\text{,}\) the height of the shaded rectangle is \(m_i\text{,}\) and the height of the entire rectangle is \(M_i\text{.}\)
Proposition5.1.2.
Let \(f \colon [a,b] \to \R\) be a bounded function. Let \(m, M \in \R\) be such that for all \(x \in [a,b]\text{,}\) we have \(m \leq f(x) \leq M\text{.}\) Then for every partition \(P\) of \([a,b]\text{,}\)
Let \(P\) be a partition of \([a,b]\text{.}\) Note that \(m \leq m_i\) for all \(i\) and \(M_i \leq M\) for all \(i\text{.}\) Also \(m_i \leq M_i\) for all \(i\text{.}\) Finally, \(\sum_{i=1}^n \Delta x_i = (b-a)\text{.}\) Therefore,
Hence we get (5.1). In particular, the set of lower and upper sums are bounded sets.
Definition5.1.3.
As the sets of lower and upper Darboux sums are bounded, we define
\begin{equation*}
\begin{aligned}
& \underline{\int_a^b} f(x)\,dx \coloneqq
\sup \, \bigl\{ L(P,f) : P \text{ a partition of } [a,b] \bigr\} , \\
& \overline{\int_a^b} f(x)\,dx \coloneqq
\inf \, \bigl\{ U(P,f) : P \text{ a partition of } [a,b] \bigr\} .
\end{aligned}
\end{equation*}
We call \(\underline{\int}\) the lower Darboux integral and \(\overline{\int}\) the upper Darboux integral. To avoid worrying about the variable of integration, we often simply write
\begin{equation*}
\underline{\int_a^b} f \coloneqq
\underline{\int_a^b} f(x)\,dx
\qquad \text{and} \qquad
\overline{\int_a^b} f \coloneqq
\overline{\int_a^b} f(x)\,dx .
\end{equation*}
If integration is to make sense, then the lower and upper Darboux integrals should be the same number, as we want a single number to call the integral. However, these two integrals may differ for some functions.
Example5.1.4.
Take the Dirichlet function \(f \colon [0,1] \to \R\text{,}\) where \(f(x) \coloneqq 1\) if \(x \in \Q\) and \(f(x) \coloneqq 0\) if \(x \notin \Q\text{.}\) Then
\begin{equation*}
\underline{\int_0^1} f = 0 \qquad \text{and} \qquad
\overline{\int_0^1} f = 1 .
\end{equation*}
The reason is that for any partition \(P\) and every \(i\text{,}\) we have \(m_i = \inf \bigl\{ f(x) : x \in [x_{i-1},x_i] \bigr\} = 0\) and \(M_i = \sup \bigl\{ f(x) : x \in [x_{i-1},x_i] \bigr\} = 1\text{.}\) Thus
The same definition of \(\underline{\int_a^b} f\) and \(\overline{\int_a^b} f\) is used when \(f\) is defined on a larger set \(S\) such that \([a,b] \subset S\text{.}\) In that case, we use the restriction of \(f\) to \([a,b]\) and we must ensure that the restriction is bounded on \([a,b]\text{.}\)
To compute the integral, we often take a partition \(P\) and make it finer. That is, we cut intervals in the partition into yet smaller pieces.
Definition5.1.6.
Let \(P = \{ x_0, x_1, \ldots, x_n \}\) and \(\widetilde{P} = \{ \widetilde{x}_0, \widetilde{x}_1, \ldots,
\widetilde{x}_{\ell} \}\) be partitions of \([a,b]\text{.}\) We say \(\widetilde{P}\) is a refinement of \(P\) if as sets \(P \subset \widetilde{P}\text{.}\)
That is, \(\widetilde{P}\) is a refinement of a partition if it contains all the numbers in \(P\) and perhaps some other numbers in between. For example, \(\{ 0, 0.5, 1, 2 \}\) is a partition of \([0,2]\) and \(\{ 0, 0.2, 0.5, 1, 1.5, 1.75, 2 \}\) is a refinement. The main reason for introducing refinements is the following proposition.
Proposition5.1.7.
Let \(f \colon [a,b] \to \R\) be a bounded function, and let \(P\) be a partition of \([a,b]\text{.}\) Let \(\widetilde{P}\) be a refinement of \(P\text{.}\) Then
The tricky part of this proof is to get the notation correct. Let \(\widetilde{P} = \{ \widetilde{x}_0, \widetilde{x}_1, \ldots,
\widetilde{x}_{\ell} \}\) be a refinement of \(P = \{ x_0, x_1, \ldots, x_n \}\text{.}\) Then \(x_0 = \widetilde{x}_0\) and \(x_n = \widetilde{x}_{\ell}\text{.}\) In fact, there are integers \(k_0 < k_1 < \cdots < k_n\) such that \(x_i = \widetilde{x}_{k_i}\) for \(i=0,1,2,\ldots,n\text{.}\)
Let \(\Delta \widetilde{x}_q \coloneqq \widetilde{x}_q - \widetilde{x}_{q-1}\) for \(q=0,1,2,\ldots,\ell\text{.}\) See Figure 5.2. We get
Let \(m_i\) be as before and correspond to the partition \(P\text{.}\) Let \(\widetilde{m}_q \coloneqq \inf \bigl\{ f(x) : \widetilde{x}_{q-1} \leq x \leq
\widetilde{x}_q \bigr\}\text{.}\) Now, \(m_i \leq \widetilde{m}_q\) for \(k_{i-1} < q \leq k_i\text{.}\) Therefore,
The proof of \(U(\widetilde{P},f) \leq U(P,f)\) is left as an exercise.
Armed with refinements we prove the following. The key point of this next proposition is that the lower Darboux integral is less than or equal to the upper Darboux integral.
Proposition5.1.8.
Let \(f \colon [a,b] \to \R\) be a bounded function. Let \(m, M \in \R\) be such that for all \(x \in [a,b]\text{,}\) we have \(m \leq f(x) \leq M\text{.}\) Then
\begin{equation}
m(b-a) \leq
\underline{\int_a^b} f \leq \overline{\int_a^b} f
\leq M(b-a) .\tag{5.2}
\end{equation}
The inequality \(m(b-a) \leq L(P,f)\) implies \(m(b-a) \leq \underline{\int_a^b} f\text{.}\) The inequality \(U(P,f) \leq M(b-a)\) implies \(\overline{\int_a^b} f \leq M(b-a)\text{.}\)
The middle inequality in (5.2) is the main point of the proposition. Let \(P_1, P_2\) be partitions of \([a,b]\text{.}\) Define \(\widetilde{P} \coloneqq P_1 \cup P_2\text{.}\) The set \(\widetilde{P}\) is a partition of \([a,b]\text{,}\) which is a refinement of \(P_1\) and a refinement of \(P_2\text{.}\) By Proposition 5.1.7, \(L(P_1,f) \leq L(\widetilde{P},f)\) and \(U(\widetilde{P},f) \leq U(P_2,f)\text{.}\) So
In other words, for two arbitrary partitions \(P_1\) and \(P_2\text{,}\) we have \(L(P_1,f) \leq U(P_2,f)\text{.}\) Recall Proposition 1.2.7, and take the supremum and infimum over all partitions:
\begin{multline*}
\underline{\int_a^b} f =
\sup \, \bigl\{ L(P,f) : P \text{ a partition of } [a,b] \bigr\}
\\
\leq
\inf \, \bigl\{ U(P,f) : P \text{ a partition of } [a,b] \bigr\}
=
\overline{\int_a^b} f . \qedhere
\end{multline*}
Subsection5.1.2Riemann integral
We can finally define the Riemann integral. However, the Riemann integral is only defined on a certain class of functions, called the Riemann integrable functions.
Definition5.1.9.
Let \(f \colon [a,b] \to \R\) be a bounded function such that
Then \(f\) is said to be Riemann integrable. The set of Riemann integrable functions on \([a,b]\) is denoted by \(\sR\bigl([a,b]\bigr)\text{.}\) When \(f \in \sR\bigl([a,b]\bigr)\text{,}\) we define
\begin{equation*}
\int_a^b f \coloneqq \int_a^b f(x)\,dx.
\end{equation*}
The number \(\int_a^b f\) is called the Riemann integral of \(f\text{,}\) or sometimes simply the integral of \(f\text{.}\)
By definition, a Riemann integrable function is bounded. Appealing to Proposition 5.1.8, we immediately obtain the following proposition. See also Figure 5.3.
Proposition5.1.10.
Let \(f \colon [a,b] \to \R\) be a Riemann integrable function. Let \(m, M \in \R\) be such that \(m \leq f(x) \leq M\) for all \(x \in [a,b]\text{.}\) Then
\begin{equation*}
m(b-a) \leq
\int_a^b f
\leq M(b-a) .
\end{equation*}
A weaker form of this proposition is often useful: If \(\abs{f(x)} \leq M\) for all \(x \in [a,b]\text{,}\) then
We integrate constant functions using Proposition 5.1.8. If \(f(x) \coloneqq c\) for some constant \(c\text{,}\) then we take \(m = M = c\text{.}\) In inequality (5.2) all the inequalities must be equalities. Thus \(f\) is integrable on \([a,b]\) and \(\int_a^b f = c(b-a)\text{.}\)
Example5.1.12.
Let \(f \colon [0,2] \to \R\) be defined by
\begin{equation*}
f(x) \coloneqq
\begin{cases}
1 & \text{if } x < 1,\\
\nicefrac{1}{2} & \text{if } x = 1,\\
0 & \text{if } x > 1.
\end{cases}
\end{equation*}
We claim \(f\) is Riemann integrable and \(\int_0^2 f = 1\text{.}\)
Proof: Let \(0 < \epsilon < 1\) be arbitrary. Let \(P \coloneqq \{0, 1-\epsilon, 1+\epsilon, 2\}\) be a partition. We use the notation from the definition of the Darboux sums. Then
\begin{equation*}
\overline{\int_0^2} f -
\underline{\int_0^2} f
\leq
U(P,f) - L(P,f)
=
(1+\epsilon)
- (1-\epsilon) = 2 \epsilon .
\end{equation*}
By Proposition 5.1.8, \(\underline{\int_0^2} f \leq \overline{\int_0^2} f\text{.}\) As \(\epsilon\) was arbitrary, \(\overline{\int_0^2} f = \underline{\int_0^2} f\text{.}\) So \(f\) is Riemann integrable. Finally,
Hence, \(\bigl\lvert \int_0^2 f - 1 \bigr\rvert \leq \epsilon\text{.}\) As \(\epsilon\) was arbitrary, we conclude \(\int_0^2 f = 1\text{.}\)
It may be worthwhile to extract part of the technique of the example into a proposition. Note that \(U(P,f)-L(P,f)\) is exactly the total area of the white part of the rectangles in Figure 5.1.
Proposition5.1.13.
Let \(f \colon [a,b] \to \R\) be a bounded function. Then \(f\) is Riemann integrable if for every \(\epsilon > 0\text{,}\) there exists a partition \(P\) of \([a,b]\) such that
If for every \(\epsilon > 0\) such a \(P\) exists, then
\begin{equation*}
0 \leq
\overline{\int_a^b} f -
\underline{\int_a^b} f
\leq
U(P,f) - L(P,f) < \epsilon .
\end{equation*}
Therefore, \(\overline{\int_a^b} f = \underline{\int_a^b} f\text{,}\) and \(f\) is integrable.
Example5.1.14.
Let us show \(\frac{1}{1+x}\) is integrable on \([0,b]\) for all \(b > 0\text{.}\) We will see later that continuous functions are integrable, but let us demonstrate how we do it directly.
Let \(\epsilon > 0\) be given. Take \(n \in \N\) and let \(x_i \coloneqq \nicefrac{ib}{n}\) form the partition \(P \coloneqq \{ x_0,x_1,\ldots,x_n \}\) of \([0,b]\text{.}\) Then \(\Delta x_i = \nicefrac{b}{n}\) for all \(i\text{.}\) As \(f\) is decreasing, for every subinterval \([x_{i-1},x_i]\text{,}\)
The sum telescopes, the terms successively cancel each other, something we have seen before. Picking \(n\) to be such that \(\frac{b^2}{n(b+1)} < \epsilon\text{,}\) the proposition is satisfied, and the function is integrable.
Remark5.1.15.
A way of thinking of the integral is that it adds up (integrates) lots of local information—it sums \(f(x)\,dx\) over all \(x\text{.}\) The integral sign was chosen by Leibniz to be the long S to mean summation. Unlike derivatives, which are “local,” integrals show up in applications when one wants a “global” answer: total distance travelled, average temperature, total charge, etc.
Subsection5.1.3More notation
When \(f \colon S \to \R\) is defined on a larger set \(S\) and \([a,b] \subset S\text{,}\) we say \(f\) is Riemann integrable on \([a,b]\) if the restriction of \(f\) to \([a,b]\) is Riemann integrable. In this case, we say \(f \in \sR\bigl([a,b]\bigr)\text{,}\) and we write \(\int_a^b f\) to mean the Riemann integral of the restriction of \(f\) to \([a,b]\text{.}\)
It is useful to define the integral \(\int_a^b f\) even if \(a \not< b\text{.}\) Suppose \(b < a\) and \(f \in \sR\bigl([b,a]\bigr)\text{,}\) then define
\begin{equation*}
\int_a^b f \coloneqq - \int_b^a f .
\end{equation*}
For any function \(f\text{,}\) define
\begin{equation*}
\int_a^a f \coloneqq 0 .
\end{equation*}
At times, the variable \(x\) may already have some other meaning. When we need to write down the variable of integration, we may simply use a different letter. For example,
Define \(f \colon [0,1] \to \R\) by \(f(x) \coloneqq x^3\) and let \(P \coloneqq \{ 0, 0.1, 0.4, 1 \}\text{.}\) Compute \(L(P,f)\) and \(U(P,f)\text{.}\)
5.1.2.
Let \(f \colon [0,1] \to \R\) be defined by \(f(x) \coloneqq x\text{.}\) Show that \(f \in \sR\bigl([0,1]\bigr)\) and compute \(\int_0^1 f\) using the definition of the integral (but feel free to use the propositions of this section).
5.1.3.
Let \(f \colon [a,b] \to \R\) be a bounded function. Suppose there exists a sequence of partitions \(\{ P_k \}_{k=1}^\infty\) of \([a,b]\) such that
Prove that \(f \in \sR\bigl([-1,1]\bigr)\) and compute \(\int_{-1}^1 f\) using the definition of the integral (but feel free to use the propositions of this section).
5.1.6.
Let \(c \in (a,b)\) and let \(d \in \R\text{.}\) Define \(f \colon [a,b] \to \R\) as
\begin{equation*}
f(x) \coloneqq
\begin{cases}
d & \text{if } x = c, \\
0 & \text{if } x \not= c.
\end{cases}
\end{equation*}
Prove that \(f \in \sR\bigl([a,b]\bigr)\) and compute \(\int_a^b f\) using the definition of the integral (but feel free to use the propositions of this section).
5.1.7.
Suppose \(f \colon [a,b] \to \R\) is Riemann integrable. Let \(\epsilon
> 0\) be given. Then show that there exists a partition \(P = \{ x_0, x_1,
\ldots, x_n \}\) such that for every set of numbers \(\{ c_1, c_2, \ldots, c_n \}\) with \(c_k \in [x_{k-1},x_k]\) for all \(k\text{,}\) we have
Let \(f \colon [a,b] \to \R\) be a Riemann integrable function. Let \(\alpha > 0\) and \(\beta \in \R\text{.}\) Then define \(g(x) \coloneqq f(\alpha x + \beta)\) on the interval \(I = [\frac{a-\beta}{\alpha}, \frac{b-\beta}{\alpha}]\text{.}\) Show that \(g\) is Riemann integrable on \(I\text{.}\)
5.1.9.
Suppose \(f \colon [0,1] \to \R\) and \(g \colon [0,1] \to \R\) are such that for all \(x \in (0,1]\text{,}\) we have \(f(x) = g(x)\text{.}\) Suppose \(f\) is Riemann integrable. Prove \(g\) is Riemann integrable and \(\int_{0}^1 f = \int_{0}^1 g\text{.}\)
5.1.10.
Let \(f \colon [0,1] \to \R\) be a bounded function. Let \(P_n = \{ x_0,x_1,\ldots,x_n \}\) be a uniform partition of \([0,1]\text{,}\) that is, \(x_i = \nicefrac{i}{n}\text{.}\) Is \(\bigl\{ L(P_n,f) \bigr\}_{n=1}^\infty\) always monotone? Yes/No: Prove or find a counterexample.
5.1.11.
(Challenging) For a bounded function \(f \colon [0,1] \to \R\text{,}\) let \(R_n \coloneqq (\nicefrac{1}{n})\sum_{i=1}^n f(\nicefrac{i}{n})\) (the uniform right-hand rule).
If \(f\) is Riemann integrable show \(\int_0^1 f = \lim\limits_{n\to\infty} R_n\text{.}\)
Find an \(f\) that is not Riemann integrable, but \(\lim\limits_{n\to\infty} R_n\) exists.
5.1.12.
(Challenging) Generalize the previous exercise. Show that \(f \in \sR\bigl([a,b]\bigr)\) if and only if there exists an \(I \in \R\text{,}\) such that for every \(\epsilon > 0\) there exists a \(\delta > 0\) such that if \(P\) is a partition with \(\Delta x_i < \delta\) for all \(i\text{,}\) then \(\abs{L(P,f) - I} < \epsilon\) and \(\abs{U(P,f) - I} < \epsilon\text{.}\) If \(f \in \sR\bigl([a,b]\bigr)\text{,}\) then \(I = \int_a^b f\text{.}\)
5.1.13.
Using Exercise 5.1.12 and the idea of the proof in Exercise 5.1.7, show that Darboux integral is the same as the standard definition of Riemann integral, which you have most likely seen in calculus. That is, show that \(f \in \sR\bigl([a,b]\bigr)\) if and only if there exists an \(I \in \R\text{,}\) such that for every \(\epsilon > 0\) there exists a \(\delta > 0\) such that if \(P = \{ x_0,x_1,\ldots,x_n \}\) is a partition with \(\Delta x_i < \delta\) for all \(i\text{,}\) then \(\abs{\sum_{i=1}^n f(c_i) \Delta x_i - I} < \epsilon\) for every set \(\{ c_1,c_2,\ldots,c_n \}\) with \(c_i \in [x_{i-1},x_i]\text{.}\) If \(f \in \sR\bigl([a,b]\bigr)\text{,}\) then \(I = \int_a^b f\text{.}\)
5.1.14.
(Challenging) Construct functions \(f\) and \(g\text{,}\) where \(f \colon [0,1] \to \R\) is Riemann integrable, \(g \colon [0,1] \to [0,1]\) is one-to-one and onto, and such that the composition \(f \circ g\) is not Riemann integrable.
5.1.15.
Suppose that \(f \colon [a,b] \to \R\) is a bounded function, and \(P\) is a partition of \([a,b]\) such that \(L(P,f)=U(P,f)\text{.}\) Prove that \(f\) is a constant function.
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf