You're observation is going to be helpful here. We want to look at the contour C_R that includes the real axis from -R to R, and then the semicircle of radius R from R to -R in the upper half-plane.
By the residue theorem, the integral of f(z) = e^(iz)/(z^2+a^2)(z^2+b^2) around this contour is just 2pi i times the sum of f's residues at its poles in the upper half plane. So, if we show that as R goes to infinity, the integral on the big semicircle goes to 0, then we'll just have the integral on the real axis of f(z).
Then taking the real part will give us that the desired integral of cos(x)/(x^2+a^2)(x^2+b^2) is Re(2pi*i*[sum of upper-half-plane residues of f]).
However, we have used that none of the poles of f are on the contour, so we should be careful to make sure a and b are both nonzero. but if one of them is 0, then the integral in question doesn't even converge, so that's an ok assumption to make.
Jacob P.
12/21/23
Berlin V.
Thank you for answering. However I have trouble calculating the residues. Since we are dealing with the upper plane I assume we need residues for ia and ib. So I get that Res(ia)=1/2ai and Res(ib)=1/2bi. Is this correct? If yes, what exactly does it mean taking the real part of 2pi*i*[sum of upper-half-plane residues of f])?12/21/23