$cos2x+cosx+\sqrt{3}sinx=\frac{1}{2}$$\Leftrightarrow 2(cos^{2}x-sin^{2}x)+2cosx+2\sqrt{3}sinx-(sin^{2}x+cos^{2})=0$
$\Leftrightarrow cos^{2}x-3sin^{2}x+2cosx+2\sqrt{3}sinx+1-1=0$
$\Leftrightarrow (cosx+1)^{2}-(\sqrt{3}sinx-1)^{2}=0$
$\Leftrightarrow \left[ {} \right.\begin{matrix} cosx-\sqrt{3}sinx=-2\\ cosx+\sqrt{3}sinx=0 \end{matrix}$
$\Leftrightarrow \left[ {} \right.\begin{matrix} sin(\frac{\pi }{6}-x)=....\\ sin(\frac{\pi }{6}+x)=..... \end{matrix}$