# Show $\lim_{x \to d} f(x)=\sup\{f(x)|x\in{I}\}$ if $f$ is monotonic on $(c,d)$

Let $f : I = (c,d) \to \mathbb{R}$ be a monotonic function and $-\infty < c < d < +\infty$. How can we show that $$\lim_{x \to d} f(x)=\sup\{f(x)\mid x\in{I}\}$$ and $$\lim_{x \to c} f(x)=\inf\{f(x)\mid x\in{I}\}.$$ I think it might be useful to create a sequence with $\lim_{i\to \infty} z_i=c$ (or $d$), but I don't know how to go on.

-

This is not true unless $f$ is increasing in $(c,d)$. If $f$ is decreasing then $\lim_{x\to d^-}f(x)=\inf f(x)$ and $\lim_{x\to c^+}f(x)=\sup f(x)$.
Proof: Suppose $f$ is bounded and let $a=\sup f((c,d))$ and $\epsilon>0$. Then $\exists x_0\in (c,d)$ so that $$f(x_0)+\epsilon>a\Rightarrow -\epsilon<f(x_0)-a<a-f(x_0)<\epsilon$$ Since $f$ is increasing $f(x)>f(x_0)$ for $x>x_0$. Thus, $$-\epsilon<f(x)-a<\epsilon\Rightarrow \left|f(x)-a\right|<\epsilon$$ for $x_0<x<d$. Letting $\delta=d-x_0$ completes the proof. If $f$ is unbounded the proof is similar (and simpler) but with $a=+\infty$.
Note: If in addition $f$ is continuous in $(c,d)$ then $$f((c,d))=(\lim_{x\to c^+}f(x),\lim_{x\to d^-}f(x))$$
I don't see why to set $\delta=d-x_0$, why is the proof not finished at $\left|f(x)-a\right|<\epsilon$? – Rob Dec 16 '12 at 18:38
@Rob To be completely typical we need $d-\delta<x<a\Rightarrow \left|f(x)-a\right|<\epsilon$ don't we? – Nameless Dec 16 '12 at 18:39
Honestly I still can't figure out why this is needed to finish the proof, because $-\epsilon<f(x)-a<\epsilon\Rightarrow \left|f(x)-a\right|<\epsilon$ shows that $\lim_{x\to d}f(x)$=a=sup? – Rob Dec 16 '12 at 19:09
To conclude that the limit is $a$ you need $d-\delta<x<a\Rightarrow \left|f(x)-a\right|<\epsilon$ – Nameless Dec 16 '12 at 19:11