TITLE: Explicit Galois theory computation in cyclotomic field
QUESTION [7 upvotes]: Let $p$ be an odd prime. Let $\zeta=e^{\frac{\pi i}{4 p}}$, thus $\zeta$ is a primitive $8p$-th root of unity. There is a unique $\mathbb Q$-automorphism $\tau$ of the number field ${\mathbb K}={\mathbb Q}(\zeta)$ such that $\tau(\zeta)=\zeta^{4p-1}$. Consider the number
$$
x=\prod_{k=1}^{p} \tan\big(\frac{\pi k}{4 p}\big)=i^p \prod_{k=1}^{p} \frac{\zeta^k+\zeta^{-k}}{\zeta^k-\zeta^{-k}}
$$
Can anybody show that $x$ is fixed by $\tau$ (or find a counterexample) ? Perhaps this can be done by some simple algebra from the RHS above, but I could not find the way to do it.

REPLY [4 votes]: $$\tau x=\tau(i)^p\prod_{k=1}^p\frac{\zeta^{4kp-k}+\zeta^{-4kp+k}}{\zeta^{4kp-k}-\zeta^{-4kp+k}}=:I$$
But we have that
$$i=\zeta^{2p}\Longrightarrow \tau(i)^p=\tau\left(\zeta^{2p}\right)^p=\tau\left(\zeta\right)^{2p^2}=\zeta^{8p^3-2p^2}=e^{p^22\pi i}e^{-\frac{p\pi i}{2}}=\begin{cases}\;i&,\;\;\;p=1\pmod 4\\\!\!\!-i&,\;\;\;p=3\pmod 4\end{cases}$$
$$\zeta^{\pm(4kp-k)}=e^{\pm(k\pi i-\frac{k\pi i}{4p})}=(-1)^ke^{\mp\frac{k\pi i}{4p}}\Longrightarrow \zeta^{4kp-k}+\zeta^{-4kp+k}=$$
$$=(-1)^k\left(e^{-\frac{k\pi i}{4p}}+e^{\frac{k\pi i}{4p}}\right)=(-1)^k\left(\zeta^k+\zeta^{-k}\right)$$
Likewise, check what you get when you apply $\,\tau\,$ to the denominators...and you're done.