# 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.

-
just in case yoyo's answer is not helpful, the way to think about this is as follows: worst case, $f$ has jump discontinuities which jump downwards. Now convince yourself that we can construct a piecewise linear continuous function beneath $f$. There are still some technical things: for example, how do we know that $f$ is piecewise continuous on intervals? How bad could it be? – Glen Wheeler Apr 5 '11 at 5:56

define $g$ to be piecewise linear with $g(n)=f(n+1)$