I am given the following: $$ Let f:\mathbb{R} \to \mathbb{R} \text{ be uniformly continuous on } \mathbb{R}. \text{ Assume that for every rational } x \in (0,1), \lim_{n\to \infty}{f(n+x)} = 0. \text{ Prove} \lim_{n\to\infty}f(n) = 0. $$
My first idea is to use definition of limits, but I odnt see how the uniform continuity or the rational number x factors into the argument. Firstly isn't it true that for any real number $x$ if $\lim_{n\to\infty}{f(n+x)} = 0 $ implies $\lim_{n\to\infty}{f(x)} = 0$. Am I misunderstanding something here?
It isn't true without uniform continuous. Take, for example, $f$ such that $$f(x) = \begin{cases} n \cdot (x - n - \frac{1}{n}),& x \in [n + \frac{1}{n}, n + \frac{2}{n}]\\ n \cdot (n + \frac{3}{n} - x),& x \in (n + \frac{2}{n}, n + \frac{3}{n}]\\ 0& \text{otherwise} \end{cases}$$ The important part is that $f(n + \frac{2}{n}) = 1$, $f$ is continuous and for any $\varepsilon > 0$ for all significantly large $x$ we have $f(x) = 0$ if fraction part $\{x\}$ of $x$ is greater than $\varepsilon$.
Then we have $\lim\limits_{n \to \infty} f(n + x) = 0$ for any $x$: if $x = 0$ then just $f(x + n) = 0$, otherwise $f(x + n) = 0$ if $n > \frac{10}{\{x\}}$.
We need some kind of "uniformity" of this limit with respect to $x$: we need to be able choose $N$ s.t. $f(x + n) < \varepsilon$ if $n > N$ independently of $x$. $f$ been uniformly continuous is enough.
Indeed, let us fix some $\varepsilon > 0$. We will need to find $X$ s.t. for any $x > X$ we have $|f(x)| < \varepsilon$.
As $f$ is uniformly continous, for some $k$ we have $|f(x) - f(y)| < \frac{\varepsilon}{2}$ for any $x$, $y$ s.t. $|x - y| < \frac{1}{k}$.
Now, let us choose some $N_i$ for $i=1,\ldots,k$ s.t. for any $i$ for any $n > N_i$ we have $|f(n + \frac{i}{k})| < \frac{\varepsilon}{2}$.
We can take $N = \max(N_1, \ldots, N_k)$ as our $X$. Indeed, let us take some $x > N$. Choose some $m, n \in \mathbb{N}$ s.t. $m > N$, $n < k$ and $x \in [m + \frac{n}{k}; m + \frac{n + 1}{k})$.
Now we have $|f(x)| = |f(x) - f(m + \frac{n}{k}) + f(m + \frac{n}{k})| \leqslant |f(x) - f(m + \frac{n}{k})| + |f(\frac{n}{k})| \leqslant \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon$.
Intuitively, uniform continuity allows us to choose some finite number of points $\{a_1, \ldots, a_n\}$ on $[0; 1]$ s.t. any real number $x$ can be approximated with some $a_i + n$, and values of $f(x)$ and $f(a_i + n)$ will be close - so that if $f(a_i + n)$ is small, so is $f(x)$.