Can someone tell me if my method is valid and my solution correct:

Calculate

if the curve C is the circle:

a.

b.

Okay, the integrand is analytic on and inside the second curve, so the integral is zero there.

For the first curve I rewrite:

.

Then each term is easy to calculate using residues (noting the only singularity is at pi):

Which evaluated at is

Does this work?