Find the value of $\textrm{cosec}^2\left(\frac\pi7\right) +\textrm{cosec}^2\left(\frac{2\pi}7\right)+\textrm{cosec}^2\left(\frac{4\pi}7\right)$
When in doubt, convert trig functions to complex exponentials.
If $w = e^{i\pi/7}$, $\csc^2(\pi/7) = \dfrac{-4}{(w-1/w)^2}$ and similarly for the others with $w$ replaced by $w^2$ and $w^4$. Simplifying, $$ \csc^2(\pi/7) + \csc^2(2\pi/7) + \csc^2(4\pi/7) - 8 \\= -4\,{\frac {2\,{w}^{16}+{w}^{14}+3\,{w}^{12}+3\,{w}^{10}+3\,{w}^{8}+3 \,{w}^{6}+3\,{w}^{4}+{w}^{2}+2}{ \left( {w}^{8}-1 \right) ^{2}}} $$ and the numerator is divisible by $w^6+w^5+w^4+w^3+w^2+w+1 = 0$
EDIT: This cries out for generalization. We also have $$\csc^2(\pi/3)+ \csc^2(2\pi/3) = 8/3$$ $$\csc^2(\pi/15) + \csc^2(2\pi/15) + \csc^4(4\pi/15) + \csc^2(8\pi/15) = 32$$ but unfortunately $$\csc^2(\pi/31) + \csc^2(2\pi/31) + \csc^2(4\pi/31) + \csc^2(8\pi/31) + \csc^2(16\pi/31)$$ is irrational (it seems to be a root of $z^3-160 z^2+3904 z-23552 = 0$)
EDIT: Instead we have $$ \sum_{j=1}^{15} \csc^2(j \pi/31) = 160$$
Actually it seems $$ \sum_{j=1}^n \csc^2(j \pi/(2n+1)) = \dfrac{2n(n+1)}{3}$$ for all positive integers $n$. In the case $n=3$, since $\csc(4\pi/7) = \csc(3\pi/7)$, $$\csc^2(\pi/7) + \csc^2(2\pi/7) + \csc^2(4\pi/7) = \csc^2(\pi/7) + \csc^2(2\pi/7)\csc^2(3\pi/7) = 8$$ In the case $n=7$, there are actually four "basic" equations involving $\csc^2(j \pi/15)$: $$\eqalign{\csc^2(5\pi/15) &= 4/3\cr \csc^2(3\pi/15) + \csc^2(6\pi/15) &= 4\cr 10 \csc^2(\pi/15) + \csc^2(2\pi/15)+\csc^2(7\pi/15) &= 36\cr \csc^2(\pi/15) - 10 \csc^2(3 \pi/15) + \csc^2(4\pi/15) &= -4\cr}$$ and $\csc^2(\pi/15) + \csc^2(2\pi/15) + \csc^4(4\pi/15) + \csc^2(8\pi/15) = 32$ is the sum of the last two (using the fact that $\csc(8 \pi/15) = \csc(7 \pi/15)$).
If $7x=\pi,4x=\pi-3x$
$\implies \sin4x=\sin(\pi-3x)=\sin3x$
$\implies 2\sin2x\cos2x=3\sin x-4\sin^3x$
$\implies 4\sin x\cos x\cos2x=3\sin x-4\sin^3x$
If $\sin x\ne0,$ we have $4\cos x\cos2x=3-4\sin^2x\implies 4\cos x(1-2\sin^2x)=3-4\sin^2x$
On squaring & rearrangement, $64(\sin^2x)^3-112(\sin^2x)^2+56\sin^2x-7=0$
which is a cubic equation in $\sin^2x$ with roots being $\sin^2\frac{r\pi}7$
where $r=(1$ or $6),(2$ or $5)$ and $(3$ or $4)$ as $\sin\frac{(7-r)\pi}7=\sin (\pi-\frac{r\pi}7)=\sin\frac{r\pi}7$
Using Vieta's Formula we have,
$\displaystyle\sin^2\frac{\pi}7\sin^2\frac{2\pi}7\sin^2\frac{4\pi}7=\frac7{64}$ and $\displaystyle\sin^2\frac{\pi}7\sin^2\frac{2\pi}7+\sin^2\frac{2\pi}7\sin^2\frac{4\pi}7+\sin^2\frac{4\pi}7\sin^2\frac{\pi}7=\frac{56}{64}$
We need to find
$\displaystyle\frac1{\sin^2\frac{\pi}7}+\frac1{\sin^2\frac{2\pi}7}+\frac1{\sin^2\frac{4\pi}7}=\displaystyle\frac{\sin^2\frac{\pi}7\sin^2\frac{2\pi}7+\sin^2\frac{2\pi}7\sin^2\frac{4\pi}7+\sin^2\frac{4\pi}7\sin^2\frac{\pi}7}{\sin^2\frac{\pi}7\sin^2\frac{2\pi}7\sin^2\frac{4\pi}7}=\frac{\frac{56}{64}}{\frac7{64}}=\frac{56}7=8$
$$\cos\frac{2\pi}{7}+\cos\frac{4\pi}{7}+\cos\frac{6\pi}{7}=\frac{2\sin\frac{\pi}{7}\cos\frac{2\pi}{7}+2\sin\frac{\pi}{7}\cos\frac{4\pi}{7}+2\sin\frac{\pi}{7}\cos\frac{6\pi}{7}}{2\sin\frac{\pi}{7}}=$$ $$=\frac{\sin\frac{3\pi}{7}-\sin\frac{\pi}{7}+\sin\frac{5\pi}{7}-\sin\frac{3\pi}{7}+\sin\frac{7\pi}{7}-\sin\frac{5\pi}{7}}{2\sin\frac{\pi}{7}}=-\frac{1}{2},$$ $$\cos\frac{2\pi}{7}\cos\frac{4\pi}{7}+\cos\frac{2\pi}{7}\cos\frac{6\pi}{7}+\cos\frac{4\pi}{7}\cos\frac{6\pi}{7}=$$ $$=\frac{1}{2}\left(\cos\frac{6\pi}{7}+\cos\frac{2\pi}{7}+\cos\frac{6\pi}{7}+\cos\frac{4\pi}{7}+\cos\frac{4\pi}{7}+\cos\frac{2\pi}{7}\right)=$$ $$=\cos\frac{2\pi}{7}+\cos\frac{4\pi}{7}+\cos\frac{6\pi}{7}=-\frac{1}{2}$$ and $$\cos\frac{2\pi}{7}\cos\frac{4\pi}{7}\cos\frac{6\pi}{7}=\frac{8\sin\frac{2\pi}{7}\cos\frac{2\pi}{7}\cos\frac{4\pi}{7}\cos\frac{8\pi}{7}}{8\sin\frac{2\pi}{7}}=\frac{\sin\frac{16\pi}{7}}{8\sin\frac{2\pi}{7}}=\frac{1}{8}.$$ Id est, $$\frac{1}{\sin^2\frac{\pi}{7}}+\frac{1}{\sin^2\frac{2\pi}{7}}+\frac{1}{\sin^2\frac{4\pi}{7}}=$$ $$=2\left(\frac{1}{1-\cos\frac{2\pi}{7}}+\frac{1}{1-\cos\frac{4\pi}{7}}+\frac{1}{1-\cos\frac{6\pi}{7}}\right)=$$ $$=\frac{2\left(\left(1-\cos\frac{2\pi}{7}\right)\left(1-\cos\frac{4\pi}{7}\right)+\left(1-\cos\frac{2\pi}{7}\right)\left(1-\cos\frac{6\pi}{7}\right)+\left(1-\cos\frac{4\pi}{7}\right)\left(1-\cos\frac{6\pi}{7}\right)\right)}{\left(1-\cos\frac{2\pi}{7}\right)\left(1-\cos\frac{4\pi}{7}\right)\left(1-\cos\frac{6\pi}{7}\right)}=$$ $$=\frac{2\left(3-2\left(-\frac{1}{2}\right)+\left(-\frac{1}{2}\right)\right)}{1-\left(-\frac{1}{2}\right)+\left(-\frac{1}{2}\right)-\frac{1}{8}}=8.$$