# Question related to Riemann Sums

I was reading the book of Real Analysis by H.L.Royden and they have given the definition of Riemann sums and Riemann integral as follows:

After this definition they have given the following footnote

Now I am not getting what the footnote 1 is saying. I think the statement of that note 1 is not always true. For example if we take the Dirichlet function (which is 0 on rationals and 1 on irrationals ) then the footnote 1 is not true. Am I correct or am I missing something?

(Edit:) My thoughts on why the foot note does not work for Dirichlet function:

We define $$f:[0,1]\rightarrow \mathbb R$$ by $$f(x)=0$$ if $$x\in\mathbb Q$$ and $$f(x)=1$$ otherwise. Now consider any partition $$P$$ of $$[0,1]$$. Then for any subinterval $$[x_{i-1},x_i]$$ we get $$m_i=0$$ because each subinterval will definitely have infinitely may rationals. Also $$M_i=1$$ because each subinterval will definitely have infinitely many irrationals. Then Lower sum will be 0 and upper sum will be 1.

• Can you explain more specifically why you think it does not hold for Dirichlet function? Although proving that new definition gives the same value might be nonobvious, but it seems true by intuition, because we only changed $<$ to $\le$, isn't it? Sep 6 '21 at 1:03
• I have Royden's book, but it appears I did not study Riemann integral from it. That part I got from Apostol. I wonder what is the advantage of using open intervals for defining $M_i, m_i$ Sep 18 '21 at 7:25
• The fundamental properties of upper and lower sums namely that upper sums decrease by refining partition and lower sums increase by refining should hold in this case too. Sep 18 '21 at 7:36

Let's focus on upper Darboux sums and upper Darboux integral. The story for lower sums and integrals is similar.

