17

Show that $\{\cos\ n:n \in \mathbb{N}\}$ is dense in $[-1,1]$ by using the fact below:

Suppose $x$ is irrational. Then there exists $p_n,q_n \in \mathbb{Z}$ such that $\bigg|x -\frac{p_n}{q_n}\bigg| < \frac{1}{q_n^2}$

I have no idea on how to apply the fact above to show the set is dense in $[-1,1]$. Can anyone help me?

Idonknow
  • 15,643

4 Answers4

5

We have that $|\cos x-\cos y|\le |x-y|$ for all $x,y$, by the mean value theorem. This can also be established without calculus; see here for the analogous proof for $|\sin x-\sin y|\le |x-y|$.

We know that $\cos(x)$ takes all values between $-1$ and $1$ as $x$ varies between $0$ and $2\pi$, so given $t\in[-1,1]$ begin by finding $x$ in $[0,2\pi)$ with $\cos x=t$. Fix $\epsilon>0$. We want to show that there is an $n$ such that $|t-\cos n|<\epsilon$. Note that $\cos (x+2\pi m)=t$ as well for any $m\in\mathbb Z$. If, for some $n$, $|(x+2\pi m)-n|<\epsilon$, we are done, since $$ |t-\cos n|=|\cos(x+2\pi m)-\cos n|\le|(x+2\pi m)-n|<\epsilon. $$ (The sign of $n$ is irrelevant here, since $\cos(n)=\cos(-n)$.)

Suppose then that this is not the case. Fix $k$ with $1/k<\epsilon$, so we are assuming that $(x+2\pi m)-n|\ge 1/k$ for any $m,n$. Consider the sequence $x_m=\{2\pi m\}$, where $\{r\}$ denotes the fractional part of $r$. There must be $m<l$ such that $|x_m-x_l|<1/k$. This is simply because if we look at more than $N$ numbers between $0$ and $1$, two of them must be within $1/N$ of each other. Since $\pi$ is irrational, we also have $0<|x_m-x_l|$. Finally, note that $|x_m-x_l|=|2\pi(m-l)+c|$ for some integer $c$.

Write $s$ for $|x_m-x_l|$. Now look at the numbers $x,x+s,x+2s,x+3s,\dots$. Since all of them have the form $x+2\pi a+b$ for some $a,b\in\mathbb Z$, we must have that they are all at distance at least $1/k$ from any integer. Given $n\in\mathbb N$, let $M\in\mathbb Z$ be such that $M+1/k\le x+ns\le M+1-1/k$. Note that $M+1/k< x+(n+1)s< M+1$, since $0<s<1/k$. But then $x+(n+1)s\le M+1-1/k$ as well. This is of course absurd, because by induction it means that if $M+1/k\le x\le M+1-1/k$, then the same inequalities hold replacing $x$ with $x+ns$ for any $n\in\mathbb N$.

