$f$ bounded on $[a,b]$ with one or finite discontinuities implies $f$ Riemann-integrable. I have two problems:
Prove that if $f$ is bounded on $[a, b]$ and has exactly one discontinuity in $[a, b]$ then $f$ is Riemann-integrable on $[a, b]$.
Prove that if $f$ is bounded on $[a, b]$ and $f$ has only finitely many discontinuities in $[a, b]$ then $f$ is Riemann-integrable on $[a, b]$.
I have a possible proof for the first one which I would like checked:
Theorem 6.1 states that $f$ is Riemann-integrable on $[a, b]$ iff given any $\varepsilon > 0$ there exists a partition $P$ of $[a, b]$ with $U(P, f) - L(P, f) < \varepsilon$.
Theorem 6.2 states that if $f$ is continuous on $[a, b]$ then it is Riemann-integrable on $[a, b]$.

Suppose $f$ is bounded on $[a, b]$. Then by definition there exists $M > 0$ such that $\vert f(x) \vert \leq M$ for all $x \in [a, b]$. Suppose $f$ has exactly one discontinuity in $[a, b]$ call it $c$. Without loss of generality suppose $c \in (a, b)$. Let $\varepsilon > 0$. Choose $\delta > 0$ such that $\displaystyle \delta = \frac{\varepsilon}{12M}$. Observe that $f$ is continuous on $[a, c - \delta]$ and $[c + \delta, b]$. By Theorem 6.2 $f$ is Riemann-integrable on $[a, c - \delta]$ and $[c + \delta, b]$. By Theorem 6.1 there exists a partition $P_1$ of $[a, c - \delta]$ with $U(P_1, f) - L(P_1, f) < \varepsilon/3$. Again, by Theorem 6.1 there exists a partition $P_2$ of $[c + \delta, b]$ with $U(P_2, f) - L(P_2, f) < \varepsilon/3$. Define $P = P_1 \cup P_2$. Now observe that 
          \begin{align*}
   U(P, f) &=  U(P_1, f) + 2\delta \cdot \sup_{x \in [c - \delta, c+ \delta]} f(x) + U(P_2, f) \\
   &\leq U(P_1, f) + 2\delta \cdot M + U(P_2, f)
  \end{align*}
  and 
          \begin{align*}
   L(P, f) &= L(P_1, f) + 2\delta \cdot \inf_{x \in [c - \delta, c+ \delta]} f(x) + L(P_2, f)\\
   & \geq L(P_1, f) + 2\delta \cdot (-M) + L(P_2, f) 
  \end{align*}
  which is implies $$-L(P, f) \leq - L(P_1, f) + 2\delta \cdot M - L(P_2, f) $$ Hence we have
          \begin{align*}
   U(P, f) - L(P, f) &\leq U(P_1, f) + 2\delta \cdot M + U(P_2, f) - L(P_1, f) + 2\delta \cdot M - L(P_2, f)\\
   &= \big[U(P_1, f) - L(P_1, f) \big] + 4 \delta \cdot M + \big[U(P_2, f) - L(P_2, f)\big]\\
   &< \frac\varepsilon3 + 4M\frac{\varepsilon}{12M} + \frac\varepsilon3\\
   &= \frac\varepsilon3 +\frac\varepsilon3 +\frac\varepsilon3 \\
   &= \varepsilon
  \end{align*}
          Thus by Theorem 6.1 we can conclude that $f$ is Riemann-integrable on $[a, b]$.

My question namely is: is it sufficient to check that $c \in (a, b)$ or should I explicitly show that it holds when the discontinuity is on the endpoints?
For the second problem, I am thinking of using induction on the first problem, but I haven't seen an induction problem done like that so I don't know how to get started. Any push in the right direction would be greatly appreciated! 
 A: From comments to my question I have formulated my own proofs. If anyone can confirm their correctness (especially on the second one!) I would greatly appreciate it!
Prove that if $f$ is bounded on $[a, b]$ and has exactly one discontinuity in $[a, b]$ then $f$ is Riemann-integrable on $[a, b]$.

