I had an exercise that was : if $f:\mathbb R\longrightarrow \mathbb R$ is uniformly continuous and if $$\lim_{n\to \infty }f(nx)=0$$ for all $x$, then $\lim_{x\to \infty }f(x)=0$. I proved this result, but I was wondering why it doesn't work if $f$ is just supposed continuous. I can't find a counter example, any idea ?
 17,090
 11
 30
 64
 1,748
 7
 20

1I believe it works for continuous functions too, but probably requires a different approach. Is there any reason you're saying that it doesn't work for continuous functions or is it simply because it doesn't say so in the exercise? – JustDroppedIn May 10 '18 at 15:32

@JustDroppedIn : I belive that it doesn't work, because I suppose that we wouldn't need the strongest hypothesis of uniformly continuous... but maybe it hold for continuous function too... – user386627 May 10 '18 at 15:34

1I believe this is a Baire category theorem application.... I'm searching. – May 10 '18 at 15:40

1Found: https://math.stackexchange.com/questions/818811/fmathbbrtomathbbriscontinuousandlimntoinftyfnx0foral – May 10 '18 at 15:41

1https://math.stackexchange.com/questions/101086/limntoinftyfnx0implieslimxtoinftyfx0 – May 10 '18 at 15:42
1 Answers
I think it is true for continuous functions too: Let $\varepsilon>0$. Let's consider the sets $A_n=\{x\in\mathbb{R}: f(nx)\leq\varepsilon\}$. Since $f$ is continuous, the sets $A_n$ are closed (preimages of closed sets under $f$ composed with other continuous functions). Also, let $B_n=\displaystyle{\bigcap_{k=n}^{\infty}A_k}$. These are also closed sets and the union $\bigcup_nB_n$ is $\mathbb{R}$, since for all $x\in\mathbb{R}$ it is $f(nx)\to0$. By Baire's category theorem, there exists $n_0$ such that $int(B_{n_0})\neq\emptyset$. Therefore there exists $x_0$ and $r>0$ such that for all $n\geq n_0$ and all $y\in(x_0r,x_0+r)$ it is $f(ny)\leq\varepsilon$. That being said, for all $z\in\displaystyle{\bigcup_{n=n_0}^\infty}(n(x_0r),n(x_0+r))$ it is $f(z)\leq\varepsilon$.
If $x_0+r>0$, we're done, since the last union will cover a whole interval of the form $(s,+\infty)$.
 13,782
 1
 12
 39