We are told to compute the integral $$\int_0^{2\pi}\frac{4}{5+3\cos\theta}d\theta.$$ using Cauchy integral formula.
In the solution they take the path to be $\gamma(\theta)=e^{i\theta}$ for $0\leq\theta\leq 2\pi$, and use Euler's formula to perform a substitution to achieve the integral $$\frac{1}{i}\int_\gamma \frac{3}{3z+1}-\frac{1}{z+3}dz.$$
From here we can clearly compute Cauchy integral formula and we get $$\int_0^{2\pi}\frac{4}{5+3\cos\theta}d\theta=2\pi.$$
My question is, why do they take the path to be $\gamma(\theta)=e^{i\theta}$. What are the necessary conditions for a choice of path, would any simple closed path give the same result? If so, is $\gamma(\theta)=e^{i\theta}$ always the optimal path?
I suspect that this has something to do with the roots of polynomials, and the fact that any n degree polynomial in the complex plane has n roots.