Suppose $f$ is bounded on $[a, b]$. Then by definition there exists $M > 0$ such that $\vert f(x) \vert \leq M$ for all $x \in [a, b]$. Suppose $f$ has exactly one discontinuity in $[a, b]$ call it $c$. Suppose $c \in (a, b)$. Let $\varepsilon > 0$. Choose $\delta > 0$ such that $\displaystyle \delta = \frac{\varepsilon}{12M}$ and also we must restrict delta such that $a < c - \delta$ and $c + \delta < b$. Observe that $f$ is continuous on $[a, c - \delta]$ and $[c + \delta, b]$. By Theorem 6.2 $f$ is Riemann-integrable on $[a, c - \delta]$ and $[c + \delta, b]$. By Theorem 6.1 there exists a partition $P_1$ of $[a, c - \delta]$ with $U(P_1, f) - L(P_1, f) < \varepsilon/3$. Again, by Theorem 6.1 there exists a partition $P_2$ of $[c + \delta, b]$ with $U(P_2, f) - L(P_2, f) < \varepsilon/3$. Define $P = P_1 \cup P_2$. Now observe that 
          \begin{align*}
   U(P, f) &=  U(P_1, f) + 2\delta \cdot \sup_{x \in [c - \delta, c+ \delta]} f(x) + U(P_2, f) \\
   &\leq U(P_1, f) + 2\delta \cdot M + U(P_2, f)
  \end{align*}
  and 
          \begin{align*}
   L(P, f) &= L(P_1, f) + 2\delta \cdot \inf_{x \in [c - \delta, c+ \delta]} f(x) + L(P_2, f)\\
   & \geq L(P_1, f) + 2\delta \cdot (-M) + L(P_2, f) 
  \end{align*}
  which is implies $$-L(P, f) \leq - L(P_1, f) + 2\delta \cdot M - L(P_2, f) $$ Hence we have
          \begin{align*}
   U(P, f) - L(P, f) &\leq U(P_1, f) + 2\delta \cdot M + U(P_2, f) - L(P_1, f) + 2\delta \cdot M - L(P_2, f)\\
   &= \big[U(P_1, f) - L(P_1, f) \big] + 4 \delta \cdot M + \big[U(P_2, f) - L(P_2, f)\big]\\
   &< \frac\varepsilon3 + 4M\frac{\varepsilon}{12M} + \frac\varepsilon3\\
   &= \frac\varepsilon3 +\frac\varepsilon3 +\frac\varepsilon3 \\
   &= \varepsilon
  \end{align*}
          Thus by Theorem 6.1 we can conclude that $f$ is Riemann-integrable on $[a, b]$.
Now consider $c = b$. Since $f$ is bounded, there exists $M > 0$ such that $\vert f(x) \vert \leq M$ for all $x \in [a, b]$. Let $\varepsilon > 0$. Choose $\delta > 0$ such that $\delta = \frac{\varepsilon}{4M}$ and we must restrict delta such that $a < b - \delta$. Observe that $[a, b - \delta]$ is continuous. By Theorem 6.2 $f$ is Riemann-integrable on $[a, b - \delta]$. Since $f$ is Riemann-integrable on $[a, b - \delta]$, by Theorem 6.1 there exists a partition $P_1$ of $[a, b - \delta]$ such that $U(P_1, f) - L(P_1, f) < \frac\varepsilon2$. Now consider the partition $P = P_1 \cup \{b\}$ and observe that $\displaystyle U(P, f) = U(P_1, f) + \delta \sup_{x \in [b - \delta, b]} f(x) \leq U(P_1, f) + \delta M$. Also $\displaystyle L(P, f) = L(P_1, f) + \delta \inf_{x \in [b - \delta, b]} f(x) \geq L(P_1, f) + \delta(- M)$ which is equivalent to $-L(P, f) \leq -L(P_1, f) + \delta M$. Thus we have
          \begin{align*}
   U(P, f) - L(P, f)&\leq U(P_1, f) + \delta M  -L(P_1, f) + \delta M\\
   &= \big[U(P_1, f) - L(P_1, f) \big] + 2\delta M\\
   &< \frac\varepsilon2 + 2M \frac{\varepsilon}{4M}\\
   &= \frac\varepsilon2 + \frac\varepsilon2\\
   &= \varepsilon
  \end{align*}
          Thus by Theorem 6.1 we can conclude that $f$ is Riemann-integrable on $[a, b]$.
