Prove that $f(x)$ is bounded I need to prove the following statement: Let
$f\colon [a,b] \to \mathbb{R}$ be a function. For each $x_0\in[a,b]$, $\lim_{x\to x_0}{f(x)}$ exists and is finite. Prove that $f$ is bounded.
What I have tried:
I know that if $\lim_{x\to x_0}{f(x)}$ exists and is finite, then there exists $\delta>0$ such that $f$ is bounded in the interval so for each $x$ there exists a $\delta$, maybe together they cover the whole interval, then $f$ is bounded there? 
 A: Assume not. Then there exists a sequence $\{x_n\}_n$ such that $x_n \in [a,b]$ and $\lim_n |f(x_n)|=+\infty$. Since $[a,b]$ is a compact interval, we can assume that $x_n \to x_0 \in [a,b]$. Then $+\infty = \limsup_{x \to x_0} |f(x)|$, against the assumption.
A: Your idea is good and you are almost done: You have found for each $x_0\in [a,b]$ a $\delta=\delta(x_0)>0$ such that $|f(x)|<M(x_0)$ for $|x-x_0|<\delta$. The open intervals $(x_0-\delta(x_0),x_0+\delta(x_0))$ where $x_0$ runs over $[a,b]$ cover $[a,b]$. By compactness, there exists a finite subcover. Let $M$ be the maximum of the finitely many $M(x_0)$; then $M$ is a bound for $f$.
A: Another approach based on method of bisection and nested interval principle is as follows. Let's assume on the contrary that that $f$ is unbounded on $I_{0} = [a, b]$. Divide interval $[a, b]$ into two equal subintervals via the mid point $(a + b)/2$. Now $f$ must be unbounded in one of these two subintervals. Call that subinterval as $I_{1} = [a_{1}, b_{1}]$. Repeat the process indefinitely to get a sequence of intervals $I_{n} = [a_{n}, b_{n}]$ such that $I_{n} \supseteq I_{n + 1}$ and $f$ is unbounded in $I_{n}$ for all $n$. Since the length of $I_{n}$ is $(b - a)/2^{n}$ and it tends to zero as $n \to \infty$, the intervals $I_{n}$ form a sequence of nested intervals and there is exactly one point $c$ such that $c \in I_{n}$ for all $n$.
Now $\lim_{x \to c}f(x)$ exists and hence $f$ is bounded in a certain neighborhood $(c - \delta, c + \delta)$. Since $a_{n} \to c, b_{n} \to c$ as $n \to \infty$ it follows that there is some interval $I_{n} \subseteq (c - \delta, c + \delta)$. Since $f$ is unbounded in $I_{n}$ we get a contradiction.
