8.158. $\operatorname{tg} x \operatorname{tg} 20^{\circ}+\operatorname{tg} 20^{\circ} \operatorname{tg} 40^{\circ}+\operatorname{tg} 40^{\circ} \operatorname{tg} x=1$.
## Solution.

Domain of definition: $\cos x \neq 0$.

By the condition

$\frac{\sin x \sin 20^{\circ}}{\cos x \cos 20^{\circ}}+\frac{\sin 20^{\circ} \sin 40^{\circ}}{\cos 20^{\circ} \cos 40^{\circ}}+\frac{\sin 40^{\circ} \sin x}{\cos 40^{\circ} \cos x}-1=0$,

$\left(\sin x \sin 20^{\circ} \cos 40^{\circ}+\sin x \cos 20^{\circ} \sin 40^{\circ}\right)+$ $+\left(\cos x \sin 20^{\circ} \sin 40^{\circ}-\cos x \cos 20^{\circ} \cos 40^{\circ}\right)=0$, $\sin x\left(\sin 20^{\circ} \cos 40^{\circ}+\cos 20^{\circ} \sin 40^{\circ}\right)$

$-\cos x\left(\cos 20^{\circ} \cos 40^{\circ}-\sin 20^{\circ} \sin 40^{\circ}\right)=0 \Leftrightarrow$ $\Leftrightarrow \sin x \sin \left(20^{\circ}+40^{\circ}\right)-\cos x \cos \left(20^{\circ}+40^{\circ}\right)=0, \sin x \sin 60^{\circ}-$
$-\cos x \cos 60^{\circ}=0, \quad-\cos \left(x+60^{\circ}\right)=0, \quad x+60^{\circ}=90^{\circ}+180^{\circ} k$, $x=30^{\circ}+180^{\circ} k, k \in \mathbb{Z}$.

Answer: $\quad x=30^{\circ}+180^{\circ} k, \quad k \in \mathbb{Z}$.