Explicit Galois theory computation in cyclotomic field 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.
 A: First of all, $\zeta^{4p} = -1$, so $\tau(\zeta)=-\zeta^{-1}$, and $\tau$ is an involution.
Also, $i = \zeta^{2p}$, so 
$$
\tau(i) = \tau(\zeta^{2p}) = \tau(\zeta)^{2p} = (-\zeta^{-1})^{2p} = \zeta^{-2p} = i^{-1} =-i.
$$
Thus
$$
\tau(i^{p}) = (-i)^{p} 
= 
\begin{cases} 
-i & \text{if $p \equiv 1 \pmod{4}$}\\ 
i  & \text{if $p \equiv -1 \pmod{4}$}
\end{cases}
$$
Now the $k$-th factor in the product is fixed by $\tau$ for $k$ even, and changes sign when $k$ is odd. There are $(p+1)/2$ odd numbers in $1, \dots, p$, so 
$$
\text{the product}\quad
\begin{cases}
\text{changes sign}&\text{if $p \equiv 1 \pmod{4}$,}\\
\text{is fixed}& \text{if $p \equiv -1 \pmod{4}$.}
\end{cases}
$$
All in all, and barring mistakes, it seems that your $x$ is indeed fixed.
A: $$\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.
