Since is a complete period of the integrand, we may take it as and then replace by . This shows that there is no loss of generality in assuming . Use double angle formulas to see that
It is true that .
The residue at is
The solution is
Main Page : Complex Variables : Residue Calculus