Real part of $\frac{1-e^{(n+1)i\theta}}{1-e^{i\theta}}$ How can I compute the real part of
\begin{equation*}
\frac{1-e^{(n+1)i\theta}}{1-e^{i\theta}}, \quad \text{where}\ \theta \in \mathbb{R}?
\end{equation*}

Maybe it's a silly question, but I'm feeling rusty with complex numbers...
For that very expression there's a trick to introduce $\alpha = \frac{\theta}{2}$ and noticing that

$$\frac{1- e^{i (n+1) \theta}}{1-e^{i \theta}} = \frac{e^{i (n+1)\alpha} (e^{i (n+1)\alpha} - e^{-i (n+1)\alpha})}{e^{i\alpha} (e^{i\alpha} - e^{-i\alpha})} = e^{in\alpha} \frac{\sin((n+1)\alpha)}{\sin \alpha}$$

I'll let you conclude...
hint: $$e^{i\theta} = \cos \theta + i\sin \theta$$, $$e^{(n+1)i\theta} = \cos(n+1)\theta+i\sin(n+1)\theta$$