So I'm working on a Residue theory problem set. I was doing fine until I got to this one:

The integral, from -infinity to infinity of:

(cosx-isinx)/(1+x^2) dx

My first idea was to rewrite the top by adding adding and subtracting cosx:

(-cosx-isinx)+2cosx=-e^(ix)+2cosx

And then proceed by splitting up into 2 integrals.

int(2cosx/(1+x^2))-int(e^ix/(1+x^2))

But I am stuck on this. The first integral shouldn't be too bad. I think there are 2 simple poles, at +/- i. I would integrate around the upper half disk including i. so the integral would just be 2pi(Res(f,i)+Res(f,-i)).

For the second one I want to proceed the same way, but I shaky with figuring out poles with something new (e^ix) in the numerator.