I need to solve the following integral. $$\int _{-\infty }^{\infty }\:\:\dfrac{e^{ax}}{e^x+1}dx$$
where $0<a<1$.
I need to solve the following integral. $$\int _{-\infty }^{\infty }\:\:\dfrac{e^{ax}}{e^x+1}dx$$
where $0<a<1$.
Copyright © 2021 JogjaFile Inc.
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
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:
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} $$