<s>[INST] Find the value of $\tan^6(\frac{\pi}{7}) + \tan^6(\frac{2\pi}{7}) + \tan^6(\frac{3\pi}{7})$ I wish to find the value of  $\tan^6(\frac{\pi}{7}) + \tan^6(\frac{2\pi}{7}) + \tan^6(\frac{3\pi}{7})$ as part of a larger problem. I can see that the solution will involve De Moivre's theorem somehow, but I cannot see how to apply it. I have looked at solutions of $z^7 - 1 = 0$ but to no avail. Can anyone suggest a method for solving this problem? 
 [/INST] Note that $\tan^2 \frac\pi7$, $\tan^2 \frac{2\pi}7$, and $\tan^2 \frac{3\pi}{7}$ are the roots of the polynomial equation $$x^3 - 21x^2 + 35x - 7 = 0.$$
If we label these roots $r$, $s$, and $t$, then Vieta's formulae tell us that $$\begin{cases}r + s + t = 21,\\ rs + rt + st = 35,\\ rst = 7.\end{cases}$$
From these, we would like to calculate $r^3 + s^3 + t^3$. We can do this by taking $$(r + s + t)^3 - 3 (r+s+t)(rs + rt + st) + 3rst = 21^3 - 3\cdot 21 \cdot 35 + 3\cdot 7 = 7077.$$

We can get the polynomial equation that made this solution work by observing that if $\theta$ is a multiple of $\frac\pi7$, then $(\cos\theta + i\sin\theta)^7 = 1$. Expanding this polynomial and taking the imaginary part yields
$$7\cos^6\theta \sin \theta - 35 \cos^4 \theta \sin^3\theta + 21 \cos^2 \theta \sin^5\theta - \sin^7 \theta = 0$$
or
$$\tan^7 \theta - 21 \tan^5 \theta + 35 \tan^3 \theta - 7\tan\theta = 0.$$
If we set $x = \tan\theta$, then the solutions to this are $0$, $\pm \tan \frac\pi7$, $\pm \tan \frac{2\pi}7$, and $\pm \tan \frac{3\pi}7$. So we divide by $x$ and cut all exponents in half to get only the roots we're interested in.
</s>