[Math] Hypotheses on the Intermediate Value Theorem

real-analysis

Background
A typical statement of the Intermediate Value Theorem given in elementary analysis, this particular one lifted from Wikipedia, goes as follows:


If $f$ is a real-valued continuous function on the interval $[a,b]$ and $u$ is a number between $f(a)$ and $f(b)$ then there exists a number $c \in [a,b]$ such that f(c) = u

This statement would lead one to believe that the result is somehow related to the compactness of $[a,b]$. However, it is a theorem of general topology that if $f$ is a real-valued continuous function defined on a connected space $X$ then it takes on every value between $f(p)$ and $f(q)$ for every $p,q \in X$. Even more generally, we have that since continuous maps preserve connectivity, $g(X)$ is connected for any continuous map $g$ defined on $X$ to some other topological space $Y$.

In fact, the first more specialized version follows almost immediately from the topological version, taking into account the fact that a subset of $\mathbb{R}$ is connected if and only if it is an interval.

Question
Is there a reason why we cannot state the first theorem more generally as:


If $f$ is a real-valued continuous function on an interval $J \subset \mathbb{R}$, $a,b \in J$ and $u$ is a number between $f(a)$ and $f(b)$ then there exists a number $c \in J$ such that f(c) = u

Best Answer

Take $f(x) =x$ for $x\in(0,1]$ and $f(0) =-1$. Then $f$ is continuous on $J = (0,1)$ in the subspace topology, but for $u = -0.5$ there is no $c$ such that $f(c) = u$.

Related Question