Let us repeat the definitions for sake of clarity. Assume $$f:[a, b] \to\mathbb {R}$$ is bounded on $$[a, b]$$ with supremum $$M$$ and infimum $$m$$. Let $$P=\{x_0,x_1,\dots,x_n\}$$ be a partition of $$[a, b]$$ so that $$a=x_0 and define $$M_i=\sup\, \{f(x) \mid x\in(x_{i-1},x_i)\} ,M'_i=\sup\,\{f(x)\mid x\in[x_{i-1},x_i] \}$$ and $$U(f, P) =\sum_{i=1}^n M_i(x_i-x_{i-1}),U'(f,P)=\sum_{i=1}^n M'_i(x_i-x_{i-1})$$ and $$U(f) =\inf\, \{U(f, P) \mid P\in\mathcal{P} [a, b] \} =\inf \, A\, \text{ (say)}$$ and $$U'(f) =\inf\, \{U'(f, P) \mid P\in\mathcal{P} [a, b] \} =\inf\, A'\text{ (say)}$$ where $$\mathcal{P} [a, b]$$ is the set of all partitions of $$[a, b]$$.

Let's observe that we have $$M_i\leq M'_i, m\leq M_i, m\leq M'_i$$ and hence the upper sums $$U(f, P)$$ as well as $$U'(f, P)$$ are bounded below by $$m(b-a)$$ so that $$U(f), U'(f)$$ exist. Moreover for every element $$a=U(f, P) \in A$$ we have a corresponding element $$a'\in U'(f, P) \in A'$$ with $$a\leq a'$$. And vice versa for every element $$a'\in A'$$ there is a corresponding element $$a\in A$$ with $$a\leq a'$$.

Under these conditions we must have $$\inf A\leq \inf A'$$. To prove their equality we need to show that given any $$\epsilon>0$$ and given any member $$a\in A$$ we have a member $$a'\in A'$$ with $$|a-a'|<\epsilon$$.

Let us then start with partition $$P$$ of $$[a, b]$$ with upper sum $$U(f, P) =\sum_{i=1}^{n}M_i(x_i-x_{i-1})$$ and let $$\delta =\min_{i=1}^{n}(x_i-x_{i-1})$$. Let $$k$$ be a positive integer such that $$1/k<\delta/2$$.

We shall construct a sequence of partitions $$P_k$$ such that $$\lim_{k\to\infty} U'(f, P_k) = U(f, P)$$ The partition $$P_k$$ consists of all the points of $$P$$ as well as the points $$a+(1/k),b-(1/k),x_i\pm(1/k),i=1,2,\dots,n-1$$ so that there are a total of $$(3n+1)$$ points in $$P_k$$. And let us write $$M'_{ik} =\sup\, \{f(x) \mid x\in[x_{i-1}+(1/k),x_i-(1/k)]\}$$ and note that $$\lim_{k\to\infty} M'_{ik} =\sup\,\{f(x)\mid x\in(x_{i-1},x_i)\}=M_i$$ The sum $$U'(f, P_k)$$ contains terms corresponding to intervals $$[x_{i-1}+(1/k),x_i-(1/k)]$$ and these terms tend to $$M_i(x_i-x_{i-1})$$ and a finite number (exactly $$2n$$) of terms each of which is bounded in absolute value by $$B/k$$ where $$B$$ is a positive bound for $$|f|$$ on $$[a, b]$$ and these terms tend to $$0$$. It follows that $$U'(f, P_k) \to U(f, P)$$ as $$k\to\infty$$.

Therefore given any $$\epsilon >0$$ and an upper sum $$U(f, P)$$ we can find a partition $$P'$$ such that $$|U'(f, P') - U(f, P) |<\epsilon$$. We just have to choose $$P'$$ as one of the $$P_k$$ obtained by using $$\epsilon$$ in the limit definition. Thus our goal is achieved.

• In the last para, "bounded in absolute value by $\frac B k$" I think that should be bounded by $2B/k$ if I am not mistaken. Rest all seems nice to me +1. :)
– Koro
Sep 18 '21 at 14:37
• @Koro: I am not dealing with difference of two sums, but just one sum so $B/k$ is fine. There are by the way $2n$ such terms bounded by $B/k$. I will add this detail in the answer. Sep 18 '21 at 14:42
• Yeah , you are right. I somehow didn't see "terms corresponding to" in first line of second last para. :)
– Koro
Sep 18 '21 at 14:47

If $$f$$ is the Dirichlet function, then we get the same values for the upper and lower integrals if we use the first definitions of $$m_i$$ and $$M_i$$. If $$x_{i-1} < x_i$$, then any interval from $$x_{i-1}$$ to $$x_i$$ (whether it is (half) open or (half) closed) will contain both a rational and an irrational number; in fact infinitely many of both. If you are not convinced that this is the case for open intervals, then an argument would be: If $$[x_{i-1}, x_i]$$ contains infinitely many (ir)rationals, then $$(x_{i-1}, x_i)$$ does as well, since we have only removed finitely many points from the interval, namely the endpoints.

Let us call the first definition using strict inequalities "definition 1" and the other definition "definition 2", and let us write $$m_i$$ and $$m_i'$$ respectively in the two definitions. Similarly, write $$L$$ and $$L'$$ for lower sums and $$\underline I$$ and $$\underline I'$$ for lower integrals, where we use $$m_i$$ and $$m_i'$$ respectively. The footnote is saying that, while $$m_i(f)$$ and $$m_i'(f)$$ might not generally agree, we still have $$\underline I(f) = \underline I'(f)$$.

We need a few facts about these integrals: Clearly we have $$L'(f,P) \leq L(f,P)$$, since we take infimums over larger sets on the left-hand side. It follows that $$\underline I'(f) \leq \underline I(f)$$.

Let $$f \colon [a,b] \to \mathbb{R}$$ be bounded. If $$P$$ is a partition of $$[a,b]$$, let $$g_P \colon [a,b] \to \mathbb{R}$$ be the function that agrees with $$f$$ on the interiors of each subinterval of $$P$$, and let $$g_P(x_i) = \sup_{x \in [a,b]} f(x)$$. Then $$m_i(f) = m_i'(g_P)$$, using obvious notation, and so $$L(f,P) = L'(g_P,P)$$.

Now let $$\epsilon > 0$$, and choose a partition $$P$$ such that $$\underline I(f) - L(f,P) < \epsilon$$. Since $$g_P$$ arises from $$f$$ by modifying $$f$$ in finitely many points, we have $$\underline I(f) = \underline I(g_P)$$ (see below). Furthermore, $$\underline I(f) = \underline I(g_P) \geq \underline I'(g_P)$$, so $$0 \leq \underline I'(g_P) - L'(g_P,P) < \epsilon$$. It follows that

\begin{align} 0 \leq \underline I(f) - \underline I'(f) & = \underline I(f) - \underline I'(g_P) \\ & = \bigl( \underline I(f) - L(f,P) \bigr) - \bigl( \underline I'(g_P) - L'(g_P,P) \bigr) \\ & < \epsilon. \end{align}

And since $$\epsilon$$ was arbitrary, $$\underline I(f) = \underline I'(f)$$. And clearly we can do the same for upper integrals, defining $$g_P$$ slightly differently.

We just need to justify that modifying a function in finitely many points does not change the upper/lower integrals. It suffices to show that the integrals do not change if we modify the function at a single point. The case of finitely many points then follows by induction.

Let me sketch the proof for the upper integral. It is not difficult to show that

$$\overline {\int_a^b} (f + g) \leq \overline {\int_a^b} f + \overline {\int_a^b} g,$$

for bounded $$f$$ and $$g$$. Let $$g$$ be identically zero except at a single point $$c \in (x_{i-1}, x_i)$$, at which $$g(c) > 0$$. Then by choosing partitions such that $$x_i - x_{i-1}$$ is very small we can make $$M_i(g)$$ as small as we want. Hence $$\overline {\int_a^b} g = 0$$. It follows that

$$\overline {\int_a^b} f \leq \overline {\int_a^b} (f + g) \leq \overline {\int_a^b} f,$$

where the first inequality is due to the upper integral being increasing in the integrand.

• I don't see how you can construct this $g$ which is fundamentally different from $f$. Every point of interval $(a, b)$ can be made an interior point of sub-intervals of some suitable partition. This means that your $g=f$ except at end points $a, b$. Maybe I am not getting your argument correctly, but that's how I see the construction of $g$. Sep 18 '21 at 7:30
• @ParamanandSingh: Construction of $g$ in the first half of this answer ensures lower integral from both definitions are the same. $g(x_i):=\sup f[a,b]$ for each $i$ and $f(x)=:g(x)$ elsewhere. For upper integral, one needs to define $h(x_i)=\inf f[a,b]$ and $h(x):=f(x)$ elsewhere.
– Koro
Sep 18 '21 at 7:43
• (contd.) One confusing point is: $g$ is defined for a particular partition P so why are lower integrals same. This is not a problem: we take any partition $P'$ then on each subinterval $(y_{i-1},y_i)$, $\inf g(y_{i-1},y_i)=\inf f[y_{i-1}, y_i]$ (it doesn't matter where this subinterval contains any $x_i$ or not). From here $L(P,f)= L(P,g)$ for any $P$ whence the equality follows. @ParamanandSingh
– Koro
Sep 18 '21 at 7:53
• @ParamanandSingh You're right, there is something nontrivial there that needs explaining. I cleaned up the argument a bit, hopefully it makes more sense now! Sep 18 '21 at 10:01
• @Koro: I wrote an answer which shows the relation between supremum on closed interval and open intervals. Sep 18 '21 at 10:31

