How to solve this improper integral $\int _{-\infty}^{\infty} e^{ax}/(e^x+1) dx$?

121 Views Asked by At

I need to solve the following integral. $$\int _{-\infty }^{\infty }\:\:\dfrac{e^{ax}}{e^x+1}dx$$

where $0<a<1$.

1

There are 1 best solutions below

3
On

The substitution $e^x \mapsto x$ gives

$$ I = \int_{-\infty}^\infty \frac{e^{ax}}{e^x+1}dx = \int_0^\infty \frac{1}{x^{1-a}(1+x)}dx $$

where $0 < 1-a < 1$

We can use complex integration here. Due to the pole at $z=-1$, we pick a branch cut on the positive real axis such that $0 \le \arg(z) < 2\pi$. The contour is a standard "keyhole contour" consisting of

  • $C_1$: left semicircle centered at $0$ with radius $\epsilon$, going clockwise from $-\epsilon i$ to $\epsilon i$
  • $C_2$: straight line from $\epsilon i$ to $R + \epsilon i$
  • $C_3$: circle centered at $0$ with radius $R$, going counterclockwise from $R+i\epsilon$ to $R - \epsilon i$
  • $C_4$: straight line from $R - \epsilon i$ to $-\epsilon i$

In the limits $\epsilon \to 0$ and $R \to \infty$, the two straight line integrals converge to

$$ \int_{C_2} f(z)\ dz \to \int_0^\infty \frac{1}{x^{1-a}e^{i0(1-a)}(1+x)}dx = I $$

$$ \int_{C_4} f(z)\ dz \to -\int_0^\infty \frac{1}{x^{1-a}e^{i2\pi(1-a)}(1+x)}dx = -e^{i2\pi a}I $$

The remaining integrals should go to $0$

$$ \left\vert\int_{C_1} f(z)dz\right\vert \le \frac{\pi \epsilon}{|z|^{1-a}|1+z|} \le \frac{\pi \epsilon^a}{1-\epsilon} \to 0 $$

$$ \left\vert\int_{C_3} f(z) dz \right\vert \le \frac{2\pi R}{|z|^{1-a}|1+z|} \le \frac{2\pi R^a}{R-1} \to 0 $$

Therefore

$$ (1-e^{i2\pi a})I = 2\pi i\operatorname*{Res}_{z=-1} f(z) = -2\pi i e^{i\pi a} $$

So finally

$$ I = \frac{2\pi ie^{i\pi a}}{e^{2\pi a}-1} = \frac{2\pi i}{e^{i\pi a}-e^{-i\pi a}} = \frac{\pi}{\sin(a\pi)} $$


Edit: Here's a simpler method, credit to @Poujh

$$ I = \int_{-\infty}^\infty \frac{e^{ax}}{e^x+1}dx = \int_{-\infty}^\infty f(x)\ dx $$

Take a rectangular contour:

  • $C_1$: Straight line from $-R$ to $R$
  • $C_2$: Straight line from $R$ to $R + i2\pi$
  • $C_3$: Straight line from $R + i2\pi$ to $-R + i2\pi$
  • $C_4$: Straight line from $-R + i2\pi$ to $-R$

In the limit of $R\to\infty$, we have

$$ \left\vert\int_{C_2} \frac{e^{az}}{e^z+1}\ dz\right\vert = \left\vert\int_0^{2\pi} \frac{e^{a(R+iy)}}{e^{R+iy}+1} dy\right\vert \le 2\pi \left\vert\frac{e^{aR}}{e^R-1}\right\vert \to 0 $$

$$ \left\vert\int_{C_4} \frac{e^{az}}{e^z+1}\ dz\right\vert = \left\vert\int_0^{2\pi} \frac{e^{a(-R+iy)}}{e^{-R+iy}+1} \right\vert \le 2\pi \left\vert \frac{e^{-aR}}{1-e^{-R}} \right\vert \to 0 $$

For the horizontal lines

$$ \int_{C_1} \frac{e^{az}}{e^z+1}\ dz \to \int_{-\infty}^\infty \frac{e^{ax}}{e^x+1}\ dx = I $$

$$ \int_{C_3} \frac{e^{az}}{e^z+1}\ dz \to -\int_{-\infty}^\infty \frac{e^{ax}e^{i2\pi a}}{e^x+1} = -e^{i2\pi a} I $$

We end up with the same result

$$ (1-e^{i2\pi a})I = 2\pi i\operatorname*{Res}_{z=i\pi} \frac{e^{az}}{e^z+1} $$

where the residue is computed using the limit

$$ \lim_{z\to i\pi} e^{az}\frac{z-i\pi}{e^z+1} = -e^{i\pi a} $$