Proving $\frac{\sin n\theta}{\sin\theta}= 2^{n-1}\prod_{k=1}^{n-1}\left(\cos\theta-\cos\frac{\pi k}n\right)$ 
I have to prove $$\frac{\sin(n\theta)}{\sin(\theta)}= 2^{n-1}\prod_{k=1}^{n-1}\left(\cos(\theta)-\cos\left(\frac{\pi k}{n}\right)\right)$$

$$\sin(\theta) = \frac{e^{i\theta}-e^{-i\theta}}{2i}
,\qquad\sin(n\theta) = \frac{e^{in\theta}-e^{-in\theta}}{2i}.$$
So \begin{align*}
\frac{e^{in\theta}-e^{-in\theta}}{e^{i\theta}-e^{-i\theta}}
&
=\frac{e^{2in\theta}-1}{e^{2i\theta}-1}\cdot e^{-i\theta(n-1)}
\\ &
=\frac{(e^{2in\theta}-1)(e^{-2i\theta}-1)}{(e^{2i\theta}-1)(e^{-2i\theta}-1)}\cdot e^{-i\theta(n-1)}
\\ &
=\frac{e^{i\theta(n-1)}+e^{-\theta(n-1)}-e^{i\theta(n+1)}-e^{-i\theta(n+1)}}{2-e^{2i\theta}-e^{-2i\theta}}
\\ &
=\frac{\cos((n-1)\theta)-\cos((n+1)\theta)}{1-\cos(\theta)}.
\end{align*}
Can I get my desired result from here or I made a mistake?
 A: 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} $.
