# Choosing a continuous function satisfying the mean value theorem

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

• Actually, the function must be continuous on the closed interval. Commented Aug 13, 2015 at 17:58
• It is easy to derive the sufficient conditions for continuity of $c_{t}$. The derivative $f'$ should be continuous and strictly monotone in $(a, b)$. Then it possesses a continuous inverse say $h$. We thus have $$c_{t} = h\left(\frac{f(t) - f(a)}{t - a}\right)$$ Commented Aug 14, 2015 at 9:49

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.

• The same is true for $g(x)=x$ on $[0,1]$ and $2-x$ on $[1,\infty)$, i.e. without a constant part for $f'$. It seems that the jump comes from the non-continuous second derivative.
– A.Γ.
Commented Aug 13, 2015 at 18:45
• Right, we don't need a constant part, it was just the first thing I thought of. It's not the discontinuous second derivative, we can smooth things and get the same phenomenon. If we have a global maximum of the derivative at $x_m$, $f'(t) < f'(x_m)$ for some $t \in (a,x_m)$, and $\frac{f(b)-f(a)}{b-a}$ is smaller than any value of $f'$ on $(a,x_m)$, then $c_t$ must necessarily jump. Commented Aug 13, 2015 at 18:57
• No, I am wrong. It is the same discontinuity for $f(x)=x-x^3/3$ on $[-1,2]$. The trouble comes from the inflexion point.
– A.Γ.
Commented Aug 13, 2015 at 18:57