Let f: D-->R and let c be an accumulation point of D. Suppose that a<=f(x)<=b for all x elements in D with x not equal to c, and that lim(x-->c)f(x)=L. Prove that a<=L<=b.
By definition of accumulation point there is a sequence of distinct points $\displaystyle \left( {d_n } \right) \subset D\;\& \;\left( {d_n } \right) \to c$.
But by the given you also know that $\displaystyle f\left( {d_n } \right) \to L$.
If it were the case that $\displaystyle L < a \vee b < L$ then there is an open set containing $\displaystyle L$ and no point of $\displaystyle [a,b]$.
There is a contradiction there.
Suppose L<a ===> a-L>0............................................... ...........1
Now since $\displaystyle \lim_{x\rightarrow c}{f(x)} =L$, we HAVE that for every +ve NO (and thus for a-L) ,THERE exists a δ>0 and such that:
if xεD and 0<|x-c|<δ,then |f(x)-L|<a-L.
But : |f(x)-L|<a-L <====> L-a<f(x)-L<a-L ====> f(x)<a ,a contradiction.
In the same way we work for b