$\newcommand{\ds}[1]{\displaystyle{#1}}$ I have the contour integral $$ \oint_{\left\vert\,z\,\right\vert\ =\ 2}\frac{1}{\cos(z)\sin{z}}dz $$ To make it easier to work with, I use $\ds{\sin(z)=\frac{e^{iz}-e^{-iz}}{2i}}$ and $\ds{\cos(z)=\frac{e^{iz}+e^{-iz}}{2}}$, which when the reciprocal is taken and they are multiplied together I get $\ds{\frac{1}{\sin(z)\cos(z)}= \frac{4i}{e^{2iz}-e^{-2iz}}}$.
I put this back into the integral to get $\ds{4i\int_{-\infty}^{\infty}\frac{1}{e^{2iz}}dz-4i\int_{-\infty}^{\infty}\frac{1}{e^{-2iz}}dz}$.
The second integral can be rewritten as $\ds{-4i\int{e^{2iz}}dz}$, which has no poles so its integral should be $\ds{0}$.
I think with the same logic, I can make the first integral $\ds{4i\int{e^{-2iz}}dz}$, which also has not poles, so the integral is $\ds{0}$ ?.Is this logic valid ?.