Computing Improper Integrals using the Residue Theorem | Cauchy Principal Value