# Showing that $\cos n\pi\theta$ is periodic unless $\theta$ is an even integer.

I am trying to show that $\cos n\pi\theta$ is periodic unless $\theta$ is an even integer.

I wish to provide a proof based on an example of the $\sin n\pi\theta$ case of the first result, I would appreciate if you could let me know if it is correct or what improvements could be made, I am somewhat doubt full about the last few steps of the irrational case.

If $\theta$ is rational then let $\theta = \frac {p} {q}$ and let $n = aq + b$ then $$\phi(n) = \cos n \frac{p}{q} \pi = \cos(ap\pi + \frac{bp}{q} \pi)$$ Since $a\in Z+$ so $$\cos(ap\pi + \frac{bp}{q} \pi) = (-1)^{ap}\cos(\frac{bp}{q} \pi)$$

Now if p is even as n increases from $0$ to $q-1$ then $\phi(n)$ takes the values $$1, \cos\frac{p}{q} \pi, \cos\frac{2p}{q} \pi, \dots, \cos\frac{(q-1)p}{q} \pi$$

These values repeat as n goes from $q$ to $2q -1$ hence $\phi(n)$ is cyclic.

Assuming if p is odd as n increases and is odd or even we get $np$ as odd or even determined by n and we observe cyclic values.

Let $\theta$ be irrational and without loss of generality be a constant in $0<\theta<1$. Since $|\phi(n)| < 1$ either it periodically or tends to a limit.

If $\cos n \theta \pi \rightarrow l$ so $$\cos (n+1) \theta \pi -\cos n\theta \pi = 2 \sin((n+\frac{1}{2})\theta\pi)\sin\frac{\theta\pi}{2} \rightarrow 0$$ Hence $$\sin((n+\frac{1}{2})\theta\pi) \rightarrow 0$$ then $$(n+\frac{1}{2})\theta = k_{n} + \frac{1}{2} + \epsilon_{n}$$ where $k_{n} \in Z$ and $\epsilon_{n}\rightarrow 0$. Hence $$\theta = k_{n} - k_{n-1} + \epsilon_{n} - \epsilon_{n-1} =l_{n}+\eta_{n}$$ where $l_{n} \in Z$ and $\eta_{n}\rightarrow 0$. This is impossible since $\theta$ is a constant and lies between $0 < \theta < 1$. So we have reached a contradiction.

If you could shed some light on the arguments provided in the proof from the entry of $k_{n}$ forwards that would be much appreciated.

-
(i) There's already a term for "oscillate finitely": periodic; (ii) it's clear $\phi(n)$ has period at most twice the denominator for $\theta$ rational, simply because $\sin$ and $\cos$ have period $2\pi$, so a large section of your question seems superfluous and distracting to me; (iii) "Since $|\phi(n)|<1$ either it oscillates finitely or tends to a limit." What makes you think that? – anon Apr 22 '12 at 1:50
@anon since we assumed $\theta$ is a constant between 0 and 1 hence $|cos\theta n \pi| = |\phi(n)| < 1$. Also purpose of the part 1 proof attempt was just to get feedback on the irrational case, would u recommend splitting this question into 2 questions ? – Comic Book Guy Apr 22 '12 at 2:28
I have made the edits as suggested. – Comic Book Guy Apr 22 '12 at 3:01
It's fine as one question. The issue is, you think that $|\phi(n)|<1$ implies $\phi$ either has a limit or finite period. This is not the case. In fact, even restricting our attention to prime $n$, the range of $\phi$ is dense in $[-1,1]$. (Its being dense in the interval demolishes the idea that $\phi$ could have a finite range or a limit.) – anon Apr 22 '12 at 3:11
$\cos n\pi\theta$ certainly is periodic if $\theta$ is an even integer. The sequence $1,1,1,\dots$ is periodic with period 1. – Gerry Myerson Apr 22 '12 at 3:53

I think anon has already pointed out the flaw, but as OP seems to disagree, here goes:

The proof can't be right, because what you are trying to prove is nonsense. $\cos n\pi\theta$ is periodic if and only if $\theta$ is rational. It is possible for a sequence to be bounded, not periodic, and not converge to a limit, and that's what happens to these sequences when $\theta$ is irrational.

As an example of a sequence that is bounded by 1, not periodic, and not convergent (though not arising from $\cos n\pi\theta$, consider the sequence $$.1,.2,.1,.1,.2,.1,.1,.1,.2,.1,.1,.1,.1,.2,\dots$$

Maybe the difficulty is in that term, "oscillate finitely." Is that the phrase G H Hardy uses? If so, does he define it somewhere?

-
Firstly thank you very much for your answer. Yes G.H.Hardy does indeed define the term here it goes. "If $\phi(n)$ oscillates as n tends to $\inf$, then $\phi(n)$ be said to oscillate finitely or infinitely according as it is or is not possible to assign, a number $K$ such that all the values of $\phi(n)$ are numerically less than K, i.e. $|\phi(n)| < K$ for all values of n. – Comic Book Guy Apr 22 '12 at 9:02
The original version of your question asked to show $\cos n\pi\theta$ oscillates finitely unless $\theta$ is an even integer. Now that statement is true, and easy: it's clearly bounded in absolute value, and it does oscillate (that is, it's not constant) unless $\theta$ is an even integer. Periodicity is a red herring; if I understand what GHH wrote, it has nothing to do with oscillation. And what is this "buddy" business? – Gerry Myerson Apr 22 '12 at 9:39
I guess i was trying to be nice, obviously i am hogging your time primarily for my educational benefit.Thanks a lot for your help. – Comic Book Guy Apr 22 '12 at 10:10
You're very welcome. You're not taking any more of my time than I'm willing to give, so don't worry about that. And it seems I read something into "buddy" that wasn't actually there. It seemed patronizing, but I accept that that was not the intention. – Gerry Myerson Apr 22 '12 at 10:49
If $\cos(n \pi \theta)$ is periodic, say with period $p$, that implies $\cos(p \pi \theta) = \cos(0) = 1$, so $p \pi \theta = 2 n \pi$ for some integer $n$, and then $\theta = 2 n/p$ is rational. – Robert Israel Jun 24 '12 at 18:56