Function which is bounded and continuous except on a finite set of points is Riemann Integrable I am trying to solve the following problem (Problem 7.2.15 of Bartle/Sherbert Book: Introduction to Real Analysis). The problem says:
If $f$ is a bounded function on $[a,b]$, and there is a finite set $E$ such that $f$ is continuous at every point of $[a,b]\E$, show that $f$ is Riemann integrable on $[a,b]$
My idea is to assumed that $E={c_{0},c_{1},...,c_{n}}$, and I am trying to show that the restriction of $f$ on each subinterval: $[c_{i},c_{i+1}]$ is Riemann integrable, and then use the additivity theorem to conclude that the function is Riemann integrable on $[a,b]$. However, I couldn't implement the previous idea. Any help is appreciated!
 A: Because $f$ is bounded, it is enough to consider upper and lower sums for $f$ when determining whether or not
$$
         \lim_{\|\mathscr{P}\|\rightarrow 0}\sum_{j}f(x_{j}^{\star})\Delta x_{j}
$$
converges. The upper sum is defined in terms of $M_{j}=\sup_{x_{j-1}\le x_{j}^{\star}\le x_{j}} f(x_{j}^{\star})$ and the lower sum in terms of $m_{j}=\sup_{x_{j-1}\le x_{j}^{\star}\le x_{j}}f(x_{j}^{\star})$. Both $|m_{j}|$ and $|M_{j}|$ are bounded by $M$, where $M$ is a bound for $f$ on $[a,b]$. Clearly $|f(x)-f(y)| \le 2M$ for all $x,y\in [a,b]$.
The assumption is that the number $|E|$ of elements of $E$ is finite. Let $\delta > 0$, and form the union $E_{\delta}$ of all intervals $[e-\delta,e+\delta]$ for $e\in E$. The total length of these intervals is $2|E|\delta$. If $\|\mathscr{P}\| < \delta$, then the total contribution to the Riemann sum of intervals in $\mathscr{P}$ which contain at least one of point of $E_{\delta}$ is bounded by $4|E|\delta M$.
Now, let $\epsilon > 0$ be given. Choose $\delta > 0$ small enough that $8|E|\delta M < \epsilon/2$. Let $F_{\delta}$ be the closed set obtained by subtracting the intervals $(e-\delta,e+\delta)$ from $[a,b]$. This leaves a finite, disjoint set of closed intervals on which $f$ is continuous. So there exists $\delta' > 0$ such that
$$
        |f(x)-f(y)| < \frac{\epsilon}{2(b-a)}
$$
whenever $|x-y| < \delta'$ and whenever $x,y$ are in the same interval of $F_{\delta}$. If $\mathscr{P}$ is any partition of $[a,b]$ with $\|\mathscr{P}\| < \min\{\delta,\delta'\}$, then the difference of upper and lower sums over $\mathscr{P}$ is bounded by
$$
           \frac{\epsilon}{2(b-a)}\left(\sum_{\{j \;:\; [x_{j-1},x_{j}]\cap E_{\delta}=\emptyset\}}\Delta x_{j}\right)+ 2M\left(\sum_{\{ j\; : \; [x_{j-1},x_{j}]\cap E_{\delta}\ne \emptyset\}}\Delta x_{j}\right)
$$
$$
         \le \frac{\epsilon}{2(b-a)}(b-a)+2M(|E|2\delta+2|E|\|\mathscr{P}\|)
    \le \epsilon/2 + 2M|E|4\delta < \epsilon/2+\epsilon/2.
$$
Because $\epsilon > 0$ was arbitrary, then it follows that $f$ is Riemann integrable on $[a,b]$.
A: We prove the claim by strong induction on the number of discontinuities of $f$ on $[a, b]$. The base case $n = 1$ is that $f$ has only one discontinuity $c$ of $[a, b]$. So $c$ can be $a, b,$ or a middle point that is $a < c < b$. If $c$ is the middle point, then we can prove that $f$ is integrable on $[a, c]$, and then on $[c, b]$, then $f$ is integrable on $[a, b]$ by addition property of Riemann integrable function. So it suffices to prove for the case $c = a$ or $c = b$. Both cases are done similarly so we can simplify the argument by taking $c = a$. Now we can choose a point $x(1)$ of $[a, b]$ close to a such that $(M(1) - m(1))(x(1) - a) < \frac{e}{2}$ and this is possible because $M(1) - m(1) < 2K$ with $K = \sup \{ f(x) : x \in [a, b]\}$. Next on the interval $[x(1), b]$, $f$ is continuous since there is no discontinuity here so it is integrable here, and thus there is a partition $Q$ of $[x(1), b]$ such that $U(Q,f) - L(Q,f) < \frac{e}{2}$. Now let $P = Q \cup \{a\}$ be a partition of $[a, b]$, then $U(P,f) - L (P,f) = (M(1) - m(1))(x(1) - a) + U(Q,f) - L(Q,f) < \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon$. So $f$ is integrable on $[a, b]$. So suppose that $f$ is integrable on $[a, b]$ with $n$ discontinuities. Now if $f$ has $n + 1$ points of discontinuities on $[a, b]$, then let say $x^*$ be one of these points, then consider breaking $[a, b]$ into $3$ sub-intervals $[a, x^*], [x^*, x^{**}], and [x^{**}, b]$ where $x^*$ and $x^{**}$ are two discontinuities points of $[a, b]$ and appeal the inductive step on each of these sub-intervals we get $f$ is integrable on each of these sub-intervals and therefore $f$ is integrable on $[a, b]$.
