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!
 A: 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}) \, .
$$
A: Hints guides
Breaking $z$ into $(x + iy)$ is bad for these particular problems.
Part (i) 
multiply the denominator by the RHS.
Part (ii) 
This one, which happens to be part of my Complex Analysis textbook, is really no walk in the park.  Need introductory identities.
$\cos(a+b) = \cos(a)\cos(b) - \sin(a)\sin(b).$ 
$\sin(a+b) = \sin(a)\cos(b) + \sin(b)\cos(a).$
$\sin \,a  ~-~ \sin \,b ~=~ 
2\,\sin\left(\frac{a - b}{2}\right) \times 
\cos\left(\frac{a + b}{2}\right) \implies $
$\sin [(n + 1)\theta] ~-~ \sin \,(n\theta)
~=~
2 \,\sin \left(\frac{\theta}{2}\right) \times
\cos \left[\frac{(2n + 1)\theta}{2}\right].$
$\cos \,a  ~-~ \cos \,b ~=~
- 2 \,\sin\left(\frac{a - b}{2}\right) \times 
\sin\left(\frac{a + b}{2}\right) \implies $
$\cos (n\theta) ~-~ \cos \,[(n + 1)\theta] ~=~ 
2 \,\sin \left(\frac{\theta}{2}\right) \times
\sin \left[\frac{(2n + 1)\theta}{2}\right].$
Let $\;A ~\equiv ~ \sum_{k = 0}^n
        (\cos \,k\theta ~+~ i \,\sin \,k\theta).$
Let $\displaystyle\;B ~\equiv ~ \left(\frac{1}{2}\right) ~+~
\left\{\frac{\sin \,\left[\frac{(2n + 1)\theta}{2}\right]}
{2 \,\sin \,(\theta/2)}\right\}.$
Let $\displaystyle\;C ~\equiv ~ 
\left(\frac{\cot (\theta/2)}{2}\right) ~-~
\left\{\frac{\cos \,\left[\frac{(2n + 1)\theta}{2}\right]}
{2 \,\sin \,(\theta/2)}\right\}.$
To Show: $\,A ~=~ B + iC.$

It is assumed that $(2\pi)$ does not divide $(\theta)$.
Use part (1), substituting $e^{i\theta}$ for $z$, to
re-express $A$.
Simplify $A$ to $\frac{R + iS}{T}$ and then prove that
$B = \frac{R}{T}, C = \frac{S}{T}.$
If you wish to use this answer, and encounter questions or roadblocks, edit your query to show all of your work,
and leave very explicit questions as a comment following this
answer.
I will automatically be flagged.  For your comment/questions,
try to have the detailed preliminary work done in your query, and
then ask very specific questions, like:

*

*"In my query, expression (1) signifies $\frac{R}{T}$ and expression (2) signifies $B$.  
How do I show that
expression (1) = expression (2)"?

A: From part (i), for $z\in\mathbb C\setminus\{1\},$
$$1+z+...+z^n=\frac{1-z^{n+1}}{1-z}.$$
Let $z=e^{i\theta}$ and $\theta\in(0,2\pi).$ Then
$$1+e^{i\theta}+...+e^{in\theta} = \frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}\\
=\frac{e^{i\frac{n+1}2\theta}\left[e^{-i\frac{n+1}2\theta}-e^{i\frac{n+1}2\theta}\right]}{e^{i\frac\theta2}\left[e^{-i\frac\theta2}-e^{i\frac\theta2}\right]}\\
\color{#C00}{\overset1=}e^{i\frac{n}2\theta}\frac{-2i\sin\left(\frac{n+1}2\theta\right)}{-2i\sin\left(\frac\theta2\right)}\\
=\frac{\sin\left(\frac{n+1}2\theta\right)}{\sin\left(\frac\theta2\right)}e^{i\frac{n}2\theta}.$$
By Euler's formula and equating real parts,
$$ 1+\cos(\theta) + \dots + \cos (n\theta) = \frac{\sin\left(\frac{n+1}2\theta\right)}{\sin\left(\frac\theta2\right)}\cos\left(\frac{n}2\theta\right) \\
\color{#C00}{\overset2=} \frac1{\sin\left(\frac\theta2\right)}{\frac12\left[\sin\left(\left(n+\frac12\right)\theta\right)+\sin\left(\frac\theta2\right)\right]} \\
= \frac{1}{2} + \frac{\sin\left(\left(n+\frac12\right)\theta\right)}{2\sin\left(\frac\theta2\right)}.\\$$
1 using $e^{i\alpha}-e^{-i\alpha}=2i\sin(\alpha)$
2 using one of the product-to-sum trigonometric identities
