If $\displaystyle X=\sin(2\pi/7)+\sin(4\pi/7)+\sin(8\pi/7)$ and If $\displaystyle Y=\cos(2\pi/7)+\cos(4\pi/7)+\cos(8\pi/7)$. Then $X^2+Y^2$ using complex number
solution i try
Using euler form $e^{i\theta}=\cos\theta+i\sin \theta,\theta=2\pi/7$
$$X+iY=e^{i\theta}+e^{2i\theta}+e^{4i\theta}$$
Not to go ahead after that step help required
Let $\,z = e^{i\, 2 \pi /7}\,$, then $\,z^7=1\,$ so $\,\bar z = z^{6} \,$ and $\, z^6+z^5+z^4+z^3+z^2+z+1 = 0\,$. Then:
$$ \begin{align} X^2+Y^2=|X+iY|^2 = |z|^2 \cdot |1+z+z^3|^2 &= 1 \cdot (1+z+z^3)(1+\bar z + \bar z^3) \\ &= (1+z+z^3)(1+z^6+z^4) \\ &= \underbrace{z^9}_{\textstyle z^2} + \underbrace{2 z^7}_{\textstyle 2\mathstrut} + \underbrace{z^6 + z^5 + z^4 + z^3 + z + 1}_{\textstyle{-z^2}} \end{align} $$