Continuity of a monotonically increasing function Let $f:I\rightarrow R$ be a monotonically increasing function on an open interval.If the image of this interval is an interval then would $f$ be continuous?
For the case when $f(I)$ is open then I can deduct continuity of $f$.But What if $f(I)$ closed?
 A: Suppose that $f$ is not continuous. Since $f$ is monotone increasing, every discontinuity of $f$ must be a jump discontinuity, so there is an $a\in I$ such that $\lim\limits_{x\to a^-}f(x)<\lim\limits_{x\to a^+}f(x)$. But then $f[I]$ clearly cannot be an interval, since it contains at most one point, $f(a)$, in the interval
$$\left(\lim_{x\to a^-}f(x),\lim_{x\to a^+}f(x)\right)$$
but contains points on both sides of it. Thus, if $f[I]$ is an interval, $f$ must be continuous.
Added after comments: Here’s a bit more detail. Let $u=\lim\limits_{x\to a^-}f(x)$ and $v=\lim\limits_{x\to a^+}f(x)$; since $f$ is monotone non-decreasing, $u\le f(a)\le v$, and therefore at least one of the open intervals $\big(u,f(a)\big)$ and $\big(f(a),v\big)$ is non-empty. If $\big(u,f(a)\big)\ne\varnothing$, let $J=\big(u,f(a)\big)$, and otherwise let $J=\big(f(a),v\big)$; in either case $J$ is a non-empty open interval, and $J\subseteq(u,v)$. If $x<a$, then $f(x)\le u$, and if $x>a$, then $f(x)\ge v$, so if $x\ne a$, then $f(x)\notin(u,v)$. It follows that $f[I]\cap J=\varnothing$.
$I$ is an open interval, so there are $c,d\in I$ such that $c<a<d$, and therefore $f(c)\le u<v\le f(d)$. Thus, $f(c)$ and $f(d)$ belong to $f[I]$, but $J\subseteq[f(c),f(d)]\setminus f[I]$, so $[f(c),f(d)]\nsubseteq f[I]$, and $f[I]$ therefore cannot be an interval.
