$f(x)$ is bounded on $[a,b]$ and $f(x) \in R[a,b]$. Then for any $\epsilon > 0$ find $g(x)$ and $h(x)$ which are continuous on $[a,b]$ such that:
(a) $g(x) \le f(x) \le h(x)$, $\forall x \in [a,b] $
(b) $\int_a^b [h(x) - g(x)] ds < \epsilon$.
I thought about looking for piecewise linear functions which are decided up to the superior and inferior of $g$ and $h$ on intervals of a certain partition of $[a,b]$ but since $f(x)$ is not necessary continuous I can hardly go through it.
Hint: Take the upper and lower Darboux sums and approximate those with piecewise linear functions.