If the complex function is analyzed in the corresponding closed region: integral =0.
If the complex variable function has non-analytic points in the corresponding closed region, it is solved by residue theorem.
These are definitely the graduate problems that I can't solve. Please refer to privat's complex variable theory.