# Does Intermediate Value Theorem $\rightarrow$ continuous?

i try to understand Intermediate Value Theorem and wonder if the theorem works for the opposite side. I mean, if we know that $\forall c\:\:\:f\left(a\right)\le \:c\le \:f\left(b\right)\:,\:\exists x_0\in \left[a,b\right]\:\:$ such that $f\left(x_0\right)=c$ then $f\:$ is continuous in $\left[a,b\right]$? tnx!

EDITED: Continuity $\Rightarrow$ Intermediate Value Property. Why is the opposite not true? there is absolute fantastic answer for this!

• No. For instance, take $f(x)=\sin(1/x)$, $x\ne 0$; $f(0)=0$. Jan 27, 2015 at 11:01
By Darboux' theorem, every derivative has the intermediate value property. However, not every derivative is a continuous function. Consider, for instance, the Weierstrass function $$f(x) = \sum_{n=1}^{+\infty}\frac{\sin(n^2 x)}{n}$$ over $(0,1)$. It is the derivative of a differentiable function, hence it has the intermediate value property, but it is not a continuous function. Another interesting fact is that every real function can be written as the sum of two functions with the IVP (see Andrew M. Bruckner, Differentiation of real functions), so the space of functions with the IVP is not even a vector space. See also this related question.
No, what about $$f(x)=x$$ if $$0\le x<1$$ and $$f(1)=1/2$$. Clearly this has the property you stated with $$a=0,b=1$$ but is not continuous in $$[0,1]$$.