I would like to calculate the residue of $$\frac{e^{z}}{\sin(iz)} \quad \text{at} \quad -n\pi i.$$ I know that this is a first order pole and I already tried it with power series, but I'm not able to get the result from the solutions, which is $(-1)^n$
Also is there a generalized way to calculate the residue of such fractions?
You can use the formula $$\text{Res}_{z=z_0} f=\lim_{z\rightarrow z_0} (z-z_0) f(z).$$ In this case, we can use the Taylor series of $\sin iz$ to get that \begin{align*} &\lim_{z\rightarrow -n\pi i}(z+n\pi i)\frac{e^z}{\sin iz}\\ &=\lim_{z\rightarrow -n\pi i}(z+n\pi i)\frac{e^z}{\sin (n\pi )+i\cos {n\pi }(z+n\pi i)+\cdots}\\ &=\frac{e^{-n\pi i}}{i\cos n\pi}=-i, \end{align*} since $\sin{n\pi}=0$ and $\cos n\pi=(-1)^n.$