<s>[INST] $\left(\frac{\sin(\frac{n\theta}{2})}{\sin(\frac{\theta}{2})}\right)^2=\left|\sum_{k=1}^{|n|}e^{ik\theta}\right|^2$ I'm having trouble proving $$\left(\frac{\sin(\frac{n\theta}{2})}{\sin(\frac{\theta}{2})}\right)^2=\left|\sum_{k=1}^{|n|}e^{ik\theta}\right|^2$$ where $n\in\mathbb{Z}$ and $\theta\in\mathbb{R}$. Can anyone suggest a hint?
 [/INST] In order to proof 
$$\sum_{k=1}^{n}{\sin \left(\varphi + k\alpha \right)}=\frac{\sin\left(\frac{\left(n+1\right)\alpha}{2}\right)\cdot\sin\left(\varphi+\frac{n\alpha}{2}\right)}{\sin \frac{\alpha}{2}}$$
observe
$$\sin \frac{\alpha}{2}\cdot \sin \left(\varphi + k\alpha\right)=\frac{1}{2}\left[\cos \left(\varphi + k\alpha - \frac{\alpha}{2}\right)-\cos \left(\varphi+k\alpha+\frac{\alpha}{2}\right)\right]$$
because $\sin u \cdot \sin v = \frac{1}{2}\left[\cos \left(u-v\right) - \cos \left(u + v\right)\right]$.
Then $\sin \frac{\alpha}{2}\cdot\sum_{k=1}^{n}{\sin \left(\varphi + k\alpha \right)}$ is a telescopic series:
$$\sin \frac{\alpha}{2}\cdot\sum_{k=1}^{n}{\sin \left(\varphi + k\alpha \right)} = \frac{1}{2}\left[\cos \left(\varphi + \frac{\alpha}{2}\right)-\cos \left(\varphi + n\alpha +\frac{\alpha}{2}\right)\right].$$
And use $\sin u \cdot \sin v = \frac{1}{2}\left[\cos \left(u-v\right) - \cos \left(u + v\right)\right]$ again in order to reduce the last expresion.
Also, for the identity
$$\sum_{k=1}^{n}{\cos \left(\varphi + k\alpha \right)}=\frac{\sin\left(\frac{\left(n+1\right)\alpha}{2}\right)\cdot\cos\left(\varphi+\frac{n\alpha}{2}\right)}{\sin \frac{\alpha}{2}}$$
we can use the identity $\cos u \sin v =\frac{1}{2}\left[\sin \left(u+v\right)-\sin \left(u-v\right)\right]$:
$$\cos \left(\varphi + k\alpha\right)\cdot \sin \frac{\alpha}{2}=\frac{1}{2}\left[\sin \left(\varphi + k\alpha + \frac{\alpha}{2}\right) - \sin \left(\varphi + k\alpha - \frac{\alpha}{2}\right)\right].$$
And so on.
</s>