In mean value theorem, does the mean value vary continuously?

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.

-
This question seems to be somewhat related: Measurability of $\xi$ in the mean value theorem. – Martin Sleziak Jun 9 '12 at 12:53

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$.
What makes the counterexample work is that $f'(\xi)=0$ for some $\xi$. Now what if we exclude this and assume that $f'(\xi)\neq0$ for all $\xi$? – Oskar Limka Dec 8 '15 at 9:26