The limit of a function approaching infinity 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&gt;0$, such that $\forall M&gt;0$,$\exists y&gt;M$, s.t. $|f(y)|&gt;\epsilon$. But I got stuck here because I have no idea how to use the continuity to get contradiction.

Thanks for your attention.
By definition, we can rephrase $\lim_{n \to \infty} f(nx) = 0$ as "For all $x &gt; 0$, for any $\epsilon &gt; 0$, there exists $N \in \mathbb{N}$ such that for any $n \ge N$, $|f(nx)| &lt; \epsilon$."

Consider the special case $x = 1$.  Then we have: for any $\epsilon &gt; 0$, there exists $N \in \mathbb{N}$ such that for any $n \ge N$, $|f(n)| &lt; \epsilon$.  By definition, this means that $\lim_{n \to \infty} f(n) = 0$.  Rename your variable $n$ as $x$ and we have $\lim_{x \to \infty} f(x) = 0$.
By definition, we can rephrase $\lim_{n \to \infty} f(nx) = 0$ as "For all $x &gt; 0$, for any $\epsilon &gt; 0$, there exists $N \in \mathbb{N}$ such that for any $n \ge N$, $|f(nx)| &lt; \epsilon$."

Consider the special case $x = 1$.  Then we have: for any $\epsilon &gt; 0$, there exists $N \in \mathbb{N}$ such that for any $n \ge N$, $|f(n)| &lt; \epsilon$.  By definition, this means that $\lim_{n \to \infty} f(n) = 0$.  Rename your variable $n$ as $x$ and we have $\lim_{x \to \infty} f(x) = 0$.