<s>[INST] 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?
 [/INST] 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$$
</s>