8.353. $\operatorname{tg}^{4} x+\operatorname{ctg}^{4} x+\operatorname{tg}^{2} x+\operatorname{ctg}^{2} x=4$.
Solution.

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

Since

$$
a^{4}+b^{4}=\left((a+b)^{2}-2 a b\right)^{2}-2 a^{2} b^{2} \text { and }(a+b)^{2}=(a+b)^{2}-2 a b,
$$

we have

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

Solving this equation as a biquadratic equation with respect to $\operatorname{tg} x+\operatorname{ctg} x$, we get

$\operatorname{tg} x+\operatorname{ctg} x=-2$ or $\operatorname{tg} x+\operatorname{ctg} x=2$,

$\operatorname{tg}^{2} x+2 \operatorname{tg} x+1=0$ or $\operatorname{tg}^{2} x-2 \operatorname{tg} x+1=0$,

$(\operatorname{tg} x+1)^{2}=0$ or $(\operatorname{tg} x-1)^{2}=0$.

From this, $\operatorname{tg} x= \pm 1 ; x=\frac{\pi}{4}+\frac{\pi k}{2}=\frac{\pi}{4}(2 k+1), k \in Z$.

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