Let $$f$$ be bounded on $$[a,b]$$.

Let $$P=\{a=x_{0} < x_{1} < x_{2} < ...< x_{n} =b\}$$ be any partition of $$[ a,b]$$.

Define $$U( P,f): =\sum_{i=1}^nM_{i} \Delta x_{i}$$, where $$\displaystyle M_{i} =\sup \ f[ x_{i-1} ,x_{i}], 1\le i\le n$$.

Let $$U'( P,f): =\sum M_{i} '\Delta x_{i}$$, where $$\displaystyle M_{i} '=\sup f( x_{i-1} ,x_{i}), 1\le i\le n$$.

$$\inf U'( P,f)$$ and $$\inf U( P,f)$$ ( where infimum is taken over all partitions of $$[a,b]$$) both exist as $$f$$ is bounded on $$[a,b]$$.

Claim: $$\displaystyle \inf U'( P,f) =\inf U( P,f)$$.

Proof: For any partition $$P$$, it is clear (Refer Note below) that $$U'( P,f) \leq U( P,f)$$, whence it follows that $$\inf U'( P,f) \leq \inf U( P,f).\tag 1$$

Let $$\displaystyle P=\{a=x_{0} < x_{1} < ...< x_{n} =b\}$$ be any partition of $$\displaystyle [ a,b]$$.

