Concept:
The general solution of
\[
\cos\theta=\cos\alpha
\]
is
\[
\theta=2n\pi\pm\alpha,
\quad n\in\mathbb Z.
\]
This formula generates all angles having the same cosine value.
Step 1: Simplify the equation.
Given,
\[
2\cos\theta-\sqrt3=0.
\]
Adding \(\sqrt3\) to both sides gives
\[
2\cos\theta=\sqrt3.
\]
Dividing by \(2\),
\[
\cos\theta=\frac{\sqrt3}{2}.
\]
Step 2: Find the principal angle.
We know that
\[
\cos\frac{\pi}{6}
=
\frac{\sqrt3}{2}.
\]
Therefore,
\[
\alpha=\frac{\pi}{6}.
\]
Step 3: Write the general solution.
Using
\[
\theta=2n\pi\pm\alpha,
\]
we obtain
\[
\theta
=
2n\pi
\pm
\frac{\pi}{6},
\quad
n\in\mathbb Z.
\]
Conclusion:
Hence,
\[
\boxed{\theta=2n\pi\pm\frac{\pi}{6},\quad n\in\mathbb Z}.
\]