Summing $1+\cos(\theta)+\cos(2\theta) +\cdots + \cos(n\theta)$ First of all, I'd like to acknowledge that there are already solutions to this question on this forum. However, I'm repeating the question here because my solution doesn't quite get me what those other solutions are and I'm wondering if I'm doing something wrong.
I know that taking $z\in \mathbb{C}$ s.t. $|z|=1$ and $\arg(z) = \theta$, we get $z=\cos(\theta)+i\sin(\theta)$. Then by DeMoivre's Theorem we get $z^n= (\cos(\theta)+i\sin(\theta))^n=\cos(n\theta)+i\sin(n\theta)$, and we see that the sum
$1+\cos(\theta)+\cos(2\theta) +\cdots + \cos(n\theta)$ is equal to $\operatorname{Re}(z^0+z^1+\cdots+z^n)$ (call it $S$).
From there, using geometric sums, $S=\frac{z^{n+1}-1}{z-1}$. In order to find $\operatorname{Re}(S)$, I am multiplying the top and the bottom by $\overline{z-1}$ to get $S=\frac{(z^{n+1}-1)*(\overline{z-1})}{(z-1)*(\overline{z-1})}$.
This is where I'm running into trouble. Expanding $z$ into $\cos(\theta)+i\sin(\theta)$ I get that the denominator is equal to $2-2\cos(\theta)$ (and whatever other variants of this using trig identities). However, this doesn't seem to line up with any of the other standard answers I'm finding online (which mostly involve a $\sin(\frac{\theta}{2})$ in the denominator).
I was wondering if anyone could point out if/where I've gone wrong in my process. Is there another way to handle this sum (while still using DeMoivre's Theorem)?
 A: $$\frac{z^{n+1}-1}{z-1}=\frac{(z^{n+1}-1)\overline{(z-1)}}{|z-1|^2}\tag{$\ast$}$$
Denominator is real, so you need to separate numerator into real and imaginary parts.
$$(z^{n+1}-1)=(\cos((n+1)\theta)-1)+i\sin((n+1)\theta)\tag1$$$$\overline{(z-1)}=(\cos\theta-1)-i\sin\theta\tag2$$
Multiply (1) and (2) and extract real part.
The real part of the expression in $(\ast)$ is

$$\frac{(\cos((n+1)\theta)-1)(\cos\theta-1)+\sin((n+1)\theta)\sin\theta}{(\cos\theta-1)^2+\sin^2\theta}$$

The solution you saw with $\theta/2$ in bottom most likely simplified the denom as $2(1-\cos\theta)$ and used the identity $\cos(x)=\cos^2(x/2)-\sin^2(x/2)=1-2\sin^2(x/2)=2\cos^2(x/2)-1$
The numerator might also be simplified by expanding out and using trig identities which express $\cos x\cos y$ and $\sin x\sin y$ as sums of $\sin$ and $\cos$
A: The simplest method uses the exponential notation: this sum is the real part of
$$S=1+\mathrm e^{i\theta}+\mathrm e^{2i\theta}+\dots++\mathrm e^{ni\theta},$$
which is the sum of a geometric progression with common ratio $+\mathrm e^{i\theta}$, hence
\begin{align}
S&=\frac{\mathrm e^{(n+1)i\theta}-1}{\mathrm e^{i\theta}-1}=\frac{\mathrm e^{\tfrac{(n+1)i\theta}2}\Bigl(\mathrm e^{\tfrac{(n+1)i\theta}2}-\mathrm e^{-\tfrac{(n+1)i\theta}2}\Bigr)}{\mathrm e^{\tfrac{i\theta}2}\Bigl(\mathrm e^{\tfrac{i\theta}2}-\mathrm e^{-\tfrac{i\theta}2}\Bigr)}\\
&=\mathrm e^{\tfrac{ni\theta}2}\,\frac{\mathrm e^{\tfrac{(n+1)i\theta}2}-\mathrm e^{-\tfrac{(n+1)i\theta}2}}{\mathrm e^{\tfrac{i\theta}2}-\mathrm e^{-\tfrac{i\theta}2}}=\mathrm e^{\tfrac{ni\theta}2}\,\frac{\sin\frac{(n+1)\theta} 2}{\sin\frac\theta 2}
\end{align}
and the real part should not be too hard to determine now…
