Evaluation of real trigonometric integrals using the Cauchy Residue Theorem

$I = \int^{2\pi}_0 \dfrac{d\theta}{2 - \cos \theta}$

This is straight from a book I'm reading, which suggests to convert $\cos\theta$ into $0.5(z+1/z)$ and then solve the integral on the unit circle. This is what I don't understand. The two singularities of this function are at $2\pm \sqrt 3$ and so the unit circle only encircles one of the singularities. The rest of the calculations I understand, but I just don't understand how you can decide to calculate this on the unit circle and not a circle of a different radius? My only idea is that changing the radius of the circle on which the contour integral is evaluated will shift the singularities appropriately, is this the case?

As an aside, is there a difference between the term "singularity" and "pole" in contour integration?

In a mixed real/complex-analytic way we can notice that: $$I = \int_{0}^{2\pi}\frac{d\theta}{2-\cos\theta}=2\int_{0}^{\pi}\frac{d\theta}{2-\cos\theta}=8\int_{0}^{\pi/2}\frac{d\theta}{4-\cos^2\theta}$$ and by replacing $\theta$ with $\arctan t$ we get: $$I = 8\int_{0}^{+\infty}\frac{dt}{3+4t^2} = 4\int_{\mathbb{R}}\frac{dt}{3+4t^2}=2\int_{\mathbb{R}}\frac{dz}{3+z^2}$$ and the last integral can be computed through the residue of the integrand function in the simple pole $z=i\sqrt{3}$ (aside: not every singularity is a simple pole. Multiple poles and essential singularities may occur, too), leading to: $$I = \frac{2\pi}{\sqrt{3}}.$$

The substitution $\cos{\theta}=\frac{1}{2}(z+1/z)$ is actually $z=e^{i\theta}$, which, for $0<\theta<2\pi$, parametrises the circle $|z|=1$. This is a closed contour, so you can then evaluate the integral by looking at the one pole inside it.

Poles are a particular type of singularity, the ones that have an expansion with finitely many negative terms. Since you're only interested in the coefficient of $1/(z-z_0)$, yes, poles are basically the same as singularities: you're unlikely to have to deal with essential singularities, and removable ones don't do anything.

$$z=e^{i\theta} \\ dz=izd\theta$$ so $$I = \int_{|z|=1} \frac{2i}{z^2-4z+z}dz$$ the residue at $z=2-\sqrt{3}$ is

$r=\lim_{z \to 2-\sqrt{3}}(z-(2-\sqrt{3})) \frac{2i}{ (z-(2-\sqrt{3})(z-(2+\sqrt{3}))}=\frac{-i}{\sqrt{3}}$

and the integral is $2\pi ir = \frac{2\pi}{\sqrt{3}}$

as a check on the answer you may use the expansion: $$\frac1{2-\cos \theta}=\frac12(1-\frac12 \cos \theta)^{-1} =\frac12 \sum_{n=0}^\infty 2^{-n}\cos^n\theta$$ in the integral over the period $2\pi$ odd powers of $\cos\theta$ give zero, so $$I = \frac12\sum_{n=0}^\infty2^{-2n}\int_0^{2\pi}\cos^{2n}\theta d\theta$$ repeated integration by parts gives: $$\int_0^{2\pi}\cos^{2n}\theta d\theta = \frac{2n-1}{2n} \frac{2n-3}{2n-2}\cdots\int_0^{2\pi}d\theta = \frac{(2n)!}{(n!)^2}2^{-2n} 2\pi$$ hence $$I = \pi\sum_{n=0}^\infty \frac{(2n)!}{(n!)^2}4^{-2n} = \pi(1-\frac14)^{-\frac12}$$ (using the binomial theorem to obtain the closed-form expression on the right)