How to prove $\cos \frac{2\pi}{9} + \cos \frac{4\pi}{9} + \cos \frac{8\pi}{9}$=0 I tried letting $z=cis \frac{2\pi}{9}$
and using trigonometric identities i got $\frac{1}{2z^4} [\frac{z^9-1}{z-1}]-\frac{1}{2z^3} - \frac{1}{2}$
and since i assumed that z then $z^9=cis (2\pi) =1$
but i ended up with $\cos \frac{2\pi}{n} + \cos \frac{4\pi}{n} + \cos \frac{8\pi}{n} = \frac{(-1+i\sqrt(3))}{4}$

Let $\zeta_9 = e^{2\pi i/9}$ be a primitive $9^{\rm th}$ root of unity.  The given sum on the LHS is $$\frac{1}{2} \left(\zeta_9 + \zeta_9^{-1} + \zeta_9^2 + \zeta_9^{-2} + \zeta_9^4 + \zeta_9^{-4}\right).$$    Now if we recall that the roots of $z^9 - 1 = 0$ are $$\{\zeta_9^k\}_{k=0}^8,$$ and the sum of the roots of a polynomial of degree $n$ is equal to the negative of the coefficient of the degree $(n-1)^{\rm th}$ term, then it follows that $$\sum_{k=0}^8 \zeta_9^k = 0,$$ and since $\zeta_9^0 = 1$, we readily obtain $$\sum_{k=1}^8 \zeta_9^k = -1.$$  And since $$\zeta_9^{-1} = \zeta_9^8, \quad  \zeta_9^{-2} = \zeta_9^7, \quad \zeta_9^{-4} = \zeta_9^5,$$ we see that the given sum is equal to $$\frac{1}{2}\left(-1 - \zeta_9^3 - \zeta_9^6\right) = -\frac{1}{2} - \frac{\zeta_9^3 + \zeta_9^{-3}}{2} = -\frac{1}{2} - \cos \frac{6\pi}{9} = 0.$$
