Showing $1+\cos(\theta)+\dots+\cos (n\theta)=\frac12+\frac{\sin((n+\frac12)\theta)}{2\sin(\frac\theta2)}$ 
Suppose that $n \geq 1$ is a natural number.
(i) Show that for $z$ in $\mathbb{C}$, provided $z \neq 1$,
$$ \frac{1-z^{n+1}}{1-z} = 1+z+...+z^n.$$
(ii) Using de Moivre’s Theorem, part (b)(i) and standard trigonometric identities, show that for $\theta$ in $(0,2\pi)$,
$$ 1+\cos(\theta) + \dots + \cos (n\theta) = \frac{1}{2} + \frac{\sin((n+\frac12)\theta)}{2\sin(\frac\theta2)}$$

I have set $z=a+bi$ and subbed this into the top equation but dont seem to be getting anwhere with this problem. Any guidance will be great!

Part (i) should be straightforward if you are familiar with finding the sum of a geometric series:
\begin{align}
S &= 1+z+z^2+\ldots+z^{n-1}+z^n \\
zS &= z+z^2+z^3+\ldots + z^n+z^{n+1} \\
zS - S &= z^{n+1}-1 \\
S(z-1) &= z^{n+1}-1 \\
S &= \frac{z^{n+1}-1}{z-1} = \frac{1-z^{n+1}}{1-z} \, . \\ 
\end{align}
For part (ii), you should first consider the geometric series
$$
1+e^{i\theta}+e^{2i\theta}+\ldots+e^{ni\theta} \, .
$$
Since $e^{ik\theta}=\cos k\theta+i\sin k\theta$ for $k \in \mathbb{Z}$, we know that
\begin{align}
&1+e^{i\theta}+e^{2i\theta}+\ldots+e^{ni\theta}\\=&1+(\cos\theta+i\sin\theta)+(\cos 2\theta+i\sin 2\theta)+\ldots+(\cos n\theta+i\sin n\theta)
\end{align}
Hence,
$$
1+\cos\theta+\cos 2\theta+\ldots+\cos n \theta=\Re(1+e^{i\theta}+e^{2i\theta}+\ldots+e^{ni\theta}) \, .
$$
