Proving that $x^2$ is not uniformly continuous

continuityreal-analysisuniform-continuity

We know that $f(x)=x^2$ is not uniformly continuous as a function $f:\mathbb{R}\rightarrow[0,\infty)$. Indeed, let $\epsilon=1$. For any $\delta>0$, we may choose $\alpha>0$ large enough so that $\alpha\delta+\delta^2/4\geq \epsilon$. Then if we set
$$x=\alpha$$
$$y=\alpha+\frac{\delta}{2}$$
we find $|x-y|<\delta$, yet $|f(x)-f(y)|\geq\epsilon$. Hence the $\epsilon-\delta$ definition of uniform continuity is negated and that $f$ is not uniformly continuous.

Now if $X\subset\mathbb{R}$ is any open unbounded set, how do we prove that $f:X\rightarrow [0,\infty)$ is not uniformly continuous? I tried following a similar procedure as above, but it didn't work out. The difficulty I am having is that I can't make sure that $y=\alpha+\delta/2\in X$, because $X$ could be an open unbounded set with narrower open intervals as $x$ increases, for example
$$X=\bigcup_{n=1}^{\infty}(\sqrt{n},\sqrt{n}+\frac{1}{n}).$$

Given the above, is there a way to modify the above proof for the $f:X\rightarrow [0,\infty)$ case? I am not interested in just being given a proof, but I wanted to know how my proof might be modified, or if it just couldn't be modified in this case.

Best Answer

It is not true. Consider $X = \bigcup_n (n,n+\tfrac1{n^2})$. Note if $x,y \in (n,n+\tfrac1{n^2})$, then $$ |f(x) - f(y)| \le |f(n+\tfrac1{n^2}) - f(n)| = \tfrac2n + \tfrac1{n^2} \le \tfrac3n .$$ Given $\epsilon > 0$, choose $N > \frac3\epsilon$. If $x,y \in \bigcup_{n\ge N} (n,\frac1{n^2})$, and $|x-y| < \tfrac12$, then $|f(x) - f(y)| < \epsilon$. And since $f(x)$ is uniformly continuous on $[0,N+1]$, we can find $\delta > 0$ and $\delta < \tfrac12$ such that if $x,y \in [0,N+1]$, then $|x-y| < \delta$ implies $|f(x) - f(y) < \epsilon$.