= Rectangular contour for an exponential beta integral
{title2=$\int_{-\infty}^{\infty}\frac{e^{ax}}{1+e^x}\,dx=\frac{\pi}{\sin(\pi a)}$}
For $0<a<1$, integrate $e^{az}/(1+e^z)$ around a rectangle of imaginary height $2\pi$. Its single pole at $\pi i$ has residue $-e^{\pi ia}$, the top-edge integral is $-e^{2\pi ia}$ times the bottom-edge integral, and both vertical sides vanish at large real width. The <residue theorem> gives $\int_{\mathbb R}e^{ax}/(1+e^x)\,dx=\pi/\sin(\pi a)$. Substitution $t=e^x$ gives the equivalent integral $\int_0^\infty t^{a-1}/(1+t)\,dt$.
Back to article page