Spivak's Calculus: Chapter 12, Problem 26 
Suppose that $f(x) > 0$ for all $x$, and that $f$ is decreasing. Prove that there is a continuous decreasing function $g$ such that $0 < g(x) \le f(x)$ for all $x$.

To be quite honest, I have no idea how to approach this problem. (I also have no clue about the second part, but I imagine a hint at this solution will help me along for part b.)
I thought about setting $g(x) = f(x + k)$ for some $k > 0$, but I don't know how to get continuity. I should also note that this is in the "Inverse Functions" chapter, so that must play some sort of role here, but I'm not sure how really.
Any hint at how to think about the problem, specifically about the "continuous" part of it would be much appreciated. Thanks.

Define $g$ to be piecewise linear with $g(n)=f(n+1)$.  To elaborate, $g$ will be decreasing and continuous with
$$
g(x)\leq g(\lfloor x\rfloor)=f(\lfloor x\rfloor+1)\leq f(x).
$$
Or better yet, draw a picture.
