7

I would like to know how the integral \begin{equation} \int_{-\infty}^{+\infty}\frac{e^{-x^2}}{e^{-x} + 1}dx \end{equation} can be evaluated. Mathematica says the value is $\sqrt{\pi}/2$. I thought I could get this using Residue theorem but I'm having trouble showing that the arc \begin{equation} \int_{0}^\pi\frac{e^{-R^2e^{2i\theta}}}{e^{-Re^{i\theta}} + 1}iRe^{i\theta}d\theta \end{equation} would go to zero as $R\rightarrow 0$, mainly because $e^{-R^2e^{2i\theta}}$ is actually large when $\theta$ is around $\pi/2$.

Ultimately, I'm actually interested in a slightly more general integral which Mathematica won't evaluate at all: \begin{equation} \int_{-\infty}^{+\infty}\frac{e^{-a(x-b)^2}}{e^{-x} + 1}dx. \end{equation} So I'm hoping that understanding the simple case above will help me.

user113988
  • 2,652

3 Answers3

9

Note that $\frac1{e^{-x}+1}=\frac12 (1+\tanh\frac x2)$, where the odd function $\tanh\frac x2$ does not contribute to the integral. Thus

\begin{equation} \int_{-\infty}^{+\infty}\frac{e^{-x^2}}{e^{-x} + 1}dx =\frac12 \int_{-\infty}^{+\infty}{e^{-x^2}}dx= \frac{\sqrt{\pi}}2 \end{equation}

Quanto
  • 97,352
9

Note Kings Property: $ \displaystyle \int_{a}^{b}f(x)dx = \int_{a}^{b}f(a+b-x)dx \implies \int_{-a}^{a}f(x)dx = \int_{-a}^{a}f(-x)dx$

Using this rule:
$\displaystyle I=\int_{-a}^{a}\frac{e^{-x^2}}{e^{-x} + 1}dx =\int_{-a}^{a}\frac{e^{-x^2}}{e^{x} + 1}dx $

Adding both of these we get $\displaystyle 2I = \int_{-a}^{a}\frac{e^{-x^2}(e^{x} + 1)}{e^{x} + 1}dx = \int_{-a}^{a}e^{-x^2}dx$

So $\displaystyle \int_{-\infty}^{\infty}\frac{e^{-x^2}}{e^{-x} + 1}dx = \dfrac{1}{2} \int_{-\infty}^{\infty}e^{-x^2}dx$, your deseired result.

Now coming to your second doubt: can this property be applied?

Sid
  • 1,234
0

Let f(x) be an even function and g(x) be an odd function and b be a positive real number: $$ \int_{-\alpha}^{\alpha}{\frac{f(x)}{1+b^{g(x)}}dx} = \int_{-\alpha}^{0}{\frac{f(x)}{1+b^{g(x)}}dx} + \int_{0}^{\alpha}{\frac{f(x)}{1+b^{g(x)}}dx} =I = I_1 + I_2 $$ Let x = -x: $$ -\int_{\alpha}^{0}{\frac{f(-x)}{1+b^{g(-x)}}dx} = \int_{0}^{\alpha}{\frac{f(x)}{1+b^{-g(x)}}dx} $$ $$ multiplying \space by \space \frac{b^{g(x)}}{b^{g(x)}} gives $$ $$ \int_{0}^{\alpha}{\frac{b^{g(x)}f(x)}{1+b^{g(x)}}dx} $$ Repeating the same process for the other integral, we get: $$ I_1 + I_2 = \int_{0}^{\alpha}{\frac{(1+b^{g(x)})f(x)}{(1+b^{g(x)})}dx} = \int_{0}^{\alpha}{f(x)dx} $$

Now, noting that the numerator is an even function and the power of the exponential in the denominator, that is -x, is an odd function: $$ \int_{-\infty}^{\infty}{\frac{e^{-x^2}}{1+e^{-x}}dx}=\int_{0}^{\infty}{e^{-x^2}dx} = \frac{\sqrt{\pi}}{2} \space \space \space \space \square $$

Saman
  • 91