Does a continuous function from $[a,b]$ to $[c,d)$ exist? Let $f$ be a continuous function on $[a,b]$ and its image is a semi-open interval $[c,d)$ (both of them are in $\Bbb R$)
If this function exist, give an example, or prove it doesn't exist.
At first I tried to found an example but everything lead me to a contradiction and I've tried to prove it doesn't exist but I'm going round in circles.
Any advice will be helpful.
Thanks.
 A: Let's say such function does exist. Since it's image is $[c,d)$, we know $f$ reaches values arbitrarily close to $d$ on the interval $[a,b]$ but never actually reaches $d$. So, let's make a sequence of values of $f$ that get closer and closer to $d$.
Let's define $x_n$ as a sequence of numbers in $[a,b]$, such that
$$|f(x_n)-d| < \tfrac1{2^n}$$
Does this seem familiar? If you know about limits, this is pretty much the definition of a limit. So, we see
$$\lim f(x_n) = d = f(\lim x_n)$$
But, since all $x_n\in[a,b]$, we know $\lim x_n\in[a,b]$. So, let $X = \lim x_n$, and we see $f(X) = d$. This is a contradiction, because we assumed $f$ didn't reach $d$ on $[a,b]$.
We conclude, such function does not exist.
A: Theorem:
The image of a closed, bounded interval under a continuous map is closed and bounded.
Proof:
The image of an interval $I = [a, b]$ is bounded and is a subset of$ [m, M] $(say) where m, M are the lub and glb of the image. Since the function attains its bounds, $m, M ∈ f (I) $and so the image is $[m, M].$
See more here:Image of a continuous function 
