## Sine at Integer Values

Last Thursday, I was introducing to my students the notions of limit superior and limit inferior. In particular, I was emphasizing that a sequence $(x_{n})_{n=1}^{\infty}$ of reals may not converge, but $\limsup_{n\rightarrow\infty}x_{n}$ and $\liminf_{n\rightarrow\infty}x_{n}$ always exist in the extended real number system. After giving some fairly basic examples of such sequences, one student asked me what the $\limsup$ is of the sequence defined by

$\displaystyle x_{n}:=\sin(n),\indent\forall n\in\mathbb{Z}^{\geq0}$

I was a bit taken aback by the question because, aside from $\sin(0)$, I did not (and do not) know off the top of my head what the values $\sin(n)$ are. Nevertheless, I thought it was a great question–I love getting asked questions that require me to think a bit before answering–and asked the student if I could get back to him.

Well, it turns out that another one of my students also thought it was a great question and was eager to find out the answer himself. He did some investigating on Math.StackExchange, which led to the answer that

$\displaystyle\limsup_{n\rightarrow\infty}\sin(n)=1$

More interestingly, the set $\left\{\sin(n):n\in\mathbb{Z}^{\geq 0}\right\}$ is dense in $[-1,1]$. Proving this result is the goal of today’s post.

Lemma 1. If $\alpha\in\mathbb{R}$ is irrational, then the set

$\displaystyle\mathbb{Z}^{\geq 0}-\alpha\cdot\mathbb{Z}^{\geq 0}=\left\{n-\alpha m: n,m\in\mathbb{Z}\right\}$

is dense in $\mathbb{R}$.

Proof. Since every real number $x$ can be written as the difference

$x=\begin{cases}{y+2\pi l} & {x\geq 0}\\ {y-n} & {x<0}\end{cases}$

where $y\in[0,2\pi]$ and $l\in\mathbb{Z}^{\geq 0}$, we may assume that $x\in[0,2\pi]$. Fix $\theta\in [0,2\pi]$, and let $\varepsilon>0$ be given. Replacing $\varepsilon$ by a smaller $\varepsilon'>0$, if necessary, we may assume that $\varepsilon<1$. Choose $N\in\mathbb{N}$ sufficiently large so that $\frac{2\pi}{N}<\epsilon$. Partition the interval $[0,2\pi]$ into $N$ intervals of length $\frac{2\pi}{N}$ given by

$\displaystyle\left(\frac{2\pi j}{N},\frac{2\pi(j+1)}{N}\right],\indent\forall j=0,\cdots,N-1$

By the pigeonhole principle, there exist two distinct natural numbers $n_{1},n_{2}$ such that

$\displaystyle n_{1}-2m_{1}\pi,n_{2}-2m_{2}\pi\in\left(\frac{2\pi j}{N},\frac{2\pi(j+1)}{N}\right]$

for some $j\in\left\{0,\cdots,N-1\right\}$ and natural numbers $m_{1},m_{2}\in\mathbb{N}$. Since $\pi$ is irrational, $n_{1}-2\pi m_{1}\neq n_{2}-2\pi m_{2}$. Without loss of generality, we may assume $n_{1}>n_{2}$ so that

$\displaystyle n_{1}-2\pi m_{1}>n_{2}-2\pi m_{2}\Longrightarrow \delta:=(n_{1}-n_{2})-2\pi(m_{1}-m_{2})>0$

Observe that $m_{1}>m_{2}$, since $\pi$ is irrational. Since the disjoint half-open intervals

$\displaystyle\left(k\delta,(k+1)\delta\right],\indent\forall k=0,\cdots,M-1$

contain $[0,2\pi]$, for $M\in\mathbb{N}$ satisfying $M\delta>2\pi$, we see that there exists $k\in\left\{0,\cdots,M\right\}$ such that

$\displaystyle x\in\left(k\delta,(k+1)\delta\right]$

Setting $n=k(n_{1}-n_{2})$ and $m=k(m_{1}-m_{2})$, we conclude that $\left|x-(n-2\pi m)\right|<\varepsilon$. $\Box$

Lemma 2. $\pi$ is irrational.

The following proof is due to British mathematician Mary Cartwright.

Proof. For each $n\in\mathbb{Z}^{\geq 0}$, define

$\displaystyle I_{n}(x):=\int_{-1}^{1}(1-u^{2})^{n}\cos(xu)du,\indent\forall x\in\mathbb{R}$

Observe that

$\displaystyle I_{0}(x)=\int_{-1}^{1}\cos(xu)du=x^{-1}\sin(xu)\mid_{u=-1}^{u=1}=x^{-1}[\sin(x)-\sin(-x)]=2x^{-1}\sin(x)$

and

