<s>[INST] The equation $\tan x = \tan 2x \tan 4x \tan 8x$ In the question  we have the equality
$$\tan 6^{\circ} \tan 42^{\circ} = \tan 12^{\circ} \tan 24^{\circ}$$
which is equivalent to
$$ \tan 6^{\circ} = \tan 12^{\circ} \tan 24^{\circ} \tan 48^{\circ}$$
This means that the equation
$$\tan x = \tan 2x \tan 4x \tan 8x$$
has the solution $x =6^{\circ} = \frac{\pi}{30}$.  How to find all the solution of this equation?
 [/INST] $\sin x=0$ is obviously a solution. We will assume for further solutions that $\sin x\neq 0.$
Now:
$$\begin{align}\sin 2x&=2\sin x\cos x\\\sin 4x&=4\sin x\cos x\cos2x\\
\sin 8x&=2\sin 4x\cos 4x\\&=8\sin x\cos x\cos 2x\cos 4x.\end{align}$$
So:
$$\begin{align}\frac{\sin x}{\cos x}&=\tan x\\&=\tan 2x\tan 4x\tan 8x\\&=\frac{64\sin^3 x\cos^3 x \cos 2x}{\cos 8x}
\end{align}$$
Cancelling $\sin x\neq 0$ and multiplying both sides by $\cos x\cos 8x$ you get:
$$\begin{align}\cos 8x &= 64\sin^2x\cos^4x\cos 2x\\
&=64(1-\cos^2 x)\cos^4x (2\cos^2x-1)
\end{align}$$
If $u=\cos x$ then:
$$\cos 8x = T_8(n)=128 u^8 - 256 u^6 + 160 u^4 - 32 u^2 + 1$$
where $T_n$ is the Chebyshev polynomial of the first kind, $T_n(\cos x)=\cos nx.$
Together, this means we have the equation:
$$q(u)=256 u^8 - 448 u^6 + 224 u^4 - 32 u^2 + 1=0$$
Wolfram Alpha helps me compute:
$$q(u)=\frac{T_{15}(u)T_1(u)}{T_3(u)T_5(u)}\tag 1$$
(I theorized this equality after playing with the numerical roots of $q.$)
Wolfram verified (1), but it is not really a satisfying answer for “why?”
So, $u=\cos x$ is a root of $q$ if and only if $\cos 15x=0$ but $\cos 5x\neq 0$ and $\cos 3x\neq 0.$
This amounts to $x=\frac{m\pi}{30}$ where $\gcd(m,30)=1.$
So, in $[-\pi,\pi],$ the solutions are $$\begin{align}x=0,&\pm\frac{\pi}{30},\pm\frac{29\pi}{30},\pm\frac{7\pi}{30},\pm\frac{23\pi}{30},\\
&\pm\frac{11\pi}{30},\pm\frac{19\pi}{30},\pm\frac{13\pi}{30},\pm\frac{17\pi}{30}
\end{align}$$
So, other than $0,$ these are the “primitive roots” of $\cos(15x)=0,$ or the $x$ such that $e^{ix}$ is a primitive $60$th root of unity.
</s>