If $p$ is an odd prime, how to decide the value of $\prod_{i=1}^{(p-1)/2} \cos(2i\pi / p)$

69 Views Asked by At

This question is taken from A Classical Introduction to Modern Number Theory by Kenneth Ireland and Michael Rosen, exercise 32, chapter 5.

The original question asks one to prove $(2/p) = \prod_{j=1}^{\frac{p-1}{2}}2\cos(2\pi j / p)$ where the left hand side is the Legendre symbol.

Now I could tell from the text that

$$ \begin{align} \left(\frac{2}{p}\right) &= \prod_{j=1}^{(p-1)/2} \frac{2i\sin(\frac{4\pi j}{p})}{2i\sin(\frac{2\pi j}{p})} \\ &= \prod_{j=1}^{(p-1)/2} \frac{2\cos(\frac{2\pi j}{p})\sin(\frac{2\pi j}{p})}{\sin(\frac{2\pi j}{p})} \\ &= \prod_{j=1}^{(p-1)/2}2\cos(2\pi j / p) \end{align} $$

However I wonder whether one could evaluate the right hand side directly to get $(-1)^{\frac{p^2-1}{8}}$.

It seems interesting to note that $2\cos(2j\pi/p) = e^{2ij\pi / p} +e^{-2ij\pi/p} $ and $\{2\cos(2j\pi/p) \}$ is the orbit of $2\cos(2\pi / p)$ under Galios group $G(\mathbb{Q}(e^{2i\pi/p})/\mathbb{Q})$.

Edit: If one already knows the absolute value of $\prod_{j=1}^{(p-1)/2}2\cos(2\pi j / p)$, to determine the sign of result (-1 or 1) one need only to cound the number of $j$ such that $\frac{2j\pi}{p} > \frac{\pi}{2}$. The result is 1 if there are even terms and -1 if odd. There are $\frac{p-1}{2} - \lceil \frac{p}{4} + 1\rceil$ terms in total. One get $(-1)^{\frac{p^2 -1}{8}}$ by considering p's residual modulo 8 accordingly. This is, of course, not surprising considering one already uses Gauss lemma when proving $(2/p) = \prod_{j=1}^{\frac{p-1}{2}}2\cos(2\pi j / p)$. My futher question is that whether we could prove the right-hand-side of the equation directly to derive its absolute value ?