Find a continuous function on a closed interval with range an open interval 
  
*
  
*Find a continuous function on a closed interval with range an open interval.
  

I'm having trouble thinking of an example of such a function. I though $f(x)=x$ from $\mathbf{R}$ to $\mathbf{R}$ would work, but $\mathbf{R}$ isn't an interval. Is my idea not too far off, i.e., is there a slight modification that will work to deal with the intervals? 


  
*Is there a continuous function defined on an open interval with range an unbounded closed set different from $\mathbf{R}$? I think that there is but I'm not sure, I really would prefer to not get an answer, just a hint. 
  

 A: *

*The real line, $\Bbb R$, is certainly an open interval. In particular, the identity function $f(x) := x$ satisfies the condition. (In fact, for any finite, closed interval $[a, b]$ and continuous function $f$, $[a, b]$ is compact and so $f([a, b])$ is compact and nonempty and hence not open. So, for any continuous $f$ and interval $I$ satisfying the criteria, we must have that $I$ is infinite, which here I mean to include half-infinite.)

*Hint Can you think of a familiar continuous function $f$ that has domain $\Bbb R$ but range $[0, \infty)$?
A: You seem to be excluding unbounded intervals like $(-\infty, +\infty)$ or $[0, +\infty)$ from your definition of interval. If not see Travis's answer. If so:
For 1, a continuous image of the (bounded) closed interval $[x, y]$ must be compact and so cannot be an open interval $(a, b)$ (unless $x > y$ so that $[x, y] = \emptyset$).
As a hint for 2, think of a function $f$ that maps the open interval $(-1, 1)$ onto the unbounded closed set $[1, \infty)$ (which is ${} \neq \Bbb{R}$) with $f(0) = 1$ and with $f(x)$ increasing to $\pm\infty$ as $x$ tends from $0$ to $\pm1$. Now see if you can find a quadratic that looks like the reciprocal of the function you're thinking of.

 $f(x) = \frac{1}{1-x^2}$

