8. Given $x, y \in\left[-\frac{\pi}{4}, \frac{\pi}{4}\right], a \in \mathbf{R}$, and $x^{3}+\sin x-2 a=0,4 y^{3}+\sin y \cos y+a=0$.
Then $\cos (x+2 y)=$ $\qquad$ .
Let $f(x)=x^{3}+\sin x-2 a$, then $f^{\prime}(x)=3 x^{2}+\cos x \geqslant 0, x \in\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$ $\Rightarrow f(x)$ is an odd function and monotonically increasing on $\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$.

Also, $4 y^{3}+\sin y \cos y+a=0 \Rightarrow(-2 y)^{3}+\sin (-2 y)-2 a=0$,
thus $f(x)=f(-2 y)=0 \Rightarrow x+2 y=0 \Rightarrow \cos (x+2 y)=1$.