Why are these asked in the section about residue/cauchy calculus
$$\int_{- \pi}^{\pi} \frac{cos(\theta)}{2+cos(\theta)} d\theta$$
or
$$\int_{0}^{2\pi} \frac{sin(\theta)}{2+cos(\theta)} d\theta$$
Because isn't the denominator never equal to zero anyways? So why do we need to integrate over countours?