In mean value theorem over $[x_0,x]$, will $x^* \to+\infty$ always as $x \to +\infty$? The mean value theorem states that if $f:\Bbb R \to \Bbb R$ is continuous over $[x_0,x]$, and differentiable over $(x_0,x)$, then there exists $x^*\in(x_0,x)$ s.t. $f'({x^*}) = \frac{{f(x) - f({x_0})}}{{x - {x_0}}}$.
Now suppose $f$ is differentiable over $[x_0,+\infty)$, do we always have (or we can let, in cases like $f(x)$ is constant) $x^* \to+\infty$ as $x \to +\infty$? If not, on what condition this can happen?
 A: This is false. Consider $f\left( x \right) = \left\{ {\begin{array}{*{20}{c}}
  0&{x \geqslant 0} \\ 
  {{e^{\frac{1}{x}}}}&{x < 0} 
\end{array}} \right.$
It is easy to verify $f(x)$ is differentiable over $\Bbb R$ and ${f'}\left( x \right) = \left\{ {\begin{array}{*{20}{c}}
0&{x \ge 0}\\
{ - {x^{ - 2}}{e^{{x^{ - 1}}}}}&{x < 0}
\end{array}} \right.$
We can choose any $x_0<0$, and notice $\frac{{f\left( x \right) - f({x_0})}}{{x - {x_0}}} < 0$ for any $x>x_0$, implying $x^*<0$ for any $x_0<x<+∞$, and we actually have $x^*→0$ as $x→+∞$.
A: The counter example by Tony is nice, but I wanted to find a counter example which would not be piecewise, unfortunately I had not much success.
My idea was that since $x^*$ depends of $x$
Then it is equivalent to have a function $\phi$ such that $\displaystyle{\frac{f(x)}{x}=f'(\phi(x))}$
The request that $x^*$ does not go to infinity is that $\phi$ is bounded on some interval $[x_0,+\infty[$.
Also in order to pull out an ODE verified by $f$, having $\phi$ a square root of identity $\phi(\phi(x))=x$ would help a lot, because that makes it easy to get rid of $f''(\phi(x))$ since $\phi$ is its own inverse.
$f(x)=xf'(\phi(x))$
$f'(x)=f'(\phi(x))+x\phi'(x)f''(\phi(x))$
$\displaystyle{\frac{f(x)}{x}=f'(\phi(x))=f'(x)+\phi(x)\phi'(\phi(x))f''(x)}$
So $f$ verifies the ODE : $\bigg(x\;\phi(x)\;\phi'(\phi(x))\bigg) y''+x\;y'-y=0$


*

*first try $\phi(x)=\frac 1x$


This gives $-x^2y''+xy'-y=0\quad$ solutions $y=ax+bx\ln(x)$
Unfortunately, reporting in the initial equation for $\frac{f(x)}{x}$ gives $b=0$ and $f(x)=ax$ is not a counter-example, we can take any $x^*$ since $f'$ is constant.


*

*second try $\phi(x)=\frac{1-x}{1+x}$


This gives $x(\frac{x^2-1}{2})y''+xy'-y=0\quad$ solutions $y=ax+b\big(1+(2x\ln(x-1)-2x\ln(x)\big)$
And again, this leads to $b=0$.
Thus, I feel like I'm being cursed, it is like the term before $y''$ never existed... So much for trying to find a neat counter-example.
