About the continuity of the $\xi_x$ in $f(x)-f(0)=f'(\xi_x)x$ It is well-known that for a continuously differentiable function $f$ defined in $\mathbb{R}$, and for each $x$, there exists a number $\xi_x$ between $0$ and $x$ such that $f(x)-f(0)=f'(\xi_x)x$. The question is:

If we can find a suitable $\xi_x$ for each $x\in\mathbb{R}$ such that the function $\xi$ given by $\xi(x):=\xi_x$ is continuous?

In my imagination, it is true. However, I can not either prove it or find a example to negate it.
Moreover, I also wonder that when $f$ is defined in an closed interval $[a,b]$ in $\mathbb{R}$, can we choose $\xi_x$ to make the function $\xi(x)$ continuous? And how about a smooth function $f(x)$ defined in $\mathbb{R}$?
 A: The question boils down to this statement : $\xi_x \in f'^{-1} \left(\frac{f(x)-f(0)}{x}\right)$.
One point makes this question difficult : The point is, that $f'$ has the intermediate value property (Darboux's theorem). Now, suppose we insisted for simplicity that $f'$ be invertible, but it's inverse be non-continuous, so that we can generate a counterexample. Not a bad way to start...
...except that any invertible function with the intermediate value property is continuous (Exercise). So the inverse would also then be continuous, and we cannot get what we want.
Of course, a negative result is also a "positive" result in the other way : if $f'$ is invertible, then necessarily such a choice of $\xi_x$ is possible (in fact unique) and is continuous.
A strictly convex function (one with second derivative existing and positive everywhere) would satisfy this condition as well. That includes a lot of curves, and very importantly, a lot of functions from quadratic optimization. Usually, cost functions have this structure, and this fact is in fact exploited for them.

So we need to be cleverer : Let us try a situation where the following happens : maybe $f'$ is not invertible, but the choice of $\xi_x$ is uniquely forced by the fact that you want it to lie between $0$ and $x$. Then unique forcing need not be a continuous transition.
Take fedja's $(x-1)^3$. It's derivative is $3(x-1)^2$, and the quotient is $\frac{(x-1)^3 +1}{x} = x^2-3x+3$. So, we must have $3(\xi_x-1)^2 = x^2-3x+3$, and hence $\xi_x = 1\pm \sqrt{\frac{x^2-3x+3}{3}}$.
One is tempted to say that if I fix $+$ or $-$, then within a certain domain of definition, $\xi_x$ is continuous,and so this doesn't work. Our hand , though, is forced by the choice of $\xi_x \in (0,x)$.
It turns out that the $-$ branch ensures that $\xi_x \in (0,x)$ for $0<x<3$, and for $x> \frac 32$ the $+$ branch gives $\xi_x \in (0,x)$. Thus, focusing merely on $(0,\infty)$, the choice of the function $\xi_x$ must change from $-$ to $+$ somewhere between $\frac 32$ or $3$ (else it remains constant or there is a violation, which is not possible). Call that point $\alpha$.
If $\xi_x$ has to be continuous at $\alpha$, then from the negative side, the limit as $x \to \alpha$ is $1- \sqrt{\frac{\alpha^2-3\alpha+3}{3}}$ and from the positive side it is $1+\sqrt{\frac{\alpha^2-3\alpha+3}{3}}$. So for these limits to equal, we must have $\alpha^2-3\alpha+3 = 0$. But this is not true for any real $\alpha$, let alone those in between $\frac 32$ and $3$.
So the counterexample is clear, and the statement is false.

Note that this function $(x-1)^3$ is a polynomial , hence smooth. Furthermore the argument made above works on $[-5,5]$, for example, showing that having a bounded closed interval for a domain will also not be sufficient to make things work.
However, you may want a weaker condition on $\xi_x$ : maybe you don't want continuity, but just say Borel measurability. It may be a more difficult task, but I would like to think that this statement is true, possibly under very weak conditions on the derivative.
