Does the point given by the Mean Value Theorem vary continuously? Let $f: \mathbb{R} \to \mathbb{R}$ be continuously differentiable. Suppose $f’(x) = 0$ only possibly at “individual points” $x$, by which I mean that for any open interval $(c,d)$, there is $x \in (c,d)$ such that $f’(x) \neq 0$.
Consider an open interval $(a,b)$. By the Mean Value Theorem, we can get a function $g$ as follows: for any $t \geq 0$, let $g(t) = c$ where $c \in (a, b+t)$ and $\displaystyle f’(c) = \frac{f(b+t) - f(a)}{(b+t) - a}$.
It's possible to have many such functions $g$, since given $(a, b+t)$ there could be many choices for $c$. In particular, some choices of $g$ may not be continuous. My question is: Does there always exist such a function $g$ that is continuous?
I have looked at this answer but the counterexample presented has $f’ = 0$ over the interval $[1,2]$.
 A: Requiring that $f'$ has only isolated zeros doesn't guarantee the existence of a continuous $g$. Let
$$h(x) = \begin{cases}\quad 1 &\text{if } x < 0, \\ \lvert x-1\rvert &\text{if } 0 \leqslant x \leqslant 2, \\ 3 - x &\text{if } x > 2, \end{cases}$$
and $f(x) = \int_0^x h(t)\,dt$.
Then $f$ is continuously differentiable, and $f' = h$ has only two zeros, at $1$ and at $3$. We have $f(0) = f(3 + \sqrt{3}) = 0$, and $f$ is strictly increasing on $(-\infty,3]$, strictly decreasing on $[3,+\infty)$.
If we take $a = 0$, $b = \frac{1}{2}$, then we must have $f'(g(t)) > 0$ for $0 \leqslant t < \frac{5}{2} + \sqrt{3}$. Thus if $g$ is continuous on $\bigl[0, \frac{5}{2} + \sqrt{3}\bigr)$ we must have $g(t) < 1$ on that interval. But for $t > \frac{5}{2} + \sqrt{3}$ we have $f(b+t) < f(a)$, and therefore necessarily $g(t) > 3$.
Hence in this example $g$ must necessarily be discontinuous at some point of $\bigl[0, \frac{5}{2} + \sqrt{3}\bigr]$.
We can of course replace the piecewise linear $h$ with a smooth function of similar characteristic to obtain the analogous result for infinitely differentiable $f$.
We can even take $f$ as a polynomial, for example $f(x) = 3x - \frac{7}{2}x^2 + \frac{5}{3}x^3 - \frac{1}{4}x^4$. But finding the positive zero of that is (probably) a little harder than for the example above.
