Proving $\frac{1}{\cos^2\frac{\pi}{7}}+ \frac {1}{\cos^2\frac {2\pi}{7}}+\frac {1}{\cos^2\frac {3\pi}{7}} = 24$ Someone gave me the following problem, and using a calculator I managed to find the answer to be $24$.

Calculate $$\frac {1}{\cos^2\frac{\pi}{7}}+ \frac{1}{\cos^2\frac{2\pi}{7}}+\frac {1}{\cos^2\frac{3\pi}{7}}\,.$$

The only question left is, Why? I've tried using Euler's Identity, using a heptagon with Law of Cosine w/ Ptolemy's, etc. but the fact that the cosine values are all squared and in the denominator keeps getting me stuck.
If $\zeta=e^{\frac{2\pi i}{7}}$, then the required expression is
$$4\left(\frac{\zeta^2}{(\zeta+1)^2}+\frac{\zeta^4}{(\zeta^2+1)^2}+\frac{\zeta^6}{(\zeta^3+1)^2}\right).$$
How do we simplify this result further?

Incomplete solution
The idea behind this solution is using Vieta's cubic formulas to rewrite the equality in a simpler, more manageable way. Letting $\cos^2\frac{\pi}{7}=\alpha$, $\cos^2\frac{2\pi}{7}=\beta$, and $\cos^2\frac{3\pi}{7}=\gamma$, we have this:
$$\frac{1}{\alpha}+\frac{1}{\beta}+\frac{1}{\gamma}=24$$
$$\frac{\alpha\beta+\alpha\gamma+\beta\gamma}{\alpha\beta\gamma}=24$$
By letting $\alpha,\beta,$ and $\gamma$ be roots to a cubic, we use Vieta's formula's to see that $-\frac{c}{d}=24$ 

Now, consider the three denominators as roots to a cubic polynomial. Let's make a third degree equation using them:
$$(x-\cos^2\frac{\pi}{7})(x-\cos^2\frac{2\pi}{7})(x-\cos\frac{3\pi}{7})$$
Let's use substitutions to avoid some nasty simplified expression. Let $u=\cos\frac{\pi}{7}$. Using some angle addition trig identities, we transform our equation into this:
$$(x-u^2)(x-4u^2+4u-1)(x-16u^6+24u^4-9u^2)$$
Multiply them out:
$$x^3+(-16u^6+24u^4-14u^2+4u-1)x^2+(80u^8-64u^7-104u^6+96u^5+25u^4-40u^3+10u^2)x+(-64u^{10}+64u^9+80u^8-96u^7-12u^6+36u^5-9u^4)$$
Consider the form $ax^3+bx^2+cx+d$. Per Vietas' formulas, $-c/d=24$.
$$\frac{80u^6-64u^5-104u^4+96u^3+25u^2-40u+10}{64u^8-64u^7-80u^6+96u^5+12u^4-36u^3+9u^2}=24$$
I will continue to work on proving this last part, but I figured at least simplifying your problem to this might be of some asssistance, and someone else may be able to validate the last equation before I do. Basically, if you prove the last equality you prove the question posted.
