Limit of a continuous function

Suppose that $f$ is a continuous and real function on $[0,\infty]$. How can we show that if $\lim_{n\rightarrow\infty}(f(na))=0$ for all $a>0$ then $\lim_{x\rightarrow+\infty} f(x)=0$?

-

$\newcommand{\orb}{\operatorname{orb}}$If $f(x)\not\to 0$ as $x\to\infty$, then there is an $\epsilon>0$ such that for every $m\in\Bbb N$ there is an $x_m\ge m$ such that $|f(x_m)|\ge\epsilon$. Since $f$ is continuous, for each $m\in\Bbb N$ there is a $\delta_m>0$ such that $|f(x)|>\frac{\epsilon}2$ for all $x\in(x_m-\delta_m,x_m+\delta_m)$. For $n\in\Bbb N$ let $$U_n=\bigcup_{k\ge n}(x_k-\delta_k,x_k+\delta_k)\;.$$

For $a\in(0,1)$ let $\orb(a)=\{na:n\in\Bbb Z^+\}$, and for $n\in\Bbb N$ let $$G_n=\{a\in(0,1):\orb(a)\cap U_n\ne\varnothing\}\;.$$ Suppose that $0<b<c<1$, and let $$V(b,c)=\bigcup_{n\in\Bbb Z^+}(nb,nc)=\bigcup_{x\in(b,c)}\orb(x)\;.$$ Let $m=\left\lfloor\frac{b}{c-b}\right\rfloor+1$; $(n+1)b<nc$ for each $n\ge m$, so $V(b,c)\supseteq(mb,\to)$. It follows that $V(b,c)\cap U_n\ne\varnothing$ for each $n\in\Bbb N$ and hence that $(b,c)\cap G_n\ne\varnothing$ for each $n\in\Bbb N$. Thus, each $G_n$ is a dense open subset of $(0,1)$, so by the Baire category theorem $G=\bigcap_{n\in\Bbb N}G_n$ is dense in $(0,1)$ and in particular, $G\ne\varnothing$.

Fix $a\in G$. Then $a\in G_n$ for each $n\in\Bbb N$, so $\orb(a)\cap U_n\ne\varnothing$ for each $n\in\Bbb N$. This clearly implies that $\left\{n\in\Bbb Z^+:|f(na)|>\frac{\epsilon}2\right\}$ is infinite, contradicting the hypothesis that $\lim_{n\to\infty}f(na)=0$, and we conclude that $\lim_{x\to\infty}f(x)=0$.

Added: Since you’re having trouble with the notion of proof by contradiction, let me note that I need not have phrased it that way: with a small change in wording this becomes a proof of the contrapositive of the desired statement. Since a statement and its contrapositive are logically equivalent, it proves the desired statement as well.

The desired statement has the form $A\land B\Rightarrow C$, where $A$ is the hypothesis that $f$ is continuous, $B$ is the hypothesis that $\lim_{n\to\infty}f(na)=0$ for each $a>0$, and $C$ is the desired conclusion, that $\lim_{x\to\infty}f(x)=0$. As I phrased my argument, it has the following form:

Assume $A,B$, and $\lnot C$, and infer $\lnot B$, thereby showing that $A\land B\land\lnot C\Rightarrow B\land\lnot B$. Since $B\land\lnot B$ is a contradiction, the hypthesis $A\land B\land\lnot C$ is false. But we’re given that $A$ and $B$ are true, so it must be $\lnot C$ that’s false, and therefore, given that $A$ and $B$ are true, $C$ must be true.

I could, however, have cast the argument in the following form with very minor changes in wording:

Assume $A$. Then $\lnot C\Rightarrow\lnot B$, which is logically equivalent to $B\Rightarrow C$, so $A\land B\Rightarrow C$.

Specifically, I could have written this for the last paragraph:

Fix $a\in G$. Then $a\in G_n$ for each $n\in\Bbb N$, so $\orb(a)\cap U_n\ne\varnothing$ for each $n\in\Bbb N$. This clearly implies that $\left\{n\in\Bbb Z^+:|f(na)|>\frac{\epsilon}2\right\}$ is infinite, and hence that $\lim_{n\to\infty}f(na)\ne 0$. That is, we’ve shown that if $f(x)\lnot\to 0$ as $x\to\infty$, then there is at least one $a>0$ such that $\lim_{n\to\infty}f(na)\ne 0$. This is logically equivalent to the assertion that if $\lim_{n\to\infty}f(na)=0$ for every $a>0$, then $f(x)\to 0$ as $x\to\infty$, which is what we wanted to prove.

-
I'm not certain I understand the last bit. How can the proof for this question contradict $\lim_{n\to\infty}f(na)=0$ if that is part of the statement of the question? – Xuan Huang Oct 14 '12 at 21:27
@Danielle: Because it’s a proof by contradiction. My very first step was assuming that $\lim_{x\to\infty}f(x)$ was not $0$, and that led me to the conclusion that $\lim_{n\to\infty}f(na)\ne 0$. This contradicts the hypotheses, so my initial assumption must be false, and $\lim_{x\to\infty}f(x)$ is $0$ after all. – Brian M. Scott Oct 14 '12 at 22:30
That's what I thought, but you seem to suggest in the end that $\lim_{n\to\infty}f(na)=0$ is contradicted instead of $\lim_{n\to\infty}f(na)\ne0$ being contradicted. Is this a typo? – Xuan Huang Oct 15 '12 at 13:21
@Danielle: No typo: it is $\lim_{n\to\infty}f(na)=0$ (for a particular $a>0$) that’s being contradicted. To get a contradiction I assumed that $\lim_{x\to\infty}f(x)\ne 0$. From this assumption I was able to show that there is an $a>0$ such that $\left\{n\in\Bbb Z^+:|f(na)|>\frac{\epsilon}2\right\}$ is infinite. This contradicts the hypothesis that $\lim_{n\to\infty}f(na)=0$. Since I got a contradiction by assuming that $\lim_{x\to\infty}f(x)\ne 0$, this assumption must be false, and in fact $\lim_{x\to\infty}f(x)=0$, which is what I wanted to prove. – Brian M. Scott Oct 15 '12 at 13:37
The question asks, however, how we can show that if ($\lim_{n\rightarrow\infty}(f(na))=0$) for all $a>0$ then $\lim_{x\rightarrow+\infty} f(x)=0$. So it doesn't make sense at all to me that you are proving that by contradicting the statement of the proof itself. Perhaps I am misunderstanding something? We are asked to show that $\lim_{x\to\infty}f(x)=0$ **when** $\lim_{n\to\infty}(f(na))=0.$ How can you prove $\lim_{x\to\infty}f(x)=0$ **when** $\lim_{n\to\infty}(f(na))=0$ when $\lim_{n\to\infty}(f(na))\ne 0$? – Xuan Huang Oct 16 '12 at 2:46

This is a standard (moderately tough) exercise in applying the Baire category theorem. Tim Gowers did a presentation of this result on his blog under the title "What is deep mathematics?".

But as he writes:

If you haven’t seen this before and want to get the most out of this post then you should (of course) make a serious attempt to solve this beautiful problem before reading on.

-
I am not sure I understand how to do the problem very well, as I have played with it a great deal, but to no avail. That is why I am asking. – Xuan Huang Oct 5 '12 at 13:26
In his post, Tim solves this with an elementary approache. Do you know where can I find a solution involving BCT? – Idan Oct 5 '12 at 17:52
@Idan: Read the comments. Matthew Folz gave an argument based on BCT. – kahen Oct 5 '12 at 18:42