Answer: First, let \(c=\cos \theta\) and \(s=\sin \theta\). Using de Moivre's theorem,
\((c+is)^7=c^7+7c^6(is)+21c^5(is)^2+35c^4(is)^3+35c^3(is)^4+21c^2(is)^5+7c(is)^6+(is)^7\).
Taking real and imaginary parts gives
\(\cos 7\theta=c^7-21c^5s^2+35c^3s^4-7cs^6\)
and \(\sin 7\theta=7c^6s-35c^4s^3+21c^2s^5-s^7\).
So
\(\cot 7\theta=\frac{\cos 7\theta}{\sin 7\theta}=\frac{c^7-21c^5s^2+35c^3s^4-7cs^6}{7c^6s-35c^4s^3+21c^2s^5-s^7}.\)
Now divide top and bottom by \(s^7\), and write \(x=\cot\theta=\frac{c}{s}\). Then
\(\cot 7\theta=\frac{x^7-21x^5+35x^3-7x}{7x^6-35x^4+21x^2-1}.\)
If \(\cot 7\theta=0\), then the numerator must be zero. Since \(\cot\theta\neq 0\) for these values, we can factor out \(x\) and get
\(x(x^6-21x^4+35x^2-7)=0\), hence
\(x^6-21x^4+35x^2-7=0\), where \(x=\cot\theta\).
Also, \(\cot 7\theta=0\) means \(7\theta=\frac{\pi}{2}+n\pi\), so
\(\theta=\frac{(2n+1)\pi}{14}\).
Within one period this gives \(\theta=\frac{k\pi}{14}\) for \(k=1,3,5,9,11,13\). Therefore the roots of
\(x^6-21x^4+35x^2-7=0\)
are \(\cot\left(\frac{k\pi}{14}\right)\) for \(k=1,3,5,9,11,13\).
For the product of the roots, use the constant term of the monic polynomial:
\(\cot\frac{\pi}{14}\cot\frac{3\pi}{14}\cot\frac{5\pi}{14}\cot\frac{9\pi}{14}\cot\frac{11\pi}{14}\cot\frac{13\pi}{14}=-7.\)
Now pair using \(\cot(\pi-\alpha)=-\cot\alpha\):
\(\cot\frac{13\pi}{14}=-\cot\frac{\pi}{14},\quad \cot\frac{11\pi}{14}=-\cot\frac{3\pi}{14},\quad \cot\frac{9\pi}{14}=-\cot\frac{5\pi}{14}.\)
So
\(-\cot^2\frac{\pi}{14}\cot^2\frac{3\pi}{14}\cot^2\frac{5\pi}{14}=-7,\)
and therefore
\(\cot^2\left(\frac{\pi}{14}\right)\cot^2\left(\frac{3\pi}{14}\right)\cot^2\left(\frac{5\pi}{14}\right)=7.\)
Let \(c=\cos\theta\) and \(s=\sin\theta\). By de Moivre's theorem,
\((c+is)^7=c^7+7c^6(is)+21c^5(is)^2+35c^4(is)^3+35c^3(is)^4+21c^2(is)^5+7c(is)^6+(is)^7.\)
Collecting the real and imaginary parts gives
\(\cos 7\theta=c^7-21c^5s^2+35c^3s^4-7cs^6,\)
\(\sin 7\theta=7c^6s-35c^4s^3+21c^2s^5-s^7.\)
Hence
\(\cot 7\theta=\frac{\cos 7\theta}{\sin 7\theta}=\frac{c^7-21c^5s^2+35c^3s^4-7cs^6}{7c^6s-35c^4s^3+21c^2s^5-s^7}.\)
Now divide numerator and denominator by \(s^7\), and write \(x=\cot\theta=\frac{c}{s}\). Then
\(\cot 7\theta=\frac{x^7-21x^5+35x^3-7x}{7x^6-35x^4+21x^2-1}.\)
So if \(\cot 7\theta=0\), the numerator must be zero:
\(x^7-21x^5+35x^3-7x=0.\)
Since \(x=\cot\theta\neq 0\) for the solutions we want, factor out \(x\):
\(x(x^6-21x^4+35x^2-7)=0.\)
Therefore the required equation is
\(x^6-21x^4+35x^2-7=0,\quad x=\cot\theta.\)
Next, \(\cot 7\theta=0\) means \(7\theta=\frac{\pi}{2}+n\pi\), so
\(\theta=\frac{(2n+1)\pi}{14}.\)
The distinct values that give the six roots are
\(\theta=\frac{k\pi}{14}\quad \text{for } k=1,3,5,9,11,13.\)
Hence the roots of \(x^6-21x^4+35x^2-7=0\) are
\(\cot\left(\frac{\pi}{14}\right),\cot\left(\frac{3\pi}{14}\right),\cot\left(\frac{5\pi}{14}\right),\cot\left(\frac{9\pi}{14}\right),\cot\left(\frac{11\pi}{14}\right),\cot\left(\frac{13\pi}{14}\right).\)
For the product of the roots, use the constant term of the monic polynomial \(x^6-21x^4+35x^2-7\):
\(\cot\frac{\pi}{14}\cot\frac{3\pi}{14}\cot\frac{5\pi}{14}\cot\frac{9\pi}{14}\cot\frac{11\pi}{14}\cot\frac{13\pi}{14}=-7.\)
Now pair the terms using \(\cot(\pi-\alpha)=-\cot\alpha\):
\(\cot\frac{13\pi}{14}=-\cot\frac{\pi}{14},\quad \cot\frac{11\pi}{14}=-\cot\frac{3\pi}{14},\quad \cot\frac{9\pi}{14}=-\cot\frac{5\pi}{14}.\)
So
\(-\cot^2\frac{\pi}{14}\cot^2\frac{3\pi}{14}\cot^2\frac{5\pi}{14}=-7,\)
and therefore
\(\cot^2\left(\frac{\pi}{14}\right)\cot^2\left(\frac{3\pi}{14}\right)\cot^2\left(\frac{5\pi}{14}\right)=7.\)