Here's a problem I encountered: Suppose $f$ is Riemann integrable (and so must be bounded) on the interval $[a,b]$. Show that given $\epsilon > 0$, there exist continuous functions $g,h$ such that $g(x) \leq f(x) \leq h(x)$ for all $x$, and $\int_a^b |g(x) - h(x)|\ dx < \epsilon$
Now my thought was to attempt was to prove something slightly stronger. Of course the following holds: $$\int_a^b |g(x) - h(x)| dx \leq \int_a^b |f(x) - g(x) | + |g(x) - h(x)|\ dx$$by triangle inequality. Then since $\epsilon$ is arbitrary, I've reduced the problem to just dealing with approximation from above or below.
Now I wanted to use a particular trick I'd seen before, since I know that Riemann integrable functions can be approximated by Lipschitz functions, which are of course continuous, the problem is that this approximation is not necessarily strictly from above or below. The proof is basically to take a sufficiently fine partition so that the Riemann sums $U(P,f) - L(P,f) < \epsilon$, and then interpolate linearly between the points of the partition. Taking the maximum of the slopes and using the triangle inequality allows you to conclude this piecewise linear guy is actually Lipschitz.
Of course this strategy won't work here though, because there's nothing that says the function can't cross over these lines frequently. In fact, that kind of wild behavior can even happen for $C^1$ functions. So I've run into trouble.
I still think that the original idea is right - if I can approximate from above, whatever scheme I use should work from below too. I'm just having a hard time figuring out how.