TITLE: Calculating the residues of $f(z)=\frac{e^{az}}{1+e^z}$
QUESTION [7 upvotes]: Let $$f(z)=\frac{e^{az}}{1+e^z}$$
where $0<a<1$ 
Can anyone help me find the residues of this function?
So $$e^z+1=0 \Rightarrow z=i\pi(1+2k)$$ where $k\in \mathbb{Z}$, so these are simple poles (if someone could explain a simple way of showing this that'd be great, other than expansion) 
$$\lim_{z\rightarrow i\pi(1+2k)}\frac{(z-i\pi(1+2k))e^{az}}{1+e^z}=\lim_{z\rightarrow i\pi(1+2k)}\frac{a(z-i\pi(1+2k))e^{az}+e^{az}}{e^z}=e^a$$
So i'm trying to evaluate $\int_{\infty}^\infty f(z)$ you see, so will I need to pick a contour with fixed height otherwise the integral around the contour will be equal to $2\pi i \sum_{n=0}^\infty e^a$

REPLY [3 votes]: When $g(z)$ has a zero of order one at $z = z_0$ (true here since all $g''(z_0) \neq 0$), the residue of $f(z)/g(z)$ at $z = z_0$ is $f(z_0)/g'(z_0)$. 
So for the pole at $z = (1 + 2\pi)ki$, the residue is $e^{(1 + 2\pi)aki}/e^{(1 + 2\pi)ki} = - e^{(1 + 2\pi)aki}$.