Integrating $\int_{-\infty}^{\infty}\frac{e^{ax}}{1+e^x}dx$ for $0<a<1$.

193 Views Asked by At

I'm supposed to find the value of $\int_{-\infty}^{\infty}\frac{e^{ax}}{1+e^x}dx$ for $0<a<1$. I wanted to integrate over the upper semicircle of radius $R$, and take the limit as $R\to\infty$.

I'm fairly certain that the integral of the upper half of the circle $|z|=R$ will tend to $0$ as $R\to \infty$, so I should be left with

$$\int_{-\infty}^{\infty}\frac{e^{ax}}{1+e^x}dx=2\pi i\cdot\text{Res}_{z=i\pi}\left(\frac{e^{az}}{1+e^z}\right)=2\pi i\frac{e^{az}}{e^z}\biggr\vert_{z=i\pi}=2\pi ie^{(a-1)i\pi}$$

However, when I check my answer on Wolfram Alpha for say $a=1/2$, it says the value is $\pi$, which is clearly not what I would get. What am I doing wrong?

1

There are 1 best solutions below

1
On BEST ANSWER

Approach 1.
Suggested by Lost in a Maze.

Integrate $\frac{e^{az}}{1+e^z}$ along the rectangle with vertices $\pm R,$ $\pm R +2\pi i$ and let $R$ tend to $\infty$, we would have \begin{align} \left(1-e^{2a\pi i}\right)\int_{-\infty}^\infty \frac{e^{ax}}{1+e^x} dx&=2\pi i\,\operatorname{Res} \left(\frac{e^{az}}{1+e^z}; \pi i\right)\\ &=-2\pi ie^{a\pi i}.\end{align} This yields $$ \int_{-\infty}^\infty \frac{e^{ax}}{1+e^x} dx=\frac{\pi}{\sin a\pi}.$$

Approach 2.
If we make a substitution $t=e^x$, the integral $\int_{-\infty}^\infty \frac{e^{ax}}{1+e^x} dx$ will be $$ \int_0^\infty \frac{t^{a-1}}{1+t} dt.$$ This integral can be seen in so many books, for instance, see Gamelin's Complex Analysis, p.207. It can be evaluated by integration of $\frac{z^{a-1}}{1+z}$ around a keyhole contour.