Given $t\in[0,1]$, $z\in \mathbb{C}$ and $\gamma(t)=4e^{2 i \pi t}$ I need to calculate $$ \int_\gamma \frac{1}{\sin(z)} $$
Now $f(z)=\frac{1}{\sin(z)}=\frac{g(z)}{h(z)}$. For $z_0=0$ we get $g(0)\neq 0$ and $f'(0)=1\neq 0$ so we get with the residue theorem and res$_{z_0}:=r_{z_0}$ using $$ r_{z_0} f=r_{z_0}\frac{g}{h}=r_{z_0}\frac{g(z_0)}{h'(z_0)} $$ so we get $$ r_0 \frac{1}{\sin(z)}=\frac{1}{\cos(0)}=\frac{1}{1} $$ And we would get for the integral in the beginning $$ \int_\gamma \frac{1}{\sin(z)} = 2 \pi i $$ since $$ r_{z_0}:=\frac{1}{2 \pi i}\int_\gamma f(z) dz $$ Is that ok?
The poles are at $0, \pi $ and $-\pi$. The residues at these poles are $1$, $-1$ and $-1$ respectively. So the answer is $2\pi i(1-1-1)=-2\pi i$.