A question about the boundedness theorem I have a question about the boundedness theorem: 
http://en.wikipedia.org/wiki/Extreme_value_theorem

The boundedness theorem which states that a continuous function $f$ in the closed interval $[a,b]$ is bounded on that interval. That is, there exist real numbers $m$ and $M$ such that: $m \le f(x) \le M\quad\text{for all }x \in [a,b]$

Is there a function on a closed interval that doesn't reach its boundaries ? in other words, is there a function on a closed interval where $m,M\neq f(x)$ ?
I'm asking about a function with or without cases, preferably both.
There's $f(x)=\frac 1 x$ on $[0,1]$ but $f(1)=1$, and it's not defined for zero. 
 A: Define a function $f$ over $[0,1]$ such that 


*

*$f(0)=\frac{1}{2}$

*$f(1)=\frac{1}{2}$

*inbetween, $f(x)=1-x$

If you resent case-like definitions, try Fourier series.
The previous function can also be defined by the formula $$f(x)=\frac12 +2 \sum_{k=1}^\infty \left( \frac{1-\cos(2\pi k)}{4k^2\pi^2}\cos(2\pi kx)+\frac{2k\pi-\sin(2k\pi)}{4k^2\pi^2}\sin(2\pi kx)\right)$$
A: It depends what you mean by boundaries and "reaching". In the theorem you cite, the $m$ and $M$ needn't be sharp bounds. For example, $f(x) = x$ on $[0,1]$ is continuous on that interval, but also less than $713$ and greater than $-2 \pi$. 
If you're willing to consider a function on a compact set, then more can be said about the bounds. In particular, for $f$ continuous on $E$ compact, there are $x_1,x_2\in E$ such that $f(x_1) = \text{sup}_{x\in E}\{f(x)\}$ and $f(x_2) = \text{inf}_{x\in E}\{f(x)\}$. That is, it achieves its extreme values. In this case, we call the supremum and the infimum the maximum and minimum, respectively. 
A: A continuous real valued function on a closed interval attains its supremum and infinum. So, take $M$ larger than the supremum and $m$ smaller than the infinum,  and you are done.
