I want to prove the following theorem:
Theorem
Let $f:[a,b]\to \mathbb R$ be a bounded function on $[a,b]$,if $D_f$ is a finite set,then $f\in R([a,b])$.
Proof: Let $|f(x)|\leq M$ for every $x\in [a,b]$ $(M>0)$.
Suppose $D_f=\{a_1,...,a_k\}$
Let $\epsilon>0$,without loss take $\epsilon<4M(b-a)$
Consider $(a_i-\epsilon/4Mk,a_i+\epsilon/4Mk),i=1,2,...,k$
and remove those from $[a,b]$ to get a compact set $K$.
Now $f:K\to \mathbb R$ is continuous on $K$ and hence uniformly continuous.
So,given $\exists \delta>0$ such that $|x-y|<\delta$ and $x,y\in K \implies |f(x)-f(y)|<\epsilon/2$
Choose $\delta<\frac{\epsilon}{2((b-a)-\epsilon/4M)}$.
Now the length of the set $K$ is $(b-a)-\epsilon/4M>0$
Divide it into $n(>1/\delta)$ subintervals of equal length.
and also adjoin the subintervals $[a_i-\epsilon/4Mk,a_i+\epsilon/4Mk]$ to get a partition $P=(x_0,x_1,...,x_{n+k})$ with $(n+k)$ subintervals.
Now $U(P,f)-L(P,f)=\sum\limits_{i=1}^{n+k} (M_i-m_i)\Delta x_i<\delta\{(b-a)-\epsilon/4M\}+2Mk.(\epsilon/4Mk)<\epsilon/2+\epsilon/2=\epsilon$
Is the proof correctly done?