Could someone verify my proof that if $f:(a,b) \rightarrow \mathbb{R}$ is uniformly continuous, then $f$ is bounded? For my proof, I had to inverse the definitions for uniform continuity and sequence convergence, so it feels a bit sketchy to me. I'd also appreciate suggestions if you have any.
Let $f:(a,b) \rightarrow \mathbb{R}$ be uniformly continuous. For the sake of contradiction, assume $f$ is unbounded. Let the sequences $a_n \rightarrow a$, $b_n \rightarrow b$, and $x_n \rightarrow x_0 \in (a,b)$. Since $f$ is continuous, then $f(x_n) \rightarrow f(x_0) \in \mathbb{R}$. Since $f$ is unbounded, then either of the sequence $f(a_n),f(b_n)$ must diverge, otherwise $f$ would be bounded. Without loss of generality, assume the sequence $b_n$ diverges. Since $f$ is uniformly continuous, then for $\epsilon > 0$, there exists $\delta > 0$ such that $|x-y|<\delta$ implies $|f(x)-f(y)|<\epsilon$ for $x,y \in (a,b)$. Let $\delta > 0$. Since $b_n \rightarrow b$, then there exists some $N \in \mathbb{N}$ where $|b-b_n|<\delta$ for $n \geq N$. Restrict $x \in (a,b)$ such that $b_n<x<b$. Then $|x-b_n|<\delta$. Since $f(b_n)$ diverges, then there exists some $\epsilon > 0$ and $n \in \mathbb{N}$ with $n \geq N$ such that $|f(x)-f(b_n)| \geq \epsilon$. Therefore we can write for $|x - b_n|<\delta$ and $|f(x)-f(b_n)| \geq \epsilon$. Therefore $f$ is not uniformly continuous. This is a contradiction since $f$ is uniformly continuous. Therefore $f$ is bounded.
 A: Your argument doesn't work. Consider the function $\frac{\sin\left(\frac1x\right)}x$. It is unbounded near $0$. However, if $a_n=\frac1{n\pi}$, then $\lim_{n\to\infty}f(a_n)=0$.
Here's a proof. There is a $\delta>0$ such that $\lvert x-y\rvert<\delta\implies\bigl\lvert f(x)-f(y)\bigr\vert<1$. Now, consider points $a_1,a_2,\ldots,a_N\in(a,b)$ such that $a<a_1<a_2<\cdots<a_N<b$ and that $a_1-a,a_2-a_1,\ldots,b-a_M<\delta$. Then, if $x,y\in(a,b)$ and $x<y$, there are numbers $k<l\leqslant N$ such that $a_{k-1}<x\leqslant a_k$ and $a_{l-1}<y\leqslant a_l$. But then\begin{align}\lvert f(x)-f(y)\bigr\vert&\leqslant\overbrace{\bigl\lvert f(x)-f(a_k)\bigr\rvert}^{<1}+\overbrace{\bigl\lvert f(a_k)-f(a_{k+1})\bigr\rvert}^{<1}+\cdots+\overbrace{\bigl\lvert f(a_l)-f(y)\bigr\rvert}^{<1}\\&\leqslant l-k+1.\end{align}
A: Take $a=0,\ b=1$ for convenience.  Set $\epsilon_n=1/n$ and find $\delta_n>0$ such that $|x-y|<\delta_n\Rightarrow |f(x)-f(y)|<1/n.$ We may assume $\delta_{n-1}>\delta_n\to 0.$ 
The idea is to extend $f$ to a continuous function on $[0,1]$. To this end, choose $(x_n)$ such that $x_n\in (1-\delta_n,1)$ and $x_n>x_{n-1}$. Then, $x_n\to 1$ and  $(f(x_n))$ is Cauchy because $|f(x_m)-f(x_n)|<1/\min(n,m)$. Therefore, $f(x_n)\to y$ as $x_n\to 1.$ 
If $(z_n)$ is another sequence such that $z_n\to 1$ then, since $(w_n)=f(x_1),f(z_1),f(x_2),f(z_2),\cdots,\ $ is Cauchy, $f(z_n)\to y$ and it makes sense to define 
$F(x)=\begin{cases}f(x)\quad a<x<1 &\\ y\quad \quad x=1\end{cases}$ 
$F$ is a continuous extension of $f$ by construction. 
Similarly, we extend $F$ to a continuous function $G$ at $x=0.$ Now, $G$ is continuous on the compact set $[0,1]$ and so is bounded there. And since $G$ agrees with $f$ on $(0,1)$, it follows that $f$ is bounded.
A: Suppose $f$ were unbounded on $(a,b).$ Let $x_1$ be any member of $(a,b).$ For $n\in \Bbb N$ let $x_{n+1}\in (a,b)$ with $|f(x_{n+1})|\ge 1+|f(x_n)|.$
Observe that this implies that $|f(x_m)-f(x_n)|\ge 1$ when $m\ne n.$
Let $(j(n))_{n\in \Bbb N}$ be some sub-sequence of $\Bbb N$ such that $(x_{j(n)})_{n\in \Bbb N}$ converges to some $x\in [a,b].$
Note that $m\ne n$ implies that $j(m)\ne j(n),$ which implies $|f(x_{j(m)})-f(x_{j(n)})|\ge 1.$
Then there does NOT exist $\delta>0$ such that $\forall u,v\in (a,b)\;(|u-v|<\delta \implies |f(u)-f(v)|<1).$
Because for any $\delta>0 $ the interval $I_{\delta}=(a,b)\cap (x-\delta/2,x+\delta/2)$ contains $x_{j(n)}$ for all but finitely many $n,$ so there exist $m,n$ with $m\ne n$ and $\{x_{j(m)},x_{j(n)}\}\subset I_{\delta}.$ And for such $m,n$ we have  $$|x_{j(m)}-x_{j(n)}|<\delta \;\text { but }\; |f(x_{j(m)})-f(x_{j(n)})|\ge 1.$$
