Trigonometric equation $\tan x \tan 2x = \cot 2x \cot 3x$ 
Find $\cos 8x$ if:
$$\tan x \tan 2x = \cot 2x \cot 3x$$

We can verify quickly that $\tan 2x \to \infty$ and $\tan 3x \to \infty$ are not solutions of the trig equation, so the equation may be rewritten as:
$$\tan x \tan^2 2x \tan 3x = 1$$
Using expansion formulas, we may see that:
$$\tan 2x = \frac{2 \tan x}{1 - \tan^2 x}$$
And also:
$$\tan 3x = \frac{3 \tan x - \tan^3 x}{1 - 3 \tan^2 x}$$
By long calculations, I have obtained that:
$$\tan x \in \{-1 - \sqrt{2}, -1 + \sqrt{2}, 1 - \sqrt{2}, 1 + \sqrt{2}\}$$
However, I am not able to take those calculations further. I have learnt about Chebyshev polynomials, but using WolframAlpha, the expression is really hairy and not realy easy to cope with.
Is there a smarter trick to solve the question? If not, how should I simplify my calculations?
 A: Let $t:=\tan x$ and $T:=t^2\ge0$ (assuming $x\in\Bbb R$), so$$\frac{4T^2(3-T)}{(1-T)^2(1-3T)}=1\implies (T+1)(T^2-6T+1)=0\implies T^2-6T+1=0,$$and$$\cos4x=2\left(\frac{1-T}{1+T}\right)^2-1=\frac{T^2-6T+1}{(1+T)^2}=0\implies\cos8x=-1.$$
A: 
$\tan x \tan^2 2x \tan 3x = 1$

Using the product-to-sum identity $\,\tan \theta \tan \varphi ={\frac {\cos(\theta -\varphi )-\cos(\theta +\varphi )}{\cos(\theta -\varphi )+\cos(\theta +\varphi )}}\,$:
$$1 = \tan^2 2x \cdot\frac{\cos 2x - \cos 4 x}{\cos 2 x + \cos 4 x}= \frac{1 - \cos^2 2x}{\cos^2 2x}\cdot\frac{\cos 2x - 2 \cos^2 2x+1}{\cos 2x+2\cos^2 2x - 1} \tag{1}$$
With $\,t = \cos 2x\,$:
$$
\begin{align}
t^2(2t^2+t-1)=(1-t^2)(-2t^2+t+1) \;\;&\iff\;\; 2 t^3 + 2 t^2 - t - 1 = 0
\\ &\iff\;\; (t+1)(2t^2-1) = 0
\\ &\iff\;\; t \in \left\{-1, \pm \frac{\sqrt{2}}{2} \right\}
\end{align}
$$
The root $\,t=-1\,$ must be excluded because the denominator in $\,(1)\,$ vanishes when $\,\cos 2x=-1\,$, which leaves $\,\cos 2x = \pm \frac{\sqrt{2}}{2}\,$.
A: Write $\tan$ and $\cot$ in terms of $\sin$ and $\cos$.
$$\tan x \tan 2x = \cot 2x \cot 3x$$
$$\frac{\sin x}{\cos x}\frac{\sin2x}{\cos2x}=\frac{\cos2x}{\sin2x}\frac{\cos3x}{\sin3x}$$
$$\frac{\sin x}{\cos x}\frac{\sin3x}{\cos3x}=\frac{\cos^2 2x}{\sin^2 2x}$$
$$\frac{\cos2x-\cos4x}{\cos2x+\cos4x}=\frac{1+\cos4x}{1-\cos4x}$$
Using cross multiplication and then simplifying we get,
$$\cos2x\cos4x+\cos4x=0$$
$$\cos4x(\cos2x+1)=0$$
$$\therefore ~~ \cos4x=0 ~~~ \text{or} ~~~ \cos2x=-1$$
$\cos2x=-1$ has the roots $x=n\pi\pm\frac\pi2, n\in\mathbb Z$, where $\tan x$ is undefined.
So we move on with $\cos4x=0$.
Thus, $$\cos8x=2\cos^24x-1=-1.$$
