# Continuity $\Rightarrow$ Intermediate Value Property. Why is the opposite not true?

Continuity $\Rightarrow$ Intermediate Value Property. Why is the opposite not true?

It seems to me like they are equal definitions in a way.

Can you give me a counter-example?

Thanks

-

I.

Some of the answers reveal a confusion, so let me start with the definition. If $I$ is an interval, and $f:I\to\mathbb R$, we say that $f$ has the intermediate value property iff whenever $a<b$ are points of $I$, if $c$ is between $f(a)$ and $f(b)$, then there is a $d$ between $a$ and $b$ with $f(d)=c$.

If $I=[\alpha,\beta]$, this is significantly stronger than asking that $f$ take all values between $f(\alpha)$ and $f(\beta)$:

• For example, this implies that if $J\subseteq I$ is an interval, then $f(J)$ is also an interval (perhaps unbounded).
• It also implies that $f$ cannot have jump discontinuities: For instance, if $\lim_{x\to t^-}f(x)$ exists and is strictly smaller than $f(t)$, then for $x$ sufficiently close to $t$ and smaller than $t$, and for $u$ sufficiently close to $f(t)$ and smaller than $f(t)$, $f$ does not take the value $u$ in $(x,t)$, in spite of the fact that $f(x)<u<f(t)$. This indicates that if $f$ is discontinuous, its discontinuities must be somewhat wild.
• In particular, if $f$ is discontinuous at a point $a$, then there are $y$ such that the equation $f(x)=y$ has infinitely many solutions near $a$.

II.

There is a nice survey containing detailed proofs of several examples of functions that both are discontinuous and have the intermediate value property: I. Halperin, Discontinuous functions with the Darboux property, Can. Math. Bull., 2 (2), (May 1959), 111-118. It contains the amusing quote

Until the work of Darboux in 1875 some mathematicians believed that [the intermediate value] property actually implied continuity of $f(x)$.

This claim is repeated in other places. For example, here one reads

In the 19th century some mathematicians believed that [the intermediate value] property is equivalent to continuity.

This is very similar to what we find in A. Bruckner, Differentiation of real functions, AMS, 1994. In page 5 we read

This property was believed, by some 19th century mathematicians, to be equivalent to the property of continuity.

Though I have been unable to find a source expressing this belief, that this was indeed the case is supported by the following two quotes from Gaston Darboux's Mémoire sur les fonctions discontinues, Ann. Sci. Scuola Norm. Sup., 4, (1875), 161–248. First, on pp. 58-59 we read:

Au risque d'être trop long, j'ai tenu avant tout, sans y réussir peutêtre, à être rigoureux. Bien des points, qu'on regarderait à bon droit comme évidents ou que l'on accorderait dans les applications de la science aux fonctions usuelles, doivent être soumis à une critique rigoureuse dans l'exposé des propositions relatives aux fonctions les plus générales. Par exemple, on verra qu'il existe des fonctions continues qui ne sont ni croissantes ni décroissantes dans aucun intervalle, qu'il y a des fonctions discontinues qui ne peuvent varier d'une valeur à une autre sans passer par toutes les valeurs intermédiaires.

The proof that derivatives have the intermediate value property comes later, starting on page 109, where we read:

En partant de la remarque précédente, nous allons montrer qu'il existe des fonctions discontinues qui jouissent d'une propriété que l'on regarde quelquefois comme le caractère distinctif des fonctions continues, celle de ne pouvoir varier d'une valeur à une autre sans passer par toutes les valeurs intermediaires.

III.

Additional natural assumptions on a function with the intermediate value property imply continuity. For example, injectivity or monotonicity.