The above appears to avoid the density fact you are given (Dirichlet's approximation theorem), though the argument in the third paragraph is just its proof. If one wants to use the density fact explicitly, note that $2\pi$ is irrational, so there are arbitrarily large $q$ for which there is a $p$ with $$ \left|2\pi-\frac pq\right|<\frac1{q^2}. $$ Pick such a $q$ large enough so that $1/q<\epsilon$, let $s=|2\pi q-p|$, and proceed with the fourth paragraph.

  • Your statement of Dirichlet is wrong (the correct version - if one adds $q_n\to\infty$ - is in the problem statement). For $x=\sqrt 2$ and $q=4$ there is no integer $p$ with $\left|\sqrt 2-\frac p4\right|<\frac1{16}$. – Hagen von Eitzen Jan 30 '14 at 07:25
  • You are right. Fixed now. – Andrés E. Caicedo Jan 30 '14 at 07:26
  • 1
    @AndresCaicedo: Why can we write $x=zq$? Also what is $z$? is it irrational? – Idonknow Jan 30 '14 at 07:50
  • You first define $z$ through $x=zq$ where $x$ and $q$ are fixed, and then try to find $p$ and $q$ such that... There seems to be something wrong in this. If it is another $q$ now, then this does not imply $|x-p|<\epsilon$, but if it is the same, then it is equivalent to writing find $q$ large enough so that $|x/q-p/q|<1/q^2$, which you cannot possibly do for arbitrary $x$ and large enough $q$. – Vadim Jan 30 '14 at 08:07
  • Yes, that was circular, of course. It felt too easy to be right. I'll write a correct version in the morning. – Andrés E. Caicedo Jan 30 '14 at 08:18
  • (Hopefully fixed now. I'm making this CW since it is just Harald's hint fleshed out.) – Andrés E. Caicedo Jan 30 '14 at 09:11
  • Seems OK now. Though I am still wondering if we could avoid approximating irrational numbers. – Vadim Jan 30 '14 at 14:59
  • I have posted an alternative way to prove this, which seems to avoid the necessity to approximate any particular irrational number (provided it is correct, of course). – Vadim Jan 30 '14 at 16:03
  • @Vadim, your solution is approximating $2\pi$, and using its irrationality, isn't it? – Andrés E. Caicedo Jan 30 '14 at 16:34
  • @AndresCaicedo Could you kindly explain why $|x_m-x_l|=|2\pi(m-l)+c|$ for some integer $c$? – ireallydonknow Feb 02 '14 at 15:58
  • @ireallydonknow By definition, $x_m$ is $2\pi m-n$, where $n$ is the integer part of $2\pi m$. Same for $x_l$. – Andrés E. Caicedo Feb 02 '14 at 16:37
  • Just wondering does the fact given in the question implies that we can approximate all the numbers between [-1,1] with 2\pix. If so, doesn't that straight away imply that sin x is dense? Why do you have to go through such a complicated proof? – user10024395 Apr 21 '14 at 06:15
  • @user136266 Precisely what form of approximation do you have in mind? The range of sine is not just dense, it is all of $[-1,1]$. How exactly is that giving us that ${\sin(n)\mid n\in\mathbb N}$ is dense? How exactly does knowing that this set is dense give us that also $A={\cos(n)\mid n\in\mathbb N}$ is dense? It appears to me that if one tries to prove that $A$ is dense in the most straightforward way possible, one is led to something pretty close to the proof above. In that sense, it is not a complicated proof, but the natural approach. – Andrés E. Caicedo Apr 21 '14 at 06:47
  • In similar way can we say that the set ${\sin n:n\in \mathbb N}$ is dense in $[-1,1]$ ? – Empty Jan 19 '15 at 06:20
  • @Panja.S. Yes, the same argument works. – Andrés E. Caicedo Jan 19 '15 at 19:21
3

Hint: $\pi$ is irrational, and the cosine function has period $2\pi$. Try to approximate any $\theta\in[0,2\pi]$ with numbers of the form $n-2m\pi$, for integers $m$, $n$.

3

Suppose this is not true. Then there is an open interval $V$ in $[-1,1]$ such that $\cos\mathbb{N}\cap V=\emptyset$. Since $\cos:[0,\pi]\rightarrow[-1,1]$ is continuous and surjective, the preimage $U=\cos^{-1}V$ is a non-empty open set in $[0,\pi]$ such that for every $n,m\in\mathbb{Z}$: $n-2\pi m\not\in U$. Since $U$ is open and non-empty, it contains an $\epsilon$-width subinterval $\Delta$ for some $\epsilon>0$. If we show that some point $n-2\pi m$ falls into $\Delta$, this will lead to contradiction.

Using the fact stated in the problem, for any $N$ there are $p,q\in\mathbb{Z}$ such that $q>N$ and $0<|2\pi-\frac{p}{q}|<\frac{1}{q^2}$ or $0<\delta=|2\pi q-p|<\frac{1}{q}$. Let's choose $N$ large enough, so that $\delta<\frac{1}{q}<\frac{1}{N}<\epsilon$. Then, for some $k\in\mathbb{N}$: $|2\pi\cdot kq-kp|=k\delta$ falls into the $\epsilon$-width subinterval $\Delta$. We may choose the signs of $q$ and $p$ so that $0<2\pi\cdot kq-kp=k\delta\in\Delta\subseteq U$. This contradiction concludes the proof.

Vadim
  • 5,637
0

This is the accepted answer but it is an abridged version.

Since the function cosine is continuous and even it is enough to show that the set of the smallest angle of the integers , defined below, are dense in $ (0,2\pi)$.

$\overline{\underline{n}}:=n-2\pi p_n$ such that $p_n$ is the only integer such that $0\leq \overline{\underline{n}}< 2\pi $.

Arguing by contradiction, suppose that there is a $\theta\in (0,2\pi)$ and a $k\in \mathbb{N}$, such that $\overline{\underline{q}}\notin\left(\theta-\frac{1}{k},\theta+\frac{1}{k}\right)$ for every $q\in \mathbb{Z}$.

Since there are infinity angles $\overline{\underline{n}}$ in the interval $(0,2\pi)$ and no repetitions since $\pi$ is irrational. Two of these numbers satisfies $0<|\overline{\underline{n}}-\overline{\underline{m}}|\leq 1/k$, let's call this small positive number $\epsilon$.

It is not difficult to see that there is a positive integer $r\in \mathbb Z$ such that $r\epsilon\in\left(\theta-\frac{1}{k},\theta+\frac{1}{k}\right)$.

Notice that $r\epsilon=|r(m-n)-2\pi(p_m-p_n)|$, that is, $r\epsilon=\overline{\underline{q}}$ for some $q \in \mathbb{Z}$, absurd since we assumed that there is no $\overline{\underline{q}}$ in this interval near to $\theta$.

checkmath
  • 4,651
  • 1
  • 28
  • 47