5.4 $2(\cos 4 x-\sin x \cos 3 x)=\sin 4 x+\sin 2 x$.

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

5.4 $2(\cos 4 x-\sin x \cos 3 x)=\sin 4 x+\sin 2 x$.
5.4 Let's rewrite the equation as

$\cos 4 x=\sin x \cos 3 x+0.5(\sin 4 x+\sin 2 x)$.

Transform the right side of the equation:

$\sin x \cos 3 x+0.5 \cdot 2 \sin 3 x \cos x=\sin 4 x$

Thus, $\cos 4 x=\sin 4 x$, from which $\operatorname{tg} 4 x=1 ; 4 x=\frac{\pi}{4}+\pi k, x=$ $=\frac{\pi}{16}(4 k+1)$ (division by $\cos 4 x$ is possible since the values of $x$ for which $\cos 4 x=0$ are not solutions to the equation).

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