There is a textbook question asking to evaluate the definite trigonometric integral using Cauchy's Formula.
$$\int_{\theta=0}^{2\pi} \frac{\mathrm{d}\theta}{3+\sin\theta+\cos\theta}$$
I am really confused as to how to approach this with the denominator like that. I figured the identities $\sin\theta=\frac1{2i}\left(z-\frac1z\right)$ and the similar one for $\cos\theta$ would have to be used, but I can't figure out how.
It's the same as integrating from $-\pi$ to $\pi$. Tangent half-angle substitution $z = \tan(\theta / 2)$ turns $\sin(\theta)$ into $\frac{2z}{1+z^2}$ and $\cos(\theta)$ into $\frac{1-z^2}{1+z^2}$ and $\mathrm{d}\theta$ into $\frac{2 \, \mathrm{d}z}{1+z^2},$ so it always works on these kind of integrals. You get $$\int_{-\pi}^{\pi} \frac{1}{3+\sin(\theta)+\cos(\theta)} \, \mathrm{d}\theta = \int_{-\infty}^{\infty} \frac{2}{3(1+z^2) + 2z + 1 - z^2} \, \mathrm{d}z = \int_{-\infty}^{\infty} \frac{1}{z^2 + z + 2}\, \mathrm{d}z.$$