TITLE: In mean value theorem, does the mean value vary continuously?
QUESTION [7 upvotes]: Let $f\colon\mathbb R\to\mathbb R$ be continuously differentiable and let's say, for simplicity, that $f(0)=0$. Then by mean value theorem it's
$$f(x)=f'(\xi)\cdot x \,\text{ for some } \xi \in (0, x)$$
What I wondered is: What can we tell about the $\xi$ as we change $x$? My intuition says we should at least be able to find some $\xi\equiv \xi(x)$ that varies continuously with respect to $x$.
Or isn't this necessarily the case? 
Thanks for any ideas.

REPLY [8 votes]: No. Here is a counterexample: Choose $f$ such that
$$f'(x)=\begin{cases} 2x-2 & x \le 1 \\ 0 & 1 \le x \le 2 \\ 2x-4 & x\ge 2\end{cases}$$
so
$$f(x)=\begin{cases} x^2-2x & x\le 1 \\ -1 & 1\le x \le 2 \\ x^2-4x+3 & x\ge 2\end{cases}$$
Then $f(3)=0$, and for $0<x<3$, $f(x)<0$, and $\xi$ has to be chosen to be $\le 1$, and for $x>3$, $f(x)>0$, so $\xi\ge 2$ for these $x$.