# Discontinuous functions with the intermediate value property

Show that any function $f$ which is not continuous on $[a,b]$, but satisfies the intermediate value property, assumes some value infinitely often.

Here $f$ has the intermediate value property if:

whenever $(c,d)$ is a subinterval of $[a,b]$, $f$ achieves every value between $f(c)$ and $f(d)$.

I am close to the answer here. I know there exists an $\epsilon$ such that for all $\delta_n = {1\over n}$ we have an $x_n$ such that $|x_n-x_0|<1/n$ but $|f(x_n)-f(x_0)| \geq \epsilon$, where $f$ is not continuous at $x_0$.

I'd like to be able to say that we can select these $x_n$ so that $(f(x_n))$ is a sequence of distinct elements, and then somehow proceed. How should I do this, and is this the correct way to go?

• Hint: Perhaps you should consider proving the contrapositive. The problem with your approach is that you want to show you can pick such $x_n$ with $f(x_n)$ all the same. – Ted Shifrin May 7 '14 at 3:34
• Ok the contrapositive certainly makes this easier. Now what do I do once the $(f(x_n))$ are all distinct? I suppose that is my main question. – Johnny Apple May 7 '14 at 3:40

Your approach is fine. For each $n$ you've got an $x_n$ in $(x_0-\frac1n,x_0+\frac1n)$ such that either $f(x_n)\ge f(x_0)+\epsilon$ or else $f(x_n)\le f(x_0)-\epsilon$. Now use the IVP [*] to get a $y_n$ in $(x_0-\frac1n,x_0+\frac1n)$ such that $f(y_n)$ is equal to $f(x_0)+\epsilon$ or $f(x_0)-\epsilon$. Conclude that at least one of those two values must be assumed infinitely often.

[*] Suppose, e.g., that $x_n\gt x_0$. The IVP applied to the interval $[x_0,x_n]$ says that, in that interval, $f$ assumes all values between $f(x_0)$ and $f(x_n)$. If $f(x_n)\ge f(x_0)+\epsilon$ then then $f(x_0)+\epsilon$ is one of those values; if $f(x_n)\le f(x_0)-\epsilon$ then . . .

• I'm not seeing how you get the $y_n$ from the IVP. – Johnny Apple May 7 '14 at 3:46
• And, how do you know the $f(x_n)$ are distinct? – Johnny Apple May 7 '14 at 3:53
• Why do you care if the $f(x_n)$ are distinct? If they are all equal, how is that a problem? – bof May 7 '14 at 3:56
• You do need the $y_n$ to be distinct is all, I suppose. But that can be done via subsequences, correct? – Johnny Apple May 7 '14 at 3:57
• The $y_n$ don't all have to be distinct, just so they take infinitely many different values. This is guaranteed by the condition $|y_n-x_0|\lt1/n$. If there were only finitely many different $y_n$, then one of them would be nearest to $x_0$; i.e., it would make sense to define $d=\min\{|y_n-x_0|:n\in\mathbb N\}$; and of course $d\gt0$ since $y_n\ne x_0$. Now what happens if we take $n$ big enough so that $1\n\lt d$? – bof May 7 '14 at 4:11

Suppose that $f$ satisfies the conclusion of the IVT, i.e., $f$ is a Darboux function. If $f$ takes on each value a finite number of times, then $f$ is continuous.

We argue by contradiction. Suppose that $f$ is not continuous, so there is some $x_0$ and $\epsilon>0$ such that given any $\delta>0$ we have $0<|x-x_0|< \delta$ and $|f(x)-f(x_0)|> \epsilon$. Then either $|f(x)-f(x_0)|> \epsilon$ for infinitely many $x>x_0$ or else for infinitely many $x<x_0$ (if were not the case, we can shrink the interval and $f$ would be continuous), say the first. Similarly $f(x)-f(x_0)>\epsilon$ or $f(x)-f(x_0)<-\epsilon$ for infinitely many $x$, say again the first.

So there are infinitely many $x>x_0$ such that $f(x)-f(x_0)> \epsilon$.

Let $a_1>x_0$ such that $f(x_0)+\epsilon< f(a_1)$. Since $f$ is Darboux there is some $b_1 \in (x_0, a_1)$ such that $f(b_1)=f(x_0)+\epsilon$. Now let $a_2\in (x_0,b_1)$ so that $f(x_0)+\epsilon< f(a_2)$, and again we thus have some $b_2\in (x_0,a_2)$ for which $f(b_2)=f(x_0)+\epsilon$. By induction we can have $f(b_n)=f(x_0)+\epsilon$ for all $n$, where $b_i\not= b_j$ if $i\not=j$. Hence $f$ takes on $f(x_0)+\epsilon$ a infinite number of times, a contradiction.