Proof of the polynomial mentioned by Gauss in his Disquisitiones Arithmeticae whose roots are $\cos(\frac{2\pi}{n}k)$ for $k = 0, 1, 2, \ldots, n-1 $. In his book Disquisitiones Arithmeticae in "Section VII. Equations defining sections of a circle" in Art. 337 (p. 408-409) Gauss briefly mentions the existence of a series of polynomials whose roots are the trigonometric functions evaluated at $ \frac{2\pi}{n}k$ for $k=0,1,\ldots, n-1$.
I have only been able to get an image of this page in Spanish, but it is easy to understand:
Screenshot of Article 337.
Does anyone know a proof?
This is what I have so far
Here I get a polynomial whose roots are $\cos(\frac{2\pi}{n}k)$ for $k = 0, 1, 2, \ldots, n-1 $ but I don't see how to get to the form in which Gauss expresses it.
 A: In the Disquisitiones Arithmeticae article $337$, Gauss asks
about the polynomial equations whose roots are the trigonometric
functions of the angles of the $n$-th roots of unity. That is,
let $\,\theta_k := 2\pi k/n\,$
(notice that Gauss uses $P$ to denote
$2\pi=4$ right angles). What is the polynomial
$\prod_{k=0}^{n-1}(x - \,f(\theta_k))\,$
where $\,f=\sin,\cos,\,$ or $\,\tan?$
Gauss labels these three cases as I, II, III.
Here is a small table of values including
scaled Chebyshev polynomials of the 1st kind
$$\begin{array}{c|c|c|c|c}
 n & \text{I:}\sin & \text{II:}\cos & \text{III:}\tan  & 2^{1-n}T_n(x)\\
\hline
 1 & x & x-1 & x & x\\
\hline
 2 & x^2 & x^2-1 & x^2 & x^2-\frac12 \\
\hline
 3 & x^3-\frac{3x}4 & x^3-\frac{3 x}4-\frac14 & x^3-3 x & x^3-\frac{3 x}4\\
\hline
 4 & x^4-x^2 & x^4-x^2 & \text{infinite} &
x^4-x^2-\frac18 \\
\end{array}$$
With case III,
If $4|n$, the tangent of some of the angles are infinite.
It seems that the polynomials in cases I and II differ by
a predictable constant. That is, the constant term for case
I is always $0$ since $\,\sin(0)\,$ is always a root. For
the case II polynomial, all of the terms are the same as
the case I polynomial if $4|n,$ otherwise they differ by
a nonzero constant term. Also, except for the
constant term, it seems the case I and II
polynomials are equal to $\,2^{1-n}T_n(x).$
Define the complex variable
$$ z:=u+iv=e^{i\theta}=\cos(\theta)+i\sin(\theta). $$
Raise this to the power $\,n\,$ to get
$$ z^n = e^{n i\theta} = \cos(n\theta)+i\sin(n\theta). $$
Use the binomial theorem to get
$$ (u+iv)^n = \sum_{m=0}^n {n \choose m}u^{n-m}(iv)^m. $$
Use complex conjugation of this to get
$$ \bar z^n = \sum_{m=0}^n {n \choose m}u^{n-m}(-1)^m(iv)^m. $$
Get the real part of the two expressions by
$$ T_n(\cos(\theta)) = \cos(n\theta) = \frac{z^n+\bar z^n}2 =
 \sum_{k=0}^{\lfloor n/2\rfloor}
 {n \choose 2k}u^{n-2k}(iv)^{2k} $$
where $\,m=2k\,$ and the odd $\,m\,$ sum terms
cancel.  Let $$  x := u=\cos(\theta),\,\, v=\sqrt{1-x^2}=\sin(\theta).$$
This implies your formula.
Similarly, define the two polynomial sequences
$$ U_n(x) := \frac{(1\!+\!i x)^n\!-\!(1\!-\!i x)^n}{2i},\;
V_n(x) := \frac{(1\!+\!i x)\!+\!(1\!-\!i x)^n}2.$$
Verify that if $\,x=\tan(\theta),\,$ then
$\, \tan(n\theta) = U_n(x)/V_n(x).\,$

case I:
The roots of $\,T_n(x) = 0\,$ are
$$ x_k = \cos\Big(\frac{2k+1}2\frac{\pi}n\Big)
 = \sin\Big(\frac{n+2k+1}4\frac{2\pi}n\Big),
\: 0\le k<n.$$
If $\,n\,$ is odd, then $\,x_k =
 \sin(\theta_{k/2}),\;
\frac{n+1}2\le k\le \frac{n-1}2+n.\,$
In a different order these are the same as
$\,\sin(\theta_k),\; 0\le k<n.\,$
If $\,n\,$ is even, use the identities
$$ 1+\cos(x) =2\cos(x/2)^2,\quad
1-\cos(x) = 2\sin(x/2)^2$$ to get that
the roots of $\,T_n(x) = (-1)^{n/2}\,$
are $\,\sin(\theta_k),\; 0\le k<n.\,$

case II:
The roots of $\,T_n(x) = 1\,$ are
$\,\cos(\theta_k),\; 0\le k<n$
using again the identity $\,1-\cos(x)
= 2\sin(x/2)^2.\,$

case III:
If $\,n\,$ is odd, the roots of $\,U_n(x) = 0\,$ are
$\,\tan(\theta_k),\; 0\le k<n.$
The polynomials $\,(-1)^{\frac{n-1}2}U_n(x)\,$
for $\,n\,$ odd are given by Gauss as
$$ x^n - {n \choose 2}x^{n-2} + {n\choose 4}x^{n-4}
 \pm \dots \pm nx$$
except the binomial coefficients are written
as rational fundtions of $\,n.$
