Consequence of uniform continuity $f:\mathbb R \rightarrow \mathbb R$ is a uniformly continuous function such that $f(n) \rightarrow 0$ as $n \rightarrow \infty$ where $n \in \mathbb N$. I have to find a counterexample to show that $f(x)$ may not converge to $0$ as $x \rightarrow \infty$. If we assume that $f(x^2)$ is uniformly continuous, then $f(x) \rightarrow 0$ as $x \rightarrow \infty$.
I think $f(x) = \sin2\pi x$ works for the first part. What can I do about the second part?

Suppose by contradiction that $f$ doesn't converge to $0$ at $\infty$. We can find $a >0$ and a strictly increasing sequence$\{x_n\}$ with $\vert f(x_n) \vert \ge a$ for all $n \in \mathbb N$.
But then $\vert \sqrt{x_n} - \sqrt{\lfloor x_n \rfloor}\vert \to 0$ while $\vert f(x_n) - f(\lfloor x_n \rfloor) \vert \ge a/2$ for $n$ large enough as $\lim\limits_{n \to \infty} f(n) = 0$. In contradiction with the uniform continuity of $f(x^2)$.
