I was having some problems preparing for an exam, and a friend of mine told me about this site :)
I have to prove this: $ \int_0^{2\pi} \frac{d\theta}{a + \cos\theta} = \frac{2\pi}{\sqrt{a^2 - 1}} $
Using
$ z = e^{i\theta}\\ a>1 $
and integrating over the unit circle $|z| = 1$.
I know there are proofs of this relationship, but I can't manage to do it using the unit circle contour.
Afterwards I also have to proof a similar relation, with the integrand squared: $ \int_0^{2\pi} \frac{d\theta}{( a + cos\theta)^2} = \frac{2a\pi}{(a^2 - 1)^{3/2}} $
I've tried to put up the equations, but as far as I can tell there are no poles ($z = -a$ lies outside of the unit circle ). Then I can rewrite
$ \frac{1}{a + z} = \frac{1}{a + \cos\theta + i\sin\theta} $
But then I'm stuck :(