The essential point is that the integral can be written as...

(1)

... where is anentire function[i.e. a fuction which is analytic in the whole complex plane...] , so that the function to be integrate has onlysingle polesin and . In this case we can apply the Cauchy's integral formula...

(2)

... where the are the residues of all single poles inside . Now we have three possibilities...

a) if is the unit circle centered in there are no poles inside and is ...

b) if is the unit circle centered in there is a pole in inside and its residue is so that is ...

c) if is the unit circle centered in there is a pole in inside and its residue is so that is ...

Kind regards