2. Given $x, y \in\left[-\frac{\pi}{4}, \frac{\pi}{4}\right], a \in R$, and $x^{3}+\sin x-2 a=0,4 y^{3}+\sin y \cos y+a=0$. Then $\cos (x+2 y)=$ $\qquad$ .
2.1.

Given that $x^{3}+\sin x=2 a=(-2 y)^{3}+\sin (-2 y)$. Let $f(t)=t^{3}+\sin t$, then $f(x)=f(-2 y)$. The function $f(t)=t^{3}+\sin t$ is strictly increasing on $\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$. Therefore, $x=-2 y, x + 2 y=0$. Hence, $\cos (x+2 y)=1$.