Hint for the First one First compute
Where R is the rational function given by
How to do this using the residue theorem? Put , thus
Then I can be seen as a contour integral, solve it by using residues
Hence in your case the integral you will compute is
which can be easily obtain by the residue theorem!
Finally: Note that
and hence your result follows by computing the next integral
For the second integral:
Note first that this integral is easily done by recognizing that , so the integral is really
One may also use the residue theorem. However, one must choose an appropriate contour and integrand. In this case, a useful contour integral to consider is
where C is a keyhole contour of outer radius R about the positive real axis. The contour integral is then equal to
As , the second integral vanishes as . As , the fourth integral vanishes as . Thus, the contour integral is, in this limit
By the residue theorem, the contour integral is also equal to times the residue at the pole . (Note how important it is to get the argument correct.) The residue at this pole is
Putting this altogether, we get that
which agrees with the above.
Hint for the first one:
Consider the function
and find its poles. Then use the known formula for residues:
Under the assumption that f has a pole of order m at
And finally, apply the Residue Theorem.