8.342. $\operatorname{tg}^{2} x+\operatorname{ctg}^{2} x+3 \operatorname{tg} x+3 \operatorname{ctg} x+4=0$.

8.342. $\tan^{2} x+\cot^{2} x+3 \tan x+3 \cot x+4=0$.
## Solution.

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

Write the equation in the form

$$
\begin{aligned}
& (\operatorname{tg} x+\operatorname{ctg} x)^{2}-2 \operatorname{tg} x \operatorname{tg} x+3(\operatorname{tg} x+\operatorname{ctg} x)+4=0 \\
& (\operatorname{tg} x+\operatorname{ctg} x)^{2}+3(\operatorname{tg} x+\operatorname{ctg} x)+2=0
\end{aligned}
$$

Solving this equation as a quadratic in $\operatorname{tg} x+\operatorname{ctg} x$, we get $(\operatorname{tg} x+\operatorname{ctg} x)_{1}=-2$ or $(\operatorname{tg} x+\operatorname{ctg} x)_{2}=-1$.

1) $\operatorname{tg} x+\frac{1}{\operatorname{tg} x}+2=0 \Leftrightarrow \operatorname{tg}^{2} x+2 \operatorname{tg} x+1=0,(\operatorname{tg} x+1)^{2}=0, \operatorname{tg} x=-1$, $x=-\frac{\pi}{4}+\pi k=\frac{\pi}{4}(4 k-1), k \in Z$.
2) $\operatorname{tg}^{2} x+\operatorname{tg} x+1 \neq 0(D<0), \varnothing$.

Answer: $x=\frac{\pi}{4}(4 k-1), k \in Z$.