The Riemann integral of a function is unaffected by changes to the value of the function at finitely many points

real-analysis

From "An Introduction to Lebesgue Integration and Fourier Series" by Howard J. Wilcox and David L. Myers:

1.1 Definition: A partition $P$ of a closed interval $[a,b]$ is a finite sequence $(x_{0}, x_{1}, \ldots, x_{n})$ such that $a = x_{0} < x_{1} < \ldots < x_{n} = b$. The norm (or width, or mesh) of $P$, denoted $\| P \|$, is defined by

$$
\| P \| = \underset{1 \leq i \leq n}{\max} (x_{i} – x_{i-1}).
$$

That is, $\| P \|$ is the length of the longest of the subintervals $[x_{0}, x_{1}], [x_{2}, x_{3}], \ldots, [x_{n-1}, x_{n}]$.

1.2 Definition: Let $P = (x_{0}, \ldots, x_{n})$ be a partition of $[a,b]$, and let $f$ be defined on $[a,b]$. For each $i = 1, \ldots, n$, let $x_{i}^{*}$ be an arbitrary point in the interval $[x_{i-1}, x_{i}]$. Then any sum of the form

$$
R(f,P) = \sum_{i=1}^{n} f(x_{i}^{*})(x_{i} – x_{i-1})
$$

is called a Riemann sum of $f$ relative to $P$.

1.3 Definition: A function $f$ is Riemann integrable on $[a,b]$ if there is a real number $R$ such that for any $\epsilon > 0$, there exists a $\delta > 0$ such that for any partition $P$ of $[a,b]$ satisfying $\| P \| < \delta$, and for any Riemann sum $R(f,P)$ of $f$ relative to $P$, we have $\left\lvert R(f,P) – R \right\lvert < \epsilon$.

Exercises:

5.4 Let $g(x) = 0$ for $x \neq 1$, $g(1) = 1$. Show from Definition 1.3 that $\int_{0}^{2} g(x) dx = 0$. (Hint: given a partition $P = (x_{0}, x_{1}, \ldots, x_{n})$ of $[0,2]$, $x = 1$ is in at most two subintervals $[x_{i-1},x_{i}]$ and $[x_{i},x_{i+1}]$. Thus show $R(g,P) \leq 2\delta$.)

5.5 (a) Prove that if $f$ is Riemann integrable on $[a,b]$, $c \in [a,b]$, and $g(x) = f(x)$ for all $x \neq c$, then $g$ is Riemann integrable on $[a,b]$, and $\int_{a}^{b} f(x) dx = \int_{a}^{b} g(x) dx$. (Hint: See Exercise 5.4.)

(b) Repeat (a) in the case where $g(x) = f(x)$ except a finitely many points $c_{1}, \ldots, c_{k}$ in $[a,b]$.

I am attempting Exercises 5.4 and 5.5. For Exercise 5.4 I have gotten as far as:

Let $R = 0$. Let $\epsilon > 0$. Let $\delta = \epsilon / 2$. Let $P = (x_{0}, \ldots, x_{n})$ be a partition of $[0,2]$ such that $\| P \| < \delta$. Let $R(g,P)$ be a Riemann sum of $g$ relative to $P$.

Then

\begin{align*}
\left \lvert R(g,P) – R \right \lvert
&= \left \lvert R(g,P) – 0 \right \lvert \\
&= \left \lvert R(g,P) \right \lvert \\
&= \left \lvert \sum_{i=1}^{n} g(x_{i}^{*}) (x_{i} – x_{i-1}) \right \lvert \\
&\leq \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) (x_{i} – x_{i-1}) \right \lvert \\
&= \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) \right \lvert \left \lvert (x_{i} – x_{i-1}) \right \lvert \\
&= \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) \right \lvert (x_{i} – x_{i-1}) \\
&\leq \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) \right \lvert \| P \| \\
&= \| P \| \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) \right \lvert \\
&< \delta \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) \right \lvert \\
&= \frac{\epsilon}{2} \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) \right \lvert \\
\end{align*}

The difficulty I am having is in finding the best method to formally demonstrate that $\sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) \right \lvert \leq 2$. I could list the possible types of partitions, and prove the inequality for each, but this does not seem very elegant, and I am not certain such an approach is going to translate to exercise 5.5 (b). Is there a better way?

