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