Is every Riemann integrable function a uniform limit of step functions? Is there a way to prove that every Riemann integrable function is a uniform limit of step functions? If not, does there exist a function that contradicts this?
 A: The above suggested counterexample doesn't actually work, since that choice of $f(x)$ is itself a step function, namely the indicator function of $[1,1]$. Thus, the trivial sequence of functions $f_n(x)=f(x)$ is a sequence of step functions uniformely convergent to $f(x)$ and they are all indeed Riemann integrable.
Instead, a valid counterexample could be $\space f(x):[0,1] \rightarrow \mathbb{R}$ given by $f(x)=1$ if $x=\frac{1}{2^n}$ and $f(x)=0$ otherwise. This function is Riemann integrable and has integral equal to zero; nonetheless, there is no sequence of step functions which converges to it uniformly.
To prove that $f(x)$ is Riemann integrable just take the constant step function $\phi_{-}(x)=0$ as a minorant and e.g. the sequence of functions $\phi_{{n}_{+}}(x)=1 $ for $ x<\frac{1}{n}$ and $\phi_{{n}_{+}}(x)=f(x)$ otherwise as majorants, the integral of which tends to zero.
To prove that there is no sequence of step functions uniformly converging to it, note that any step function $\phi_n$ must be constant in some interval $(0, \delta_n)$ with $\delta_n>0$, so $\space \phi_n(x)=k_n$ for $x \in (0, \delta_n)$. $\space$ For any $\delta_n$ there is $N$ such that $a_n=\frac{1}{2^N} $ and  $b_n=\frac{3}{2^{N+2}}\in (0, \delta_n)$ and $f(a_n)=1$,$ \space f(b_n)=0$.
By observing that either $|k_n-f(a_n)|=|k_n-1| \geqslant \frac{1}{2}$ or $|k_n-f(b_n)|=|k_n| \geqslant \frac{1}{2}$ obtains, we deduce that $sup_{x\in [0,1]}|\phi_n(x)-f(x)| \geqslant sup_{x\in (0, \delta_n)}|\phi_n(x)-f(x)| \geqslant \frac{1}{2} \neq 0$. 
Therefore, no sequence of step functions can converge uniformly to $f$ on $[0,1]$ given that for any step function $\space sup_{x\in [0,1]}|\phi_n(x)-f(x)| \geqslant \frac{1}{2}$.
A: Take as a counterexample,
$$f(x) = \begin{cases} 0, \,\, 0 \leqslant x < 1 \\ 1, \,\, x = 1 \\ 0, \,\, 1 < x \leqslant 2 \end{cases}$$
There exist sequences of step functions converging pointwise to $f$ -- for example
$$s_n(x) = \begin{cases} 0, \,\, 0 \leqslant x < 1-1/n \\ 1, \,\, 1- 1/n \leqslant x \leqslant 1 + 1/n \\ 0, \,\, 1+ 1/n < x \leqslant 2 \end{cases}$$
However, no such sequence $(s_n)$ can converge uniformly.  For any $n \in \mathbf{N}$, the step function $s_n$ assumes constant values on intervals.  If the interval $I_n$ where $s_n(x) = c_n$ includes $x= 1$, then $|f(1) - s_n(1)| = |1 - c_n|$ but there is some other point $x \in I_n$ where $|f(x) - s_n(x)| = |c_n|$.
Show that no matter how $c_n$ is chosen, given say $\epsilon =1/4$, we cannot have both $|1 - c_n| < \epsilon$ and $|c_n| < \epsilon$.
