This post is regarding a point made toward the end of Sec. 7.8 in the book Mathematical Analysis - A Modern Approach To Advanced Calculus by Tom M. Apostol, 2nd edition:
While trying to bring out the point that the existence or the value of a Riemann integral is not affected by changing the value of the integrand $f$ at a finite number of points, Apostol takes the following example:
Let $f$ be a real-valued function defined on a closed, bounded interval $[a, b]$ as follows:$$f(x) := 0 \qquad \mbox{ if } x \neq c,$$and $f(c)$ is any real number. Here $c \in [a, b]$.
Then does the inequality$$\big\lvert S(P, f) \big\rvert \leq \big\lvert f(c) \big\rvert \, \lVert P \rVert$$hold for every partition $P = \left\{ a = x_0 < x_1 < \cdots < x_{n-1} < x_n = b \right\}$ of the interval $[a, b]$ and for all choices of $t_k \in \left[ x_{k-1}, x_k \right]$? Here$$S(P, f) := \sum_{k=1}^n f \left( t_k \right) \left( x_k - x_{k-1} \right)$$and$$\lVert P \rVert := \max_{k=1}^n \left( x_k - x_{k-1} \right)$$of course.
My Reasoning:
We have the following two cases according to whether $c \in (a, b) \cap P$ or $c \not\in (a, b) \cap P$.
Case 1. When $c \in (a, b) \cap P$, let $c = x_k$, where $k \in \{ 1, \ldots, n-1 \}$. If we take $c$ as the representative of two successive subintervals of the partition $P$, then we have$$S(P, f) = f(c) \left( x_{k+1} - c \right) + f(c) \left( c - x_{k-1} \right). $$So we have$$\big\lvert S(P, f) \big\rvert \leq 2 \big\lvert f(c) \big\rvert \lVert P \rVert.$$In this case we may not have the inequality$$\big\lvert S(P, f) \big\rvert \leq \big\lvert f(c) \big\rvert \lVert P \rVert.$$Am I right?