TITLE: Choosing a continuous function satisfying the mean value theorem
QUESTION [3 upvotes]: The mean value theorem tell us that if $f:[a,b]\to \mathbb{R}$ is continuous and differentiable at $(a,b)$ then there is some $c\in(a,b)$ such that $f(b)-f(a)=f'(c)(b-a)$. We can apply the mean value theorem for each $t\in (a,b)$ to get a $c_t$ satisfying $f(t)-f(a)=f'(c_t)(t-a)$. But can $c_t$ be chosen so that is continuous? I'm guessing yes but that it may be neccesary to assume continuous derivative. Rewriting the question more precisely:

If $f:[a,b]\to \mathbb{R}$ is continuous and differentiable at $(a,b)$, does there exist $c:(a,b)\to \mathbb{R}$ continuous with $c_t\in (a,t)$ and $f(t)-f(a)=f'(c_t)(t-a)$ for each $t$?.

REPLY [5 votes]: There need not exist such a continuous $c$. Let
$$g(x) = \begin{cases}\quad x &, x \in [0,1] \\ \quad 1 &, x \in [1,2]\\ 3-x &, x \in [2,10] \end{cases}$$
and $f(x) = \int_0^x g(t)\,dt$. Then $f$ is consitnuously differentiable, but if we choose $c_t \in [0,t]$ with $f(t) - f(0) = f'(c_t)(t-0)$ continuously for as long as possible, then we have $c_t < 1$ for all such $t$, but for $t > 4$ we have $f(t) - f(0) < 0$ and hence must have $c_t > 3$. A subinterval on which $f'$ is constant can separate the parts of the domain where $f'$ attains the required values, and that must be jumped over in such cases.
{"set_name": "stack_exchange", "score": 3, "question_id": 1396159}