Let $$\displaystyle S:=\{|x_{i} -x_{i-1} |:\ 1\leq i\leq n\}$$

Let $$\displaystyle \delta _{n} =\frac{1}{4} .\min\left\{\frac{1}{4}\min S,\ \frac{1}{n^{3}}\right\}$$

Let $$\displaystyle A=\left\{x_{i} \in P:\ \sup \ f[ x_{i-1} ,x_{i}] \neq \sup \ f( x_{i-1} ,x_{i})\right\}$$

Let's refine $$\displaystyle P$$ to $$\displaystyle P'\$$by surrouding points of $$\displaystyle A$$ by adding points of the type $$\displaystyle \{x_{i} -\delta _{n} ,x_{i} +\delta _{n}\}$$.

Hence

$$\displaystyle \begin{array}{{>{\displaystyle}l}} U( P',f) -U'( P',f) =0+\sum _{i\ \text{runs over i's corresponding to points in A}} \ ( M_{i} -M_{i} ') \delta _{n}\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \leq 2\sup f[ a,b]( 2n) \delta _{n} < \frac{\sup f[ a,b]}{n^{2}} \end{array}$$

Hence, given any $$\displaystyle \epsilon >0$$ there exists $$\displaystyle P$$ such that

$$\displaystyle 0< U( P,f) -U'( P,f) < \epsilon$$

$$\displaystyle U( P,f) =( U( P,f) -U'( P,f)) +U'( P,f) < \epsilon +U'( P,f)$$

$$\displaystyle \implies\inf U( P,f) -\inf \ U'( P,f) \leq \epsilon \tag 2$$

Since $$\epsilon\gt 0$$ is arbitrary, plainly we have the equality by $$(1)$$ and $$(2)$$.

This shows the equality of upper Riemann integrals (not sums) in footnote and in the definition, in the image posted in OP.

Similar arguments as above can be used to show equality of lower integrals also.

Note: If $$g$$ is a function defined on the closed and bounded interval $$[p,q]$$ then $$\sup g[p,q]\ge \sup g(p,q)$$.

• It appears that my answer uses idea similar to yours. The presentation may be different because I try to approximate the supremum on open interval by supremum on a sequence of closed intervals, but I think the key aspect is same. Let me know if you wish me to delete my answer. Sep 18 '21 at 10:46
• I need to check fine details here as well as the updated answer by Danny before I can click on +1 Sep 18 '21 at 10:47
• Please don't delete your answer. Some people may understand more from one presentation than from the other. That said, please do let me know if you find any errors in this answer. Thanks. :)@ParamanandSingh
– Koro
Sep 18 '21 at 10:51
• OK i get it now. Your idea is slightly different. Based on $\epsilon$ you choose a specific partition for which the two different kind of upper sums are close to each other within a margin of $\epsilon$. My approach uses two partitions, one given and one determined using $\epsilon$. Sep 18 '21 at 11:06
• +1 there. Let's hope the asker gets a clear picture by looking at different answers here. Usually such level of detail or subtle aspects should be provided by textbook author (say in an appendix) and not left for the reader to wonder. Sep 18 '21 at 11:35