a problem on complex numbers Let $w\neq 1$ and $w^{13} = 1$.  
If $a = w+ w^3 + w^4 + w^{-4} + w^{-3} + w^{-1}$ and $b = w^2+ w^5 + w^6 + w^{-6} + w^{-5} + w^{-2}$, then the quadratic equation whose roots are $a$ and $b$ is ... ?
I got $w=\cos(\frac{2\pi}{13})+i\sin(\frac{2\pi}{13})$
And then I found $a$ and $b$ in trigonometric form. But when I multiplied them to get the product of roots it gets very difficult. How to solve it?
 A: Step 1: the equation you want is $(z-a)(z-b)=0$. Expand the product and you get $$z^2-(a+b)z+ab=0$$
Step 2: Use $w^{13}=1$, so $w^{-1}=w^{13}w^{-1}=w^{12}$ similarly, for all negative powers $$w^{-n}=w^{13-n}$$
Step 3: $$a+b=w+w^3+w^4+w^9+w^{10}+w^{12}+w^2+w^5+w^6+w^7+w^8+w^{11}=\\=\frac{w^{13}-1}{w-1}-1=-1$$
Step 4: To find $ab$, go to the trigonometric representation, and notice $$w^n+w^{-n}=2\cos\frac{2\pi n}{13}$$
Edit: After some manipulations, and using $w^{n+13}=w^n$, I've got $$ab=3(w+w^2+w^3+w^4+w^5+w^6+w^7+w^8+w^9+w^{10}+w^{11}+w^{12})=\\-3+3(1+w+w^2+w^3+w^4+w^5+w^6+w^7+w^8+w^9+w^{10}+w^{11}+w^{12})=-3$$
A: $$ a^2 + a = \frac{ w^{16} + 2w^{15} + w^{14} + 2w^{13} + 3w^{12} + 3w^{11} + 3w^{10} + 3w^9 + 6w^8 + 3w^7 + 3w^6 + 3w^5 + 3w^4 + 2w^3 + w^2 + 2w + 1}{w^8} $$
This is not impressive without
$$ w^{16} + 2w^{15} + w^{14} + 2w^{13} = w^3+2w^2+w+2. $$ Therefore
$$ a^2 + a = \frac{  3w^{12} + 3w^{11} + 3w^{10} + 3w^9 + 6w^8 + 3w^7 + 3w^6 + 3w^5 + 3w^4 + 3w^3 + 3w^2 + 3w + 3}{w^8} $$
The one coefficient out of line is $6 w^8 / w^8,$ so we need to subtract 3
$$ a^2 + a -3 = \frac{  3w^{12} + 3w^{11} + 3w^{10} + 3w^9 + 3w^8 + 3w^7 + 3w^6 + 3w^5 + 3w^4 + 3w^3 + 3w^2 + 3w + 3}{w^8} $$
$$ a^2 + a -3 = \frac{ 3 \left( w^{12} + w^{11} + w^{10} + w^9 + w^8 + w^7 + w^6 + w^5 + w^4 + w^3 + w^2 + w + 1 \right)}{w^8} $$
and
$$  a^2 + a - 3 = 0  $$
