In working to prove that $$1+\cos\theta+\cos(2\theta)+\dots+\cos(n\theta)=\frac{1}{2}+\frac{\sin((n+\frac{1}{2})\theta)}{2\sin(\theta/2)} \tag{1}$$
I have shown $$\begin{align} 1+\cos(\theta)+\cos(2\theta)+\cos(3\theta)+\dots+\cos(n\theta) &=\Re\left(\frac{1-e^{(n+1)i\theta}}{1-e^{i\theta}}\right) \\[6pt] &=\frac{1-\cos(\theta)+\cos(n\theta)-\cos((n+1)\theta)}{2-2\cos(\theta)} \\[6pt] &=\frac{1}{2}+\frac{\cos(n\theta)-\cos((n+1)\theta)}{2-2\cos(\theta)} \tag{2} \end{align}$$ but I am unsure how to proceed from here and get the last term of $(2)$ to match the last term of $(1)$:
$$\frac{\cos(n\theta)-\cos((n+1)\theta)}{2-2\cos(\theta)}=\frac{\sin((n+\frac{1}{2})\theta)}{2\sin(\theta/2)} \tag{3}$$
I have read this post "How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression?", but I cannot seem to convert from the form their answer is in to my form.
If possible, I would like to avoid using too many identities as this is an exercise in my complex analysis book.