Suppose $f\in C(0,+\infty)$,and $\forall x \in (0,+\infty)$,we have \begin{align} \lim_{n\to \infty}f(nx)=0 \end{align} where $n$ is positive integer.How to show that $\lim_{x\to\infty}f(x)=0$?
I have tried proof by contradiction, if not, $\exists \epsilon>0$, such that $\forall M>0$,$\exists y>M$, s.t. $|f(y)|>\epsilon$. But I got stuck here because I have no idea how to use the continuity to get contradiction.
Thanks for your attention.