EDIT

Attempted proof of 5.5 (a):

Let $\epsilon > 0$.

Let $R = \int_{a}^{b} f dx$.

Choose $\delta_{1} > 0$ such that for any partition $P$ of $[a,b]$ satisfying $\left \lVert P \right \lVert < \delta_{1}$, and for any Riemann sum $R(f,P)$ of $f$ relative to $P$, we have $\left \lvert R(f,P) – R \right \lvert < \epsilon/2$.

Let $\delta_{2} = \epsilon / (2 \cdot 2 \left \lvert g(c) – f(c) \right \lvert)$.

Let $\delta = \min(\delta_{1}, \delta_{2})$. Let $P = (x_{0}, \ldots, x_{n})$ be a partition of $[a,b]$ such that $\left \lVert P \right \lVert < \delta$. Let $R(g,P)$ be a Riemann sum of $g$ relative to $P$. Let $R(f,P)$ be the Riemann sum of $f$ relative to $P$ that uses the same $x_{i}^{*}$ as $R(g,P)$.

Then

\begin{align*}
\left \lvert R(g, P) – R \right \lvert
&= \left \lvert R(g, P) – R(f, P) + R(f, P) – R \right \lvert \\
&\leq \left \lvert R(g, P) – R(f, P) \right \lvert + \left \lvert R(f,P) – R \right \lvert \\
&= \left \lvert \sum_{i=1}^{n} g(x_{i}^{*})(x_{i} – x_{i-1}) – \sum_{i=1}^{n} f(x_{i}^{*})(x_{i} – x_{i-1}) \right \lvert + \left \lvert R(f,P) – R \right \lvert \\
&= \left \lvert \sum_{i=1}^{n} (g(x_{i}^{*}) – f(x_{i}^{*}))(x_{i} – x_{i-1}) \right \lvert + \left \lvert R(f,P) – R \right \lvert \\
&\leq \sum_{i=1}^{n} \left \lvert (g(x_{i}^{*}) – f(x_{i}^{*}))(x_{i} – x_{i-1}) \right \lvert + \left \lvert R(f,P) – R \right \lvert \\
&= \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) – f(x_{i}^{*}) \right \lvert \left \lvert (x_{i} – x_{i-1}) \right \lvert + \left \lvert R(f,P) – R \right \lvert \\
&= \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) – f(x_{i}^{*}) \right \lvert (x_{i} – x_{i-1}) + \left \lvert R(f,P) – R \right \lvert \\
&\leq \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) – f(x_{i}^{*}) \right \lvert \left \lVert P \right \lVert + \left \lvert R(f,P) – R \right \lvert \\
&= \left \lVert P \right \lVert \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) – f(x_{i}^{*}) \right \lvert + \left \lvert R(f,P) – R \right \lvert \\
&< \delta \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) – f(x_{i}^{*}) \right \lvert + \left \lvert R(f,P) – R \right \lvert \\
&= \frac{\epsilon}{2 \cdot 2 \left \lvert g(c) – f(c) \right \lvert} \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) – f(x_{i}^{*}) \right \lvert + \left \lvert R(f,P) – R \right \lvert \\
&< \frac{\epsilon}{2 \cdot 2 \left \lvert g(c) – f(c) \right \lvert} \sum_{i=1}^{n} \left \lvert g(x_{i}^{*}) – f(x_{i}^{*}) \right \lvert + \epsilon / 2 \\
&\leq \epsilon / 2 + \epsilon / 2 \\
&= \epsilon. \\
\end{align*}

Best Answer

5.4. All terms in $\sum_{i=1}^n|g(x_i^*)|=0$, except for the term(s) associated with the interval(s) containing $x=1$, which is (are) $\le 1$. Since there are at most two non-zero terms, the sum is $\le 2$.

5.5a. Essentially the same as 5.4, with the exceptional point at $x=c$.

5.5b. The method can be extended to a finite number of points, with $\delta=\frac{\epsilon}{2k}$.

There seems to be an implicit assumption for 5.5, that where $g(x)\ne f(x),\ g(x)-f(x)$ is finite. The 5.5 answers assume $|g(x)-f(x)|\le 1$. Without this assumption, the $\delta$ definition would need to be divided by the maximum magnitude difference between $f$ and $g$.