Nonconstant Continuous Functions 
Let $f$ be a non-constant function that is continuous on $[a, b]$, where $a < b$. Prove that the range of $f$ is a finite closed interval $[c, d]$, where $c < d$. 

If it is continuous, that means it is differentiable on $[a , b]$. So do I have to use an example and then show? Or what do I have to do? I know that $f$ will not have any arbitrary constants since they mentioned non-constant. so how do I approach this question?
 A: If $f: \mathbb{R} \to \mathbb{R}$ is continuous on $[a,b]$, a connected subspace, then $f[a,b]$ is connected by an elementary result in analysis. If $f$ is nonconstant, then $f[a,b]$ contains at least two points. But $f[a,b]$ is connected, so $f[a,b]$ is an interval by an elementary result in analysis. But $[a,b]$ is also compact, so $f[a,b]$ is compact by an elementary result in analysis, and hence $f[a,b]$ must be a closed interval. 
A: Consider $f$ to be a function that is continuous on $[a,b]$. This implies that $f$ has absolute extrema on $[a,b]$ or $f$ is constant, but $f$ is not constant, so $f$ has an absolute minimum and an absolute maximum on $[a,b]$. Thus, if $c$ is the minimum of $f$ on $[a,b]$ and $d$ is the maximum of $f$ on $[a,b]$, then the image of $f$ over $[a,b]$ is $[c,d]$ where $c < d$ (because $c$ is the min and $d$ is the max).
I might quibble with the use of "range" to denote the set of all values which result when $f$ is evaluated for all values in $[a.b]$, but if "range" is given this meaning, the statement to be proven is true.
This analysis supposes that ($f$ is continuous on $[a,b]$)$\implies$($f$ has absolute extrema on $[a,b]$ or $f$ is constant) is already proven.
