8.124. $\operatorname{tg} x+\operatorname{ctg} x=2 \cos^{-1} 4 x$.
## Solution.

Domain of definition: $\left\{\begin{array}{l}\cos x \neq 0, \\ \sin x \neq 0, \\ \cos 4 x \neq 0 .\end{array}\right.$

From the condition

$$
\begin{aligned}
& \frac{\sin x}{\cos x}+\frac{\cos x}{\sin x}-\frac{2}{\cos 4 x}=0, \frac{\sin ^{2} x+\cos ^{2} x}{\sin x \cos x}-\frac{2}{\cos 4 x}=0 \Leftrightarrow \\
& \Leftrightarrow \frac{1}{\sin 2 x}-\frac{1}{1-2 \sin ^{2} 2 x}=0 \Rightarrow 2 \sin ^{2} 2 x+\sin 2 x-1=0
\end{aligned}
$$

Solving this equation as a quadratic in $\sin 2 x$, we find $(\sin 2 x)_{1}=-1, 2 x_{1}=-\frac{\pi}{2}+2 \pi k, x_{1}=-\frac{\pi}{4}+\pi k, k \in \mathbb{Z}; (\sin 2 x)_{2}=\frac{1}{2}$, $2 x_{2}=(-1)^{\prime} \frac{\pi}{6}+\pi l, x_{2}=(-1)^{\prime} \frac{\pi}{12}+\frac{\pi l}{2}, l \in \mathbb{Z}$. Combining the solutions $x_{1}$ and $x_{2}$, we get $x=\frac{\pi}{12}+\frac{\pi k}{3}=\frac{\pi}{12}(4 k+1), k \in \mathbb{Z}$.

Answer: $\quad x=\frac{\pi}{12}(4 k+1), k \in \mathbb{Z}$.