1. The problem statement, all variables and given/known data I am to integrate cos(2x)/(x-i*pi) from -inf to inf 2. Relevant equations 3. The attempt at a solution The problem I'm having is this: I write cos(2x) in exponential form, e^(2iz), so f(z) = e^(2iz)/(z-i*pi). I choose a large semicircle in the UHP as my contour. At large R, the integral over the arc goes to 0. There is a simple pole at z=i*pi. The residue at the simple pole is then lim z-->i*pi [e^(2iz)] = e^(-2pi), so I get the integral to be 2*pi*i*e^(-2pi). But the answer is pi*i*e^(-2pi), half of what I get. This answer can be gotten if one writes cos(2z) in the UHP as 1/2(e^(2iz)), but other problems with sine or cosine I have successfully solved writing sine or cosine without using this factor of 1/2. What am I missing here?