Prove that $\operatorname{Re}\left(\frac{1-z^{n+1}}{1-z}\right)=\frac{1}{2}+\frac{\sin((n+\frac{1}{2})\theta)}{2\sin(\frac{\theta}{2})}$. My objective is to prove that:
$$\operatorname{Re}\left(\frac{1-z^{n+1}}{1-z}\right)=\frac{1}{2}+\frac{\sin((n+\frac{1}{2})\theta)}{2\sin(\frac{\theta}{2})}\text{ , where $$z is a complex number }.$$
I have developed a good reasoning, but I cannot conclude. Let's go:
$$\operatorname{Re}\left(\frac{1-z^{n+1}}{1-z}\right)=\frac{[1-\cos((n+1)\theta)](1-\cos\theta)+\sin((n+1)\theta)\sin\theta}{[1-2\cos\theta + cos^2\theta +sen^2\theta]}=$$
$$=\frac{1-\cos\theta-\cos((n+1)\theta)+cos\theta\cos((n+1)\theta)+\sin\theta\sin((n+1)\theta)}{2-2\cos\theta}=$$
$$=\frac{1-\cos\theta}{2-2\cos\theta}+\frac{\cos((n+1)\theta)(\cos\theta-1)+\sin\theta\sin((n+1)\theta)}{2-2\cos\theta}=$$
$$=\frac{1}{2}-\frac{\cos((n+1)\theta)}{2}+\frac{\sin\theta\sin((n+1)\theta)}{2-2\cos\theta}.$$
After that, i was unable to continue. I tried to go the other way, that is, try to develop the right side of equality. However, I was not successful. Does anyone have any idea how I can make progress?
Note: I need to do it using only trigonometric relations. I cannot use exponential rules.
Note: The previous steps I did not put in, because I am sure that it is right and it is not necessary for the continuation. I just need to know how to continue to develop to get to the right side of the requested equality.
 A: If you are unable to continue, you can look at the following steps:
$\dfrac{1}{2}-\dfrac{\cos\big((n+1)\theta\big)}{2}+\dfrac{\sin\theta\sin\big((n+1)\theta\big)}{2-2\cos\theta}=$
$=\dfrac{1}{2}+\dfrac{-\cos\big((n+1)\theta\big)(1-\cos\theta)+\sin\theta\sin\big((n+1)\theta\big)}{2(1-\cos\theta)}=$
$=\!\dfrac{1}{2}\!+\!\dfrac{-\!\cos((n\!+\!1)\theta)\!+\!\cos\theta\cos((n\!+\!1)\theta)\!+\!\sin\theta\sin((n\!+\!1)\theta)}{2(1-\cos\theta)}=$
$=\dfrac{1}{2}+\dfrac{-\cos\big((n+1)\theta\big)+\cos\big((n+1)\theta-\theta\big)}{2(1-\cos\theta)}=$
$=\dfrac{1}{2}+\dfrac{-\cos\big((n+1)\theta\big)+\cos(n\theta)}{2(1-\cos\theta)}=$
$=\dfrac{1}{2}+\dfrac{-2\sin\big((n+\frac12)\theta\big)\sin\left(-\frac12\theta\right)}{2(1-\cos\theta)}=$
$=\dfrac{1}{2}+\dfrac{\sin\big((n+\frac12)\theta\big)\sin\left(\frac12\theta\right)}{1-\cos\theta}=$
$=\dfrac{1}{2}+\dfrac{\sin\big((n+\frac12)\theta\big)\sin\left(\frac12\theta\right)}{2\left(\sqrt{\frac{1-\cos\theta}2}\right)^2}=$
$=\dfrac{1}{2}+\dfrac{\sin\big((n+\frac12)\theta\big)\sin\left(\frac{\theta}2\right)}{2\sin^2\left(\frac{\theta}2\right)}=$
$=\dfrac{1}{2}+\dfrac{\sin\big((n+\frac12)\theta\big)}{2\sin\left(\frac{\theta}2\right)}\;.$
A: A bit long for a comment, but may be of help:
$$\frac{1-z^{n+1}}{1-z}=1+z+z^2+\cdots+z^n.$$
Assuming $z=re^{i\theta}$ then you have
$$1+r\cos\theta+r^2\cos 2\theta+\cdots+r^n\cos n\theta,$$
so presumably your $z$ are of unit size and $r=1$ since this sum is related to Lagrange's trigonometric identity.
So in your case,
$$\sum_{k=0}^n\cos(k\theta)=\frac{1}{\sin(\theta/2)}\sum_{k=0}^n\sin(\theta/2)\cos(k\theta)\\=\frac{1}{\sin(\theta/2)}\sum_{k=0}^n\sin(\theta(k+1/2))-\sin(\theta(k-1/2)).$$
This sum telescopes, e.g. $3+1/2=4-1/2$, so the right hand side is equal to
$$\frac{\sin \left(\frac{1}{2} (2 n+1) \theta\right)+\sin \left(\frac{\theta}{2}\right)}{2\sin(\theta/2)}=\frac{1}{2}+\frac{\sin\left(\frac{1}{2}(2n+1)\theta\right)}{2\sin(\theta/2)}.$$