Now consider $c = a$. Since $f$ is bounded, there exists $M > 0$ such that $\vert f(x) \vert \leq M$ for all $x \in [a, b]$. Let $\varepsilon > 0$. Choose $\delta > 0$ such that $\delta = \frac{\varepsilon}{4M}$ and we must restrict delta such that $a + \delta < b$. Observe that $[a + \delta, b]$ is continuous. By Theorem 6.2 $f$ is Riemann-integrable on $[a + \delta, b]$. Since $f$ is Riemann-integrable on $[a + \delta, b]$, by Theorem 6.1 there exists a partition $P_1$ of $[a + \delta, b]$ such that $U(P_1, f) - L(P_1, f) < \frac\varepsilon2$. Now consider the partition $P = P_1 \cup \{a\}$ and observe that $\displaystyle U(P, f) = U(P_1, f) + \delta \sup_{x \in [a, a + \delta]} f(x) \leq U(P_1, f) + \delta M$. Also $\displaystyle L(P, f) = L(P_1, f) + \delta \inf_{x \in [a, a + \delta]} f(x) \geq L(P_1, f) + \delta(- M)$ which is equivalent to $-L(P, f) \leq -L(P_1, f) + \delta M$. Thus we have
          \begin{align*}
   U(P, f) - L(P, f)&\leq U(P_1, f) + \delta M  -L(P_1, f) + \delta M\\
   &= \big[U(P_1, f) - L(P_1, f) \big] + 2\delta M\\
   &< \frac\varepsilon2 + 2M \frac{\varepsilon}{4M}\\
   &= \frac\varepsilon2 + \frac\varepsilon2\\
   &= \varepsilon
  \end{align*}
  Thus by Theorem 6.1 we can conclude that $f$ is Riemann-integrable on $[a, b]$.

Prove that if $f$ is bounded on $[a, b]$ and $f$ has only finitely many discontinuities in $[a, b]$ then $f$ is Riemann-integrable on $[a, b]$.

We will prove this using the principle of mathematical induction. Observe that the case when there is one discontinuity has already been shown. Suppose that $f$ is bounded on $[a, b]$ and $f$ has $n$ discontinuities in $[a, b]$ and suppose $f$ is Riemann-integrable on $[a, b]$. Consider the case when $f$ is bounded on $[a, b]$ and $f$ has $n + 1$ discontinuities in $[a, b]$. Choose the right most discontinuity and call it $c$. Choose $\delta > 0$ such that $[a, c - \delta]$ has $n$ discontinuities. By the inductive hypothesis we can conclude that $f$ is Riemann-integrable on $[a, c - \delta]$. Let $\varepsilon > 0$. Since $f$ is Riemann-integrable on $[a, c - \delta]$, by Theorem 6.1, there exists a partition $P_1$ of $[a, c - \delta]$ with $U(P_1, f) - L(P_1, f) < \varepsilon/2$. Now observe that $f$ is bounded on $[c - \delta, b]$ and by construction has only one discontinuity on $[c - \delta, b]$. By Exercise 6.5 we can conclude that $f$ is Riemann-integrable on $[c - \delta, b]$. Since $f$ is Riemann-integrable on $[c - \delta, b]$, by Theorem 6.1, there exists a partition $P_2$ of $[c - \delta, b]$ such that $U(P_2, f) - L(P_2, f) < \varepsilon/2$. Now consider the common refinement $P = P_1 \cup P_2$ and observe that $U(P, f) - L(P, f) \leq U(P_1, f) + U(P_2, f) - L(P_1, f) - L(P_2, f) < \frac\varepsilon2 + \frac\varepsilon2 = \varepsilon$. Hence $f$ is Riemann integrable on $[a, b]$ containing $n + 1$ discontinuities. Thus by the principle of mathematical induction we have shown that if $f$ has finitely many discontinuities $n$ in $[a, b]$ then $f$ is Riemann-integrable on $[a, b]$.

A: Suppose f is a bounded real valued function on [a, b] such that f
2 ∈ R[a, b]. Does it follow that
f ∈ R[a, b]? Does the answer change if we assume f
3 ∈ R[a, b]? Either give a proof or provide a counter
example in each of the two cases.