$\begin{array}{lcl}I_{1}(x)=\displaystyle\int_{-1}^{1}(1-u^{2})\cos(xu)du&=&\displaystyle x^{-1}(1-u^{2})\sin(xu)\mid_{u=-1}^{u=1}+x^{-1}\displaystyle\int_{-1}^{1}2u\sin(xu)du\\[.9 em]&=&-2x^{-2}u\cos(xu)\mid_{u=-1}^{u=1}\displaystyle+2x^{-2}\int_{-1}^{1}\cos(xu)du\\[.9 em]&=&-\displaystyle4x^{-2}\cos(x)+4x^{-3}\sin(x)\end{array}$

We can integrate by parts twice to obtain a recurrence relation for $I_{n}$, with $n\geq2$. Indeed,

$\begin{array}{lcl}I_{n}(x)&=&x^{-1}(1-u^{2})^{n}\sin(xu)\mid_{u=-1}^{1}+x^{-1}\int_{-1}^{1}2nu(1-u^{2})^{n-1}\sin(xu)du\\[.7 em]&=&-\displaystyle x^{-2}2nu(1-u^{2})^{n-1}\cos(xu)\mid_{u=-1}^{1}+x^{-2}\int_{-1}^{1}2n\left[(1-u^{2})^{n-1}-2(n-1)u^{2}(1-u^{2})^{n-2}\right]\cos(xu)du\\[.7 em]&=&\displaystyle(2n+4n(n-1))x^{-2}\int_{-1}^{1}(1-u^{2})^{n-1}\cos(xu)du-4n(n-1)x^{-2}\int_{-1}^{1}(1-u^{2})^{n-2}\cos(xu)du\\[.7 em]&=&\displaystyle2n(2n-1)x^{-2}I_{n-1}(x)-4n(n-1)x^{-2}I_{n-2}\end{array}$

For each $n\in\mathbb{N}$, set $J_{n}(x):=x^{2n+1}I_{n}(x)$, so that the above recurrence relation can be restated as

$\displaystyle J_{n}(x)=2n(2n-1)J_{n-1}(x)-4n(n-1)x^{2}J_{n-2}(x),\indent\forall n\geq2$

and $J_{0}(x)=2\sin(x), J_{1}(x)=-4x\cos(x)+4\sin(x)$.

By induction, it follows that for each $n\in\mathbb{Z}^{\geq0}$,

$\displaystyle J_{n}(x)=x^{2n+1}I_{n}(x)=n!\left[P_{n}(x)\sin(x)+Q_{n}(x)\cos(x)\right]$,

where $P_{n}$ and $Q_{n}$ are polynomials with integer coefficients and degree $\leq 2n$. Suppose that $\pi$ is rational so that $\frac{\pi}{2}=\frac{b}{a}$, where $a,b\in\mathbb{N}$. Since $\deg(P_{n})\leq 2n$, we see that the RHS of the equation

$\displaystyle\frac{b^{2n+1}}{n!}I_{n}\left(\frac{\pi}{2}\right)=P_{n}\left(\frac{\pi}{2}\right)a^{2n+1}$

is an integer. Since the integrand in the definition of $I_{n}(\frac{\pi}{2})$ is nonnegative and bounded by $1$, we see that $0< I_{n}(\frac{\pi}{2})<2$ for all $n\in\mathbb{Z}^{\geq0}$. As $n\rightarrow\infty$, the expression

$\displaystyle\frac{b^{2n+1}}{n!}I_{n}\left(\frac{\pi}{2}\right)\rightarrow0$,

So for sufficiently large $n$, there exists an integer $P_{n}(\frac{\pi}{2})a^{2n+1}\in(0,1)$, which is a contradiction. $\Box$

Now that we know that $\pi$ is irrational, and therefore $2\pi$ is irrational, we can complete the proof that countable set $\left\{\sin(n):n\in\mathbb{Z}^{\geq 0}\right\}$ is dense in $[-1,1]$. Fix $x\in[-1,1]$. Since $\sin()$ is a continuous function, by the intermediate value theorem, there exists $\theta\in[0,2\pi]$ such that $x=\sin(\theta)$. By lemma 2, there exist integers $n,m\in\mathbb{Z}^{\geq 0}$ such that $\left|\theta-(n-2\pi m)\right|<\delta$, for $\delta>0$ given. Since $\sin()$ is continuous, for $\varepsilon>0$ given, there exists $\delta>0$ such

$\displaystyle\left|\theta-\theta'\right|<\delta\Longrightarrow\left|\sin(\theta)-\sin(\theta')\right|<\varepsilon$,

which implies that

$\displaystyle\left|x-\sin(n-2\pi m)\right|=\left|\sin(\theta)-\sin(n-2\pi m)\right|=\left|\sin(\theta)-\sin(n)\right|<\varepsilon$,

where we use the $2\pi$ periodicity of $\sin()$.