# $x^{2}$ uniformly continuous on infinite union of closed and bounded intervals

I've been thinking about this problem for some time, but I haven't gotten anywhere with it. I know that $f\left(x\right)=x^{2}$ is uniformly continuous on any bounded interval of $\mathbb{R}$, but how can I show that $f:\bigcup\limits_{n=1}^{\infty}\left[n,n+\frac{1}{n^{2}}\right]\rightarrow\mathbb{R}$ is uniformly continuous?

Observe that $\bigcup\limits_{n=1}^{\infty}\left[n,n+\frac{1}{n^{2}}\right] = [1,2\frac14]\cup\bigcup\limits_{n=3}^{\infty}\left[n,n+\frac{1}{n^{2}}\right]$. We know that $f$ is uniformly continuous on $[1, 2\frac14]$ so I'm going to show it for $\bigcup\limits_{n=3}^{\infty}\left[n,n+\frac{1}{n^{2}}\right]$.
Let $\epsilon > 0$.
The distance from the endpoint of one interval to the start of the next ist then greater than $\frac{3}{4}$.
Choose $\delta = min\{\frac{3}{\epsilon}, \frac{3}{4} \}$. Then we have for $|x-y|< \delta$ (note that per definition of $\delta$ we have that $x$ and $y$ must be in the same interval) :
$$|f(x)-f(y)| \leq (n+\frac{1}{n^2})^2 - n^2 = \frac{2}{n} + \frac{1}{n^2} \leq \frac{3}{n} \leq\epsilon.$$
• sorry for deselecting your answer, but I have to clarify some things after rereading it again. Why do you say that the distance from the endpoint of one interval to the next is less than $\frac{3}{4}$? This is clearly not the case, since the distance between the endpoint of one interval to the start of the next is $\left\lvert\left(n+1\right)-\left(n+\frac{1}{n^{2}}\right)\right\rvert=\left\lvert1-\frac{1}{n^{2}}\right\rvert$. – Jake Nov 25 '17 at 22:27
• @Jake Sorry, my mistake. I mean greater than $\frac{3}{4}$. The point is that the intervals get so small that they take care of $|f(x)-f(y)|\leq \epsilon$ as long as we ensure that $x, y$ are in the same interval. – blat Nov 26 '17 at 7:31