Using the real factorizations…
Using the real factorizations $\ x^{2n}-1=(x-1)(x+1)\displaystyle\prod_{k=1}^{n-1}\left(x^2-2x\cos\frac{k\pi}n+1\right)$ and $\ x^{2n+1}-1=(x-1)\displaystyle\prod_{k=1}^{n}\left(x^2-2x\cos\frac{2k\pi}{2n+1}+1\right)$, prove: $\quad1^{\circ}\,\, \displaystyle\prod_{k=1}^{n-1}\sin\left(\frac{k\pi}{2n}\right)=\frac{\sqrt n}{2^{n-1}};\qquad 2^{\circ}\,\, \displaystyle\prod_{k=1}^{n}\cos\left(\frac{k\pi}{2n+1}\right)=\frac1{2^n}.$
Explanation of Method
Both factorizations come from grouping the $N$-th roots of unity into conjugate pairs $e^{\pm i\theta}$, each pair contributing a real quadratic factor $x^2-2x\cos\theta+1$. Substituting a convenient value of $x$ into each factorization — and using the classical lemma $\prod_{k=1}^{N-1}\sin\frac{k\pi}N=\dfrac N{2^{N-1}}$ for part $1^{\circ}$ — turns the polynomial identity into a trigonometric product identity.
Part $1^{\circ}$ · $\displaystyle\prod_{k=1}^{n-1}\sin\frac{k\pi}{2n}=\frac{\sqrt n}{2^{n-1}}$
Step 1 · The classical lemma
For any integer $N\ge2$, the roots of $x^N=1$ other than $x=1$ are $e^{2\pi ik/N}$, $k=1,\ldots,N-1$, so $\dfrac{x^N-1}{x-1}=\displaystyle\prod_{k=1}^{N-1}\left(x-e^{2\pi ik/N}\right)$. Setting $x=1$ (as a limit) gives $N=\displaystyle\prod_{k=1}^{N-1}\left(1-e^{2\pi ik/N}\right)$. Writing $1-e^{i\varphi}=-2i\sin\frac\varphi2\,e^{i\varphi/2}$ with $\varphi=\frac{2\pi k}N$ and taking absolute values:
$$ N=\prod_{k=1}^{N-1}2\sin\frac{k\pi}N \qquad\Longrightarrow\qquad \prod_{k=1}^{N-1}\sin\frac{k\pi}N=\frac N{2^{N-1}} $$
Step 2 · Apply the lemma with $N=2n$
$$ \prod_{k=1}^{2n-1}\sin\frac{k\pi}{2n}=\frac{2n}{2^{2n-1}}=\frac n{4^{n-1}} $$
Step 3 · Pair the factors by symmetry
Since $\sin\!\left(\frac{(2n-k)\pi}{2n}\right)=\sin\!\left(\pi-\frac{k\pi}{2n}\right)=\sin\frac{k\pi}{2n}$, the product over $k=1,\ldots,2n-1$ splits into the middle term $k=n$ (giving $\sin\frac\pi2=1$) and $n-1$ repeated pairs:
$$ \prod_{k=1}^{2n-1}\sin\frac{k\pi}{2n}=\left(\prod_{k=1}^{n-1}\sin\frac{k\pi}{2n}\right)^2\cdot1 $$
Step 4 · Solve for the half-product
$$ \left(\prod_{k=1}^{n-1}\sin\frac{k\pi}{2n}\right)^2=\frac n{4^{n-1}} $$
and since every factor $\sin\frac{k\pi}{2n}$ with $1\le k\le n-1$ satisfies $0<\frac{k\pi}{2n}<\frac\pi2$, all factors are positive, so we may take the positive square root:
$$ \boxed{\prod_{k=1}^{n-1}\sin\frac{k\pi}{2n}=\frac{\sqrt n}{2^{n-1}}} $$
Part $2^{\circ}$ · $\displaystyle\prod_{k=1}^{n}\cos\frac{k\pi}{2n+1}=\frac1{2^n}$
Step 1 · Substitute $x=-1$ into the odd factorization
$$ x^{2n+1}-1=(x-1)\prod_{k=1}^{n}\left(x^2-2x\cos\frac{2k\pi}{2n+1}+1\right) $$
At $x=-1$: the left side is $(-1)^{2n+1}-1=-2$, and $x-1=-2$, so:
$$ -2=-2\prod_{k=1}^{n}\left(1+2\cos\frac{2k\pi}{2n+1}+1\right)=-2\prod_{k=1}^{n}2\left(1+\cos\frac{2k\pi}{2n+1}\right) $$
Step 2 · Solve for the product of $(1+\cos)$ terms
$$ \prod_{k=1}^{n}\left(1+\cos\frac{2k\pi}{2n+1}\right)=\frac1{2^n} $$
Step 3 · Convert to a cosine using the half-angle identity
Using $1+\cos2\theta=2\cos^2\theta$ with $\theta=\dfrac{k\pi}{2n+1}$:
$$ \prod_{k=1}^{n}2\cos^2\left(\frac{k\pi}{2n+1}\right)=\frac1{2^n} \qquad\Longrightarrow\qquad 2^n\prod_{k=1}^n\cos^2\left(\frac{k\pi}{2n+1}\right)=\frac1{2^n} $$
$$ \prod_{k=1}^n\cos^2\left(\frac{k\pi}{2n+1}\right)=\frac1{4^n} $$
Step 4 · Take the square root
For $1\le k\le n$, the angle $\dfrac{k\pi}{2n+1}<\dfrac{n\pi}{2n+1}<\dfrac\pi2$, so every factor $\cos\frac{k\pi}{2n+1}$ is positive, and the square root is taken without a sign ambiguity:
$$ \boxed{\prod_{k=1}^n\cos\left(\frac{k\pi}{2n+1}\right)=\frac1{2^n}} $$
This holds for every positive integer $n$ — there is no alternating sign or parity restriction on $n$.
Verification
| $n$ | $1^{\circ}$: $\prod\sin(k\pi/2n)$ | $2^{\circ}$: $\prod\cos(k\pi/(2n+1))$ |
|---|---|---|
| $2$ | $0.70711\approx\sqrt2/2$ ✓ | $0.5=1/4$ ✓ |
| $4$ | $0.25=\sqrt4/8$ ✓ | $0.0625=1/16$ ✓ |
| $6$ | $0.07655\approx\sqrt6/32$ ✓ | $0.01563=1/64$ ✓ |
Both formulas were checked numerically for $n=1,\ldots,7$, to full floating-point precision.
Result
Both products follow from evaluating the real factorizations of $x^N-1$ at a special point ($x=1$ for the sine lemma, $x=-1$ for the cosine product) and using pairing symmetries to reduce to positive real quantities.