I have been attempting to grasp the reasoning behind the formulation of the Mean Value Theorem:
If $f(x)$ is continuous in the closed interval $[x_1;x_2]$ and differentiable at every point of the open interval $(x_1;x_2)$, then there is at least one point $\xi \in (x_1;x_2)$ such that
$$ \frac{f(x_2)-f(x_1)}{x_2-x_1} = f’(\xi)$$
What I cannot understand is why we do say that $f(x)$ is not necessarily differentiable at the end-points $x_1$ and $x_2$ of the interval. I also cannot fully understand the overall value of the premise that the function is continuous at those points; for I understand that if a function possesses an infinite discontinuity or a discontinuity of that sort when the value of the function does not coincide with its limiting value at that point, but I simply cannot imagine a singular example for the MVT not holding as the function possesses no definite limit at the end-points.
Thank you!
Edit: I have noticed that my question is a little convoluted, so I have re-phrased it a slight bit:
Consider a function which is continuous everywhere in the interval $[x_1;x_2]$ except for at least one of the end-points (say, $x_1$), as the function, though being defined at $x_1$, possesses no definite limit as it approaches $x_1$ (for instance, the function $\sin\frac{1}{x}$ as $x \to 0$). Does there exist a function of the mentioned sort, for which MVT does not hold?