TITLE: Compute $\limsup |\sin^n (n)|$
QUESTION [7 upvotes]: In the Scottish Book, there is a question posed by Stanislaw Hartman, which goes as follows:

It is easy to see that $\liminf |\cos^n n| = \liminf |\sin^n n| = 0$. A bit harder is to prove $\limsup|\cos n|^n = 1$ and $\limsup|\sin n|^n = 1$. Find $\liminf(\cos n)^n$, $\liminf(\sin n)^n$, and $\limsup(\sin n)^n$.

For the time being, I can see easily why the first two equalities hold. But how does one prove $\limsup|\cos n|^n = 1$ and $\limsup|\sin n|^n = 1$?
My attempt for $\sin$: Try to find $|\sin n|$ arbitrarily close to $1$. Let $d$ sufficiently small be given and suppose we want to find $n$ so that $|\sin n| > 1-d$. Since $\sin(\frac{\pi}{2} - x) = \cos x \geq 1-\frac{x^2}{2}$, we proceed with finding $$n\in \left(\frac{\pi}{2} - \sqrt{2d}, \frac{\pi}{2} + \sqrt{2d}\right) \mod 2\pi.$$
This reduces to finding $n,k\in\mathbb{Z}$ such that
$$\left|n - k(2\pi) - \frac{\pi}{2}\right| \leq \sqrt{2d}.$$
It looks like a Dirichlet approximation theorem at this point, but what I need is a bound on $n$ in terms of $d$. I tried using the Pigeonhole Principle (which would elucidate a bound like the below), but I got stuck.
The idea is (naively, I think it's possible) to obtain a bound that looks something like
\begin{align*}
|n| \leq \frac{M}{\sqrt{d}},
\end{align*}
from which the proof is easy to complete.
Any ideas on how to bridge this gap to obtain such a bound? Thanks in advance!
Edits: Typographical errors.

REPLY [2 votes]: Some years ago, I thought long and hard about this problem. Using an identity from Analytic Number Theory (which is sometimes used to prove the large-sieve estimates). More generally, I can prove that for any irrational number $x \in \mathbb{R}$ the sequence $\sin(2 \pi x n)^n$ has a subsequence with limit $1$. (Since this sequence converges in $L^p$ towards zero, this gives an example for $L^p$-convergence, but not $\lambda$-a.s. convergence.)
In fact, I have asked this question myself here. Here, is the translation:
Let $f \colon [0,1] \rightarrow \mathbb{C}$ be a continuous differentiable function. Then we have the identity (for $x\in [0,1]$) 
$$f(x) = \int_0^1 f(t) \, \rm{d} t+ \int_0^1 \rho(x,t) f'(t) \, \rm{d} t,$$
where
$$\rho(x,t) = \begin{cases} t & \text{if} \ t \leq x \\ (t-1) & \text{if} \ t > x\end{cases}.$$
We apply this to $f(x) = \sin(2\pi n x)^n$ and get
$$\sin(2 \pi x n)^n = \int_0^1 \sin(2\pi n t)^n \, \rm{d} t+ 2 \pi n^2 \int_0^1 \rho(x,t) \cos(2\pi t n) \sin(2\pi t n)^{n-1} \, \rm{d} t.$$
For $n \rightarrow \infty$ it is easy to see that the first integral converges to zero, that is $L^1$-convergence. Next, I am going to rewrite the second integral in order to seperate the main term.
First we use the periodicty of the sine-functions in order to get
\begin{align}
\int_0^1 \rho(x,t) n^2 \cos(2\pi t n) \sin(2 \pi t k)^{k-1} \, \mathrm{d} t &= \int_0^n \rho(x,s/n) n \cos(2 \pi s) \sin(2 \pi s)^{n-1} \, \mathrm{d} s \\ &= \int_0^1 n \cos(2 \pi s) \sin(2 \pi s)^{n-1} \sum_{i=0}^{n-1} \rho\left(x,\frac{i+s}{n} \right) \, \mathrm{d} s.
\end{align}
Next, we calculate the sum as follows
\begin{align}
\sum_{i=0}^{n-1} \rho\left( x,\frac{i+s}{n} \right) &= \sum_{i=0}^{n-1} \frac{i+s}{n} - \sum_{i=\lfloor nx -s \rfloor+1}^{n-1} 1 \\
&=s+ \frac{(n-1)n}{2n} - ((n-1)- \lfloor nx -s \rfloor) = xn - \frac{n-1}{2} - \{xn-s\}
\end{align}
Using $\int_0^1 \cos(2\pi s) \sin(2\pi s)^{n-1} \, \rm{d} s =0$, we can simplfy the second integral and get that the second-last term is equal to
$$-\int_0^1 n \cos(2 \pi s) \sin(2 \pi s)^{n-1} \{xn-s\} \, \mathrm{d} s.$$
Since $x=(2\pi)^{-1}$ is irrational, we can find a sequence $(n_k)_{k \in \mathbb{N}}$ with $\{x n_k \} \rightarrow \theta$, where $\theta =1/4$. Since
$$|\{x k_n -s\} - \{\theta -s\}| \leq \{x k_n -\theta\} = | \{x n_k\} - \theta| = \varepsilon_k \rightarrow 0,$$
we can conclude
\begin{align}
 &\left| \int_0^1 2 \pi n_k \cos(2\pi s) \sin(2 \pi s)^{n_k-1} (\{x n_k -s\} - \{\theta-s\}) \, \mathrm{d} s \right| \\ &\leq \varepsilon_k 2 \pi \int_0^1 n_k |\cos( 2 \pi s)| \cdot |\sin(2\pi s)|^{n_k-1} \, \mathrm{d} s \\ &= 4 \varepsilon_k \int_0^{1/4} 2 \pi n_k \cos(2\pi s) \sin(2\pi s)^{n_k-1} \, \mathrm{d} s = 4 \varepsilon_k \rightarrow 0.
\end{align}
Therefore, it remains to determine the limit of
$$\int_0^1 2 \pi n_k \cos( 2 \pi s) \sin(2 \pi s)^{n_k-1} \{\theta-s\} \, \mathrm{d} s$$
Here, we have
$$\{\theta-s\} = \begin{cases} \theta -s & \text{if } s < \theta \\ 1 +\theta -s & \text{otherwise} \end{cases}$$
and (as above) we see that the integral over $\theta$ vanishes. Moreover, by partial integration, we find that
$$ \int_0^1 s 2 \pi n_k \cos(2 \pi s) \sin(2 \pi s)^{n_k-1} \, \mathrm{d} s = - \int_0^1 \sin(2 \pi s)^{n_k} \,\mathrm{d} s \rightarrow 0.$$
Taking all together, we see that only the term
$$-2 \pi n_k \int_\theta^1 \cos(2\pi t) \sin(2\pi t)^{n_k-1} \, \rm{d} t = 1 $$
contributes.