# Prove or disprove: $\lim_{x→0} f(x) = 0$

Let $$f : \mathbb{R} → \mathbb{R}$$ be a function such that for any $$r ∈ \mathbb{R}$$ , we have

$$\lim_{n\rightarrow \infty }f\left ( \frac{r}{n} \right )= 0$$

Prove or disprove: $$\lim_{x→0} f(x) = 0$$

My claim: The statement is true because $$r ∈ \mathbb{R}$$.

In other words, I think since we can pick any $$r ∈ \mathbb{R}$$, with $$\lim_{n\rightarrow \infty} \frac{r}{n}$$, we can cover any neighbor of $$0$$. (Either rational or irrational numbers near $$0$$).

But, since the reasoning does not seem strong enough for me, I also thought of any counterexample of $$f$$. So, I tried to construct a discontinuous function at $$x=0$$, but I couldn't think of any counterexample.

Is the statement really true? Then, how should I change (or improve) my reasoning to write it in clear mathematical terms?

If the statement is false, what should I notice to have a counterexample?

• The answer would certainly be yes if $\lim_{n\to \infty} f(r/n) = 0$ was uniform on $r$. May 8, 2021 at 4:15
• That is, if the starting $N$ of the definition of the limit does did not depend on $r$ May 8, 2021 at 4:17

The statement is false. Fix some $$a\in (0,1)$$ and define the (geometric) null sequence $$(x_n)=(a^{n})=(a,a^2,a^3,...)$$. Then define $$f$$ to be the indicator function on the set $$\{x_n: n\in \mathbb{N}\}$$, i.e., $$f\colon \mathbb{R}\to \mathbb{R}$$, $$f(x)=1$$ if $$x=x_n$$ for some $$n\in \mathbb{N}$$ and $$f(x)=0$$ otherwise. Then for any given $$r\in \mathbb{R}$$ we have $$\frac{r}{n}=x_n=a^n$$ for only finitely many $$n$$ (otherwise there was a subsequence $$(n_k)$$ such that $$r=n_k a^{n_k}\to 0$$ as $$k\to \infty$$, which yields $$r=0$$ contradicting the equation $$\frac{r}{n}=a^n$$). Therefore $$f(\frac{r}{n})=0$$ for all but finitely $$n$$, thus $$\lim_{n\to \infty} f(\frac{r}{n})=0$$. But clearly, $$\lim_{n\to \infty}f(x_n)=1$$. So, the limit $$\lim_{x\to 0} f(x)$$ does not exist.
• Can you please give me a little more details about the reason why we do have only finitely many n? I would like to know why we are considering $(n_k)$ to get a contradiction.
• It is just reasoning by contradiction. If the equation held for infinitely many $n$, then you can construct a subsequence $(n_k)$ such that the eqation holds for each $n_k$ and $n_k\to \infty$ for $k\to \infty$. If this reasoning is not clear to you, you could even argue more directly: From $\frac{r}{n+1}=a^{n+1}$ and $\frac{r}{n}=a^n$, we get (by dividing the equations) $1-\frac{1}{n+1}=\frac{n}{n+1}=a$, and you can easily see that this equation can be true for only one $n$. Thus, in fact, the equation can only hold for at most two $n$.