TITLE: $\lim_{n\to \infty}f(nx)=0$ implies $\lim_{x\to \infty}f(x)=0$
QUESTION [18 upvotes]: Can anyone help me with this problem?

Let $f:[0,\infty)\longrightarrow \mathbb R$ be a continuous function such that for each $x>0$, we have $\lim_{n\to \infty}f(nx)=0$. Then prove that $\lim_{x\to \infty}f(x)=0$.

Our teacher told first to prove Baire's theorem, and then show that this is a consequence of that theorem. I proved Baire's theorem, and I spend a few hours thinking on how Baire's theorem is related to this problem, but I couldn't find anything. I'd really appreciate your help.

REPLY [9 votes]: You might also be interested in this article by Timothy Gowers, where he describes a thought process of how one might arrive at an elementary proof of this statement (without using the Baire theorem).