So I have this complex integral: $$ \oint \frac{dz}{2\pi}\frac{e^{iz(br-(n-r)a)}}{\left(1-(1-q)e^{-ik_{1}-iza}\right)^{n-r}}$$ b,r,q,a,n are all constants in this context.
However I'm not entirely sure what the best way of calculating the residues is?
So far I have that the pole must satisfy $(1-q)e^{-ik_{1}-iza}=1$, which means that $z=\frac{1}{a}(-i\ln(1-q)-k_{1})$. I know that this pole is of order $n-r$ so the formula to calculate the residue is: $$\frac{1}{(n-r-1)!}\frac{d^{(n-r-1)}}{dz^{(n-r-1)}}\left\{\left[z-\frac{1}{a}(-i\ln(1-q)-k_{1})\right]^{n-r}\frac{e^{iz(br-(n-r)a)}}{\left(1-(1-q)e^{-ik_{1}-iza}\right)^{n-r}}\right\}$$
However I can't seem to use this formula to the calculate the residue. Is there a better way of doing it? Or am I just not seeing something obvious? Your help would be much appreciated!