i have obviously made a mistake somewhere, can someone please help me find it i've been stuck on this for hours. Thanks

Verify

Now,

so

Now let ,

;

but only is in the contour but Res(f, )

and , so i'm missing a factor of 2 somewhere.