Spivak’s Calculus: Chapter 12, Problem 26 – Follow Up

continuitymonotone-functionsreal-analysis

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

So this question has already been asked and "solved" on MSE 9 years ago here, but the accepted answer isn't very detailed, and I think it is in fact flawed (or I've just misunderstood it). I tried commenting to open up the question again, but it seems pretty dead now, hence why I'm making this follow up.

The answer says to "make $g$ piecewise linear with $g(n) = f(n+1)$". Can someone explain what this means exactly? I will write my thoughts below, but it's a lot, so feel free to skip.

My thoughts: Notice that if we try to simply let $g(x) = f(x+1)$, then it works perfectly except for the fact that $g$ may not be continuous, because $f$ need not be continuous (otherwise we could just let $g(x) = f(x)$ in that case!). So if we could just modify this $g$ to make it continuous somehow then we're done.

Fortunately, $f$ is decreasing on $\mathbb{R}$, which means the left and right limits do exist, however they might disagree. This means $f$ can only have jump discontinuities that jump downwards.

So what if we took all the points in $\mathbb{R}$ where $f$ has a jump discontinuity, and just joined lines between them? (I think this is what the answer meant by piecewise linear function?) This would guarantee that $g$ is continuous, however, this approach has some fixable flaws.

First flaw, for starters, it isn't necessarily true that this $g$ would be always smaller than $f$! For example, consider this picture, where $f$ is the red function, and $g$ is the black function:

Sure $g$ is continuous now, but we've lost the $g(x) \leq f(x)$ property! We can fix this easily by letting $g$ be the smaller of the piecewise linear function and $f$. Then the picture becomes like this:

To make this a bit more rigorous, first we need the set of all the points where $f$ is discontinuous:

$S = \big\{x: \lim_{y \rightarrow x^-} (f(y)) = \lim_{y \rightarrow x^+} (f(y)) \big\}$

Then let $l(x)$ be the piecewise linear function joining all points $\big(x, \lim_{y \rightarrow x^+} [f(y)] \big)$, where $x \in S$.

Then finally let $g(x) = \text{Min}\big(f(x), l(x)\big)$.

Now this would work fine, so long as $l(x)$ is well defined. But must it necessarily be so? I'm not sure, and this is where I'm stuck. For example, what if the set $S$ contains not isolated points, but an entire interval of points? For example, what if $f$ is a function that has a jump discontinuity at every point in $[0,1]$? Then to construct $l(x)$, we'd need to join all these jump discontinuity points in $[0,1]$, of which it isn't obvious at all we can do that.

Now you might say that an interval of jump discontinuities is impossible, and you'd be right. However the proof of that comes much much later in the book and is certainly beyond the knowledge of this chapter. But more importantly, even if $f$ doesn't have an interval of jump discontinuities, there are other ways $l(x)$ can be questionable.

Consider this monstrous example: $f(x) =
\begin{cases}
1-\frac{x}{2^{\lfloor 1 – \log_2(|x|)-1 \rfloor}} & 😡 \leq \frac{1}{2} \\
\frac{6}{6x+5} & 😡 > \frac{1}{2}
\end{cases} \Biggr\}$

Looks something like this (click here to view in Desmos):

As it turns out, this $f$ satisfies the questions premises, but it also has the cool property that it contains an infinite number of jump discontinuities in any neighbourhood around 0! As such, in order to construct the piecewise linear function for it, you'd have to join lines between an infinite number of points, and still have a function, which might be possible? But for sure it isn't obvious that it is so…

Those are my thoughts on the problem. So Q1) Is my approach so far in the right direction? Or could it be that I've missed some super simple trick that will make the problem trivial and everything I've said above redundant? Q2) If I am in the right direction, how can I justify taking a linear piecewise function for an infinite number of points in a given interval?

Best Answer

There is no trick in "make $g$ piecewise linear with $g(n)=f(n+1)$". It means that we define for each $n \in \mathbb Z$ $$g_n(x) : [n,n+1] \to \mathbb R, g_n(x) = f(n+1) + (f(n+2) - f(n+1))(x-n).$$ This is a linear function on the interval $[n,n+1]$ with slope $f(n+2) - f(n+1) \le 0$. In particular it is continuous and decreasing. For all $x \in [n,n+1]$ we have

  1. $f(x) \ge f(n+1)$ because $f$ is decreasing.

  2. $f(n+1) \ge g_n(x) \ge f(n+2)$ by linearity.

  3. $f(n+2) > 0$ by assumption.

This shows $f(x) \ge g_n(x) > 0$ for all $x \in [n,n+1]$.

Now define $$g : \mathbb R \to \mathbb R, g(x) = g_n(x) \text{ for } x \in [n,n+1]. $$ This is a well-defined continuous function because $g_n(n+1) = f(n+2) = g_{n+1}(n+1)$. Clearly $f \ge g > 0$.

See the green curve below:

enter image description here

Related Question