Show that for $0<\theta<2\pi$: $$\text{Re}\left(\frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}\right)=\frac{1}{2}+\frac{\text{sin}\left(n+\frac{1}{2}\right)\theta}{2\text{sin}\frac{\theta}{2}}$$
I am stuck up to this point \begin{align} \text{Re}\left(\frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}\right)&=\frac{1-\text{cos}\theta-\text{cos}(n\theta+\theta)+\text{cos}\theta\text{cos}(n\theta+\theta)}{2-2\text{cos}\theta} \\ &=\frac{1-\text{cos}\theta}{2-2\text{cos}\theta}+\frac{\text{cos}(n\theta+\theta)(\text{cos}\theta-1)}{2-2\text{cos}\theta} \\ &=\frac{1}{2}-\frac{\text{cos}(n\theta+\theta)}{2} \end{align}
I hint would be very helpful.