Let $ n\in\mathbb{N}^{*} $. Let's factor the polynomial $ X^{2n}-1 $ :
Its zeros are $ \left\lbrace\operatorname{e}^{\mathrm{i}\frac{k\pi}{n}}\mid k\in\left[\!\left[0,2n-1\right]\!\right]\right\rbrace$, thus, we can write the following : \begin{aligned}X^{2n}-1=\prod_{k=0}^{2n-1}{\left(X-\operatorname{e}^{\mathrm{i}\frac{k\pi}{n}}\right)}&=\left(X-1\right)\prod_{k=1}^{n-1}{\left(X-\operatorname{e}^{\mathrm{i}\frac{k\pi}{n}}\right)}\left(X+1\right)\prod_{k=n+1}^{2n-1}{\left(X-\operatorname{e}^{\mathrm{i}\frac{k\pi}{n}}\right)}\\ &=\left(X^{2}-1\right)\prod_{k=1}^{n-1}{\left(X-\operatorname{e}^{\mathrm{i}\frac{k\pi}{n}}\right)}\prod_{k=1}^{n-1}{\left(X-\operatorname{e}^{\mathrm{i}\frac{\left(2n-k\right)\pi}{n}}\right)}\\ &=\left(X^{2}-1\right)\prod_{k=1}^{n-1}{\left(X-\operatorname{e}^{\mathrm{i}\frac{k\pi}{n}}\right)\left(X-\operatorname{e}^{-\mathrm{i}\frac{k\pi}{n}}\right)}\\ X^{2n}-1&=\left(X^{2}-1\right)\prod_{k=1}^{n-1}{\left(X^{2}-2X\cos{\left(\frac{k\pi}{n}\right)}+1\right)}\end{aligned}
Thus, forall $ z\in\mathbb{C}\setminus \left\lbrace -1,1\right\rbrace $, we have : $$ \fbox{$\begin{array}{rcl}\displaystyle\frac{z^{2n}-1}{z^{2}-1}=\prod_{k=1}^{n-1}{\left(z^{2}-2z\cos{\left(\frac{k\pi}{n}\right)}+1\right)}\end{array}$} $$
Now, if we put $ z=\operatorname{e}^{\mathrm{i}\theta} $, for some $ \theta\in\mathbb{R}\setminus \pi\mathbb{Z} $, we have : $$ \small\frac{\operatorname{e}^{2\mathrm{i}n\theta}-1}{\operatorname{e}^{2\mathrm{i}\theta}-1}=\frac{\operatorname{e}^{\mathrm{i}n\theta}\left(\operatorname{e}^{\mathrm{i}n\theta}-\operatorname{e}^{-\mathrm{i}n\theta}\right)}{\operatorname{e}^{\mathrm{i}\theta}\left(\operatorname{e}^{\mathrm{i}\theta}-\operatorname{e}^{-\mathrm{i}\theta}\right)}=\operatorname{e}^{\mathrm{i}\left(n-1\right)\theta}\frac{\sin{\left(n\theta\right)}}{\sin{\theta}} $$
And : $$ \small\prod_{k=1}^{n-1}{\left(\operatorname{e}^{2\mathrm{i}\theta}-2\operatorname{e}^{\mathrm{i}\theta}\cos{\left(\frac{k\pi}{n}\right)}+1\right)}=\prod_{k=1}^{n-1}{2\operatorname{e}^{\mathrm{i}\theta}\left(\frac{\operatorname{e}^{\mathrm{i}\theta}+\operatorname{e}^{-\mathrm{i}\theta}}{2}-\cos{\left(\frac{k\pi}{n}\right)}\right)}=2^{n-1}\operatorname{e}^{\mathrm{i}\left(n-1\right)\theta}\prod_{k=1}^{n-1}{\left(\cos{\theta}-\cos{\left(\frac{k\pi}{n}\right)}\right)}$$
Thus : $$ \fbox{$\begin{array}{rcl}\displaystyle\frac{\sin{\left(n\theta\right)}}{\sin{\theta}}=2^{n-1}\prod_{k=1}^{n-1}{\left(\cos{\theta}-\cos{\left(\frac{k\pi}{n}\right)}\right)}\end{array}$} $$
Of caurse the result is true $ \forall n\in\mathbb{N}^{*} $, and $ \forall \theta\in\mathbb{R}\setminus \pi\mathbb{Z} $.