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. 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.

• Why must the function diverge on the interval limits, and not somewhere inbetween? – B.Swan Jun 10 '19 at 23:20
• Since is unif cont you can extend the function continuously to $[a,b]$. Since this is a compact set your function is bounded. – Julian Mejia Jun 10 '19 at 23:20
• @B.Swan If the function diverged at $x_0 \in (a,b)$, then the function wouldn't be defined at $x_0$. – Spencer Kraisler Jun 10 '19 at 23:24
• What about the function $f:(-1, 1) \rightarrow \Bbb{R}, f(x)=\frac{1}{x} \forall x \neq 0, f(0)=0$? – B.Swan Jun 10 '19 at 23:27
• @B.Swan that function is not continuous however. – Spencer Kraisler Jun 10 '19 at 23:27

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 and that $$a_1-a,a_2-a_1,\ldots,b-a_M<\delta$$. Then, if $$x,y\in(a,b)$$ and $$x, there are numbers $$k such that $$a_{k-1} and $$a_{l-1}. But then$$\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.$$

• Or, you could use a previous theorem to conclude that $f$ is bounded on $[a + \delta, b - \delta]$, and then every member of $(a,b)$ is within $\delta$ of some element of $[a + \delta, b - \delta]$... (Or in case $\delta > \frac{b-a}{2}$, then every member of $(a,b)$ is within $\delta$ of $\frac{a+b}{2}$.) – Daniel Schepler Jun 10 '19 at 23:25
• Is that function also uniformly continuous? – Spencer Kraisler Jun 10 '19 at 23:26
• @SpencerKraisler Which function? – José Carlos Santos Jun 10 '19 at 23:28
• @JoséCarlosSantos My bad. I meant $\frac{\sin\left(\frac{1}{x}\right)}{x}$. This function doesn't seem to be uniformly continuous. Is it? – Spencer Kraisler Jun 10 '19 at 23:28
• In your proof, you wrote “Since $f$ is unbounded, then either of the sequence $f(a_n),f(b_n)$ must diverge, otherwise $f$ would be bounde.” My example shows that that assertion is false. – José Carlos Santos Jun 10 '19 at 23:35

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

$$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.

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.$$