Derivatives have the intermediate value property (see here), but there are discontinuous derivatives: Let $$f(x)=\left\{\begin{array}{cl}x^2\sin(1/x)&\mbox{ if }x\ne0,\\0&\mbox{ if }x=0.\end{array}\right.$$ (The example goes back to Darboux himself.) This function is differentiable, its derivative at $0$ is $0$, and $f'(x)=2x\sin(1/x)-\cos(1/x)$ if $x\ne0$, so $f'$ is discontinuous at $0$.

This example allows us to find functions with the intermediate value property that are not derivatives: Consider first $$g(x)=\left\{\begin{array}{cl}\cos(1/x)&\mbox{ if }x\ne0,\\ 0&\mbox{ if }x=0.\end{array}\right.$$ This function (clearly) has the intermediate value property and indeed it is a derivative, because, with the $f$ from the previous paragraph, if $$h(x)=\left\{\begin{array}{cl}2x\sin(1/x)&\mbox{ if }x\ne 0,\\ 0&\mbox{ if }x=0,\end{array}\right.$$ then $h$ is continuous, and $g(x)=h(x)-f'(x)$ for all $x$. But continuous functions are derivatives, so $g$ is also a derivative. Now take $$j(x)=\left\{\begin{array}{cl}\cos(1/x)&\mbox{ if }x\ne0,\\ 1&\mbox{ if }x=0.\end{array}\right.$$ This function still has the intermediate value property, but $j$ is not a derivative. Otherwise, $j-g$ would also be a derivative, but $j-g$ does not have the intermediate value property (it has a jump discontinuity at $0$). For an extension of this theme, see here.

In fact, a function with the intermediate value property can be extremely chaotic. Katznelson and Stromberg (Everywhere differentiable, nowhere monotone, functions, The American Mathematical Monthly, 81, (1974), 349-353) give an example of a differentiable function $f:\mathbb R\to\mathbb R$ whose derivative satisfies that each of the three sets $\{x\mid f'(x)>0\}$, $\{x\mid f'(x)=0\}$, and $\{x\mid f'(x)<0\}$ is dense (they can even ensure that $\{x\mid f'(x)=0\}=\mathbb Q$); this implies that $f'$ is highly discontinuous. Even though their function satisfies $|f'(x)|\le 1$ for all $x$, $f'$ is not (Riemann) integrable over any interval.

On the other hand, derivatives must be continuous somewhere (in fact, on a dense set), see this answer.

Conway's base 13 function is even more dramatic: It has the property that $f(I)=\mathbb R$ for all intervals $I$. This implies that this function is discontinuous everywhere. Other examples are discussed in this answer.

Halperin's paper mentioned above includes examples with even stronger discontinuity properties. For instance, there is a function $f:\mathbb R\to\mathbb R$ that not only maps each interval onto $\mathbb R$ but, in fact, takes each value $|\mathbb R|$-many times on each uncountable closed set. To build this example, one needs a bit of set theory: Use transfinite recursion, starting with enumerations $(r_\alpha\mid\alpha<\mathfrak c)$ of $\mathbb R$ and $(P_\alpha\mid\alpha<\mathfrak c)$ of its perfect subsets, ensuring that each perfect set is listed $\mathfrak c$ many times. Now recursively select at stage $\alpha<\mathfrak c$, the first real according to the enumeration that belongs to $P_\alpha$ and has not been selected yet. After doing this, continuum many reals have been chosen from each perfect set $P$. List them in a double array, as $(s_{P,\alpha,\beta}\mid\alpha,\beta<\mathfrak c)$, and set $f(s_{P,\alpha,\beta})=r_\alpha$ (letting $f(x)$ be arbitrary for those $x$ not of the form $s_{P,\alpha,\beta}$).

To search for references: The intermediate value property is sometimes called the Darboux property or, even, one says that a function with this property is Darboux continuous.

An excellent book discussing these matters is A.C.M. van Rooij, and W.H. Schikhof, A second course on real functions, Cambridge University Press, 1982.

-
Very nice answer. –  Beni Bogosel Dec 30 '13 at 18:02
Thank you.${}{}$ –  Andres Caicedo Dec 30 '13 at 18:43
you mean $u$ smaller than $f(t)$ in point 2? –  Neeraj Bhauryal Jan 1 at 14:40
@NeerajBhauryal Indeed. Thanks. –  Andres Caicedo Jan 1 at 16:48
The Wikipedia entry made me laugh: "Historically, this intermediate value property has been suggested as a definition for continuity of real-valued functions[citation needed]" (en.wikipedia.org/wiki/Intermediate_value_theorem#History). –  Andres Caicedo Jan 5 at 7:08

Let $f(x) = x^2\sin(1/x)$ on $(0,1)$ and $f(0) = 0$. Then $f$ is differentiable throughout $[0,1]$. All derivatives satisfy the intermediate value property (Darboux's Theorem); but $f'(x)$ is discontinuous at $0$.

-
I like your answer better! –  user44197 Dec 30 '13 at 8:22
@user44197 you are very gracious -- your answer is a good one and very straightforward. –  Betty Mock Dec 31 '13 at 21:24

$$f(x) = \sin(1/x), ~~ x \gt 0$$ and $$f(0) =0$$

This is not continuous at $x=0$ but clearly satisfies the intermediate value property.

-
Maybe you should have added some details on the part "clearly satisfies the intermediate property" to convince the OP that this example is simpler than the derivative one. –  Beni Bogosel Dec 30 '13 at 8:48
(@BeniBogosel This function is a derivative, so it is in essence the same example -- without being explicit about it having an antiderivative.) –  Andres Caicedo Dec 30 '13 at 17:44
@AndresCaicedo: Yes, of course, but it is possible to prove that this function has the Darboux property without passing through the theorem about the derivative; using only the definition. –  Beni Bogosel Dec 30 '13 at 18:02
@BeniBogosel Oh, definitely. –  Andres Caicedo Dec 30 '13 at 18:04

The next theorem might be of interest to you, it really shows that the class of functions with the IVP is very big.

Theorem (Sierpinski) Let $f : \mathbb R \to \mathbb R$ be any function. Then there exists $f_1,f_2 : \mathbb R \to \mathbb R$ such that $f=f_1+f_2$ and $f_1,f_2$ satisfy the Intermediate Value Property.

Moreover, in the above Theorem, $f_1,f_2$ can be chosen to be discontinuous at all points.

-
Two further results in the same direction: 1. Any function $f:\mathbb R\to\mathbb R$ is the pointwise limit of a sequence of functions that satisfy the intermediate value property. 2. For any function $f:\mathbb R\to\mathbb R$ there is a function $g$ that has the intermediate value property and such that $\{x\mid f(x)\ne g(x)\}$ is both meager and of measure zero. –  Andres Caicedo Jan 1 at 17:14

To begin I want to state the IVP considering I messed up on the definition:

Let $I$ be an open interval and $f : I \to \mathbb{R}$ then $f$ has the IVP iff Given $a,b \in I : a \le b$ $$\forall \; y \text{ between } f(a),f(b) \; \exists \; x \in [a,b] : f(x) = y$$

The following function has IVP on $\mathbb{R}$ but it is not continuous on all of $\mathbb{R}$ EDIT: this a discontinuous surjective function ;) $$f: \mathbb{R} \to \mathbb{R} ,\; f(x) = \left\{ \begin{array}{c} \frac{1}{x} : x \neq 0 \\ 0 : x = 0 \end{array}\right.$$ Like everyone else has said this guy named Darboux (pretty cool guy) came up with the following theorem:

Given an open interval $I$ and $f$ a differentiable function (NOTE: $f$ doesn't necessarily have to be $C^1$!) s.t. $f : I \to \mathbb{R}$, $\frac{\mathrm{d} f}{\mathrm{d} x} = f'$ has IVP on $I$.

So a pretty common example is putting $$f : (-1,1) \to \mathbb{R}, \; f(x) = \left\{ \begin{array}{rl} x^2 \sin \left( \frac{1}{x} \right) : & x \neq 0 \\ 0 : & x = 0 \end{array} \right.$$ and then seeing that $f'(x) = 2x \sin \left( \frac{1}{x} \right) - \cos \left( \frac{1}{x} \right) : x \neq 0$ (chain rule, in case you brain fart often like I do) and thus $f'$ is clearly discontinuous at $x=0$ but by Darboux's Theorem it has IVP!

-
As with Michael's example, this function does not have the intermediate value property (or the definition you are using is not the standard one). –  Andres Caicedo Dec 30 '13 at 8:32
@AndresCaicedo ah yes you're right, forgot that the $x$ you find has to lie in the interval $[a,b]$... I will change this sorry for that –  DanZimm Dec 30 '13 at 8:40
I'm thinking about my $f$ I'm not entirely convinced it's differentiable - forgive me I think I have brain farted again -_- : Now I am ;P –  DanZimm Dec 30 '13 at 9:01

A very strong counterexample would be a function whose range is all of R on every interval.

-
One can do even more: There are functions $f$ that take every value continuum many times on every perfect set. –  Andres Caicedo Dec 30 '13 at 21:45
That sounds like partitioning reals into continuum many Bernstein sets. –  hot_queen Dec 31 '13 at 0:30
Yes. Though one can build examples by transfinite induction, without making the connection explicit. A nice survey on some of these results is Discontinuous functions with the Darboux property, by I. Halperin, Can. Math. Bull. vol. 2, no. 2, May 1959, 111-118. It contains the amusing quote "Until the work of Darboux in 1875 some mathematicians believed that [the intermediate value] property actually implied continuity of $f(x)$." Would you happen to know of a source showing that this was indeed the case? –  Andres Caicedo Dec 31 '13 at 0:51
I don't know. Halperin doesn't seem to give a reference. Although I don't think Bolzano would have had this confusion. I also noticed Lebesgue's very elegant counterexample there. –  hot_queen Dec 31 '13 at 2:41
Yes, it is quite puzzling. I'm calling it an urban legend until someone convinces me otherwise. –  Andres Caicedo Dec 31 '13 at 2:50

Note: In my first example below I am using a different intermediate value property than what is apparently standard. The property I am referring to is as follows: A function $f:[a,b] \to \mathbb{R}$ has the intermediate value property if, for every $K$ between $f(a)$ and $f(b)$, there is $c \in (a, b)$ such that $f(c) = K$. The 'standard' intermediate value property would require this property on every subinterval.

The function $f:[0,1]\to [0,1]$ given by $$f(x) = \begin{cases}2x & 0 \leq x < \frac{1}{2}\\ 2x-1 & \frac{1}{2} \leq x \leq 1\end{cases}$$ has the intermediate value property but it is not continuous.

You may think that requiring $f$ to have the intermediate value property on every subinterval of its domain would be enough to imply continuity, but this is also false. See Counterexamples in Analysis by Gelbaum and Olmstead, pages $31-33$. I have written up the relevant example here if you are interested.

-
Your example does not have the intermediate value property (or the definition you are using is not the standard one, which is why you mention "the intermediate value property on every subinterval"). –  Andres Caicedo Dec 30 '13 at 8:31
A function with intermediate value property cannot have a jump discontinuity. –  Beni Bogosel Dec 30 '13 at 8:46
@AndresCaicedo: I had only ever seen the following: $f:[a,b] \to \mathbb{R}$ has the intermediate value property if for every $K$ between $f(a)$ and $f(b)$, there is $c \in (a, b)$ such that $f(c) = K$. Then the intermediate value theorem can be considered as stating that every continuous function has the IVP. Of course, it could also be stating that every continuous function has the IVP that you refer to. –  Michael Albanese Dec 30 '13 at 9:40

Here is a simple example which satisfies the IVP on every closed bounded interval, yet is continuous at only a single point. Consider the function f defined on the reals such that f(x)=0 if x is rational and f(x)=x if x is irrational. The function f has the IVP property on every interval, yet is only continuous at x=0.

-
This function is not a Darboux function. (It does not attain non-zero rational values.) –  Martin Sleziak Dec 30 '13 at 15:19
You're right. My mistake. Sorry –  Matt Brenneman Dec 30 '13 at 21:06

Finding a counter example is very simple. Take any function $f(x)$ which is continuous in the interval $[a,b]$. Now take any two real numbers $c$ and $d$ with $a \lt c \lt d \lt b$ and $f(c) \neq f(d)$ and define a new function as: $$g(x) = \begin{cases} f(x) & a \leq x \lt c\\f(d) & x=c\\f(x) & c \lt x \lt d\\f(c) & x=d\\f(x) & d \lt x \leq b\end{cases}$$ It is easy to check that IVP holds in the case of $g(x)$ but it is discontinuous at $x=c$ and $x=d$.

-
This function does not have the intermediate value property. –  Andres Caicedo Dec 30 '13 at 17:00
@AndresCaicedo, I do not get why it does not have the intermediate value property...all I've done is rubbed two points in the graph and exchanged their function values and the rest remains the same.?? –  Indrayudh Roy Dec 31 '13 at 16:44
The intermediate value property requires that whenever $I$ is an interval subset of $[a,b]$, $f(I)$ is also an interval. This fails with your function (it is not enough that $f([a,b])$ is an interval). In fact, functions with the intermediate value property cannot have jump discontinuities. –  Andres Caicedo Dec 31 '13 at 16:57