Dễ thấy $\sqrt 3\sin 2x-\cos 2x=-2\cos \left(2x+\frac{\pi}3\right)$
Và $\sin \left(x+\frac{\pi}3 \right)=\cos\left( x-\frac{\pi}6\right)$
$pt\Leftrightarrow 4\cos^2\left(x-\frac{\pi}6\right)+2\cos\left( 2x+\frac{\pi}3\right)=a^2$
$\Leftrightarrow 2\left[1+\cos \left(2x-\frac{\pi}{3} \right)\right]+2\cos\left(2x+\frac{\pi}3\right)=a^2 $
$\Leftrightarrow a^2=2+2\cos 2x$
Vì $0 \le 2+2\cos 2x \le 4$
$\Rightarrow 0\le a^2 \le 4\Rightarrow -2 \le a \le 2$