# finding the value of $Z+Z^{2}+Z^{3}........$ if...

If $Z+Z^{-1} = 2 \cos 5$ then what's the value of $Z+Z^{2}+Z^{3}.... ......Z^{63}$.
I wanted to to solve this with the value of $Z$. But may be the value of $Z$ is complex. Now it's quite impossible to me to solve this. please tell me how can I proceed?

Note that $$\cos\theta=\frac{e^{i\theta}+e^{-i\theta}}{2}\tag1$$ and $$e^{\pm i\theta}=\cos\theta\pm i\sin\theta\tag2$$ Hence $$\cos5^\circ=\frac{e^{5^\circ i}+e^{-5^\circ i}}{2}.\tag3$$ Let $Z=e^{5^\circ i}$. Thus \begin{align} Z+Z^2+\cdots+Z^{63}&=\frac{Z(Z^{63}-1)}{Z-1}\\ &=\frac{Z^{63}-1}{\color{red}{\dfrac{Z-1}{Z}}}\\ &=\frac{Z^{63}-1}{1-Z^{-1}}\\ &=\frac{e^{315^\circ i}-1}{1-e^{-5^\circ i}}\\ &=\frac{\cos315^\circ+i\sin315^\circ-1}{1-\cos5^\circ+i\sin5^\circ}. \end{align}
$$\sum_{r=1}^{63}z^r=\frac{z^{64}-1}{z-1}-1$$
Now solving for $z,z=\cos5\pm i\sin 5$
Apply $(\cos x+i\sin x)^n=\cos nx+i\sin nx$
Also $z-1=\cos5\pm i\sin 5-1=-2\sin^22.5\pm i2\sin2.5\cos2.5=\cdots$