8.364. $\cos 2 x=\frac{1+\sqrt{3}}{2} \cdot(\cos x+\sin x)$.

Translate the above text into English, keeping the original text's line breaks and format, and output the translation result directly.

8.364. $\cos 2 x=\frac{1+\sqrt{3}}{2} \cdot(\cos x+\sin x)$.
Solution.

Let's write the equation as

$\cos ^{2} x-\sin ^{2} x-\frac{1+\sqrt{3}}{2}(\cos x+\sin x)=0 \Leftrightarrow$

$\Leftrightarrow(\cos x+\sin x)(\cos x-\sin x)-\frac{1+\sqrt{3}}{2} \cdot(\cos x+\sin x)=0 \Leftrightarrow$

$\Leftrightarrow(\cos x+\sin x)\left(\cos x-\sin x-\frac{1+\sqrt{3}}{2}\right)=0$.

From this, 1) $\cos x+\sin x=0, 2) \cos x-\sin x-\frac{1+\sqrt{3}}{2}=0$.

1) $\operatorname{tg} x=-1, x_{1}=-\frac{\pi}{4}+\pi k=\frac{\pi}{4}(4 k-1), k \in Z$
2) $\cos x-\sin x-\frac{1}{2}-\frac{\sqrt{3}}{2}=0 \Leftrightarrow\left(\cos x-\frac{1}{2}\right)-\left(\sin x+\frac{\sqrt{3}}{2}\right)=0 \Leftrightarrow$

$$
\begin{aligned}
& \Leftrightarrow\left(\cos x-\cos \frac{\pi}{3}\right)-\left(\sin x+\sin \frac{\pi}{3}\right)=0 \Leftrightarrow \\
& \Leftrightarrow-2 \sin \left(\frac{x}{2}+\frac{\pi}{6}\right) \sin \left(\frac{x}{2}-\frac{\pi}{6}\right)-2 \sin \left(\frac{x}{2}+\frac{\pi}{6}\right) \cos \left(\frac{x}{2}-\frac{\pi}{6}\right)=0 \Leftrightarrow \\
& \Leftrightarrow-2 \sin \left(\frac{x}{2}+\frac{\pi}{6}\right)\left(\sin \left(\frac{x}{2}-\frac{\pi}{6}\right)+\cos \left(\frac{x}{2}-\frac{\pi}{6}\right)\right)=0
\end{aligned}
$$

Then

$$
\sin \left(\frac{x}{2}+\frac{\pi}{6}\right)=0, \frac{x}{2}+\frac{\pi}{6}=\pi n, x_{2}=-\frac{\pi}{3}+2 \pi n, n \in Z
$$

or

$$
\begin{aligned}
& \sin \left(\frac{x}{2}-\frac{\pi}{6}\right)+\cos \left(\frac{x}{2}-\frac{\pi}{6}\right)=0 \Leftrightarrow \operatorname{tg}\left(\frac{x}{2}-\frac{\pi}{6}\right)=-1, \frac{x}{2}-\frac{\pi}{6}=-\frac{\pi}{4}+\pi m \\
& x_{3}=-\frac{\pi}{6}+2 \pi m, m \in Z
\end{aligned}
$$

Answer: $x_{1}=\frac{\pi}{4}(4 k-1), k \in Z ; x_{2}=\frac{\pi}{3}(6 n-1), n \in Z$;

$$
x_{3}=\frac{\pi}{6}(12 m-1), m \in Z
$$