18
$\begingroup$

Can we find a closed form for this definite integral: $$ \int\nolimits_{- \infty}^{\infty} \frac{\exp\left(-(a+bx)^2\right)}{1+\exp(x)}\mathrm dx $$

$\endgroup$
  • 1
    $\begingroup$ Please be sure to put put the entire problem in the body of the message. Also, if you right-click on the integral, and select "view source", you can see the $\TeX$ code. $\endgroup$ – JavaMan Sep 23 '11 at 4:15
  • $\begingroup$ Chao: Did you make this question up yourself or did you get it from somewhere? $\endgroup$ – Srivatsan Sep 24 '11 at 9:14
  • $\begingroup$ I got this integral when I was trying to calculate the mean of a random variable. $\endgroup$ – Chao Sep 27 '11 at 21:17
17
$\begingroup$

The integral has a closed form when $a = 0$ and $b \neq 0$. (The integral diverges if $b=0$.) We have $$ I = \int_{-\infty}^{\infty} \frac{e^{-b^2x^2}}{1+e^x} dx. $$ Making the substitution $x \to -x$, we can rewrite it as $$ I = \int_{-\infty}^{\infty} \frac{e^{-b^2x^2}}{1+e^{-x}} dx = \int_{-\infty}^{\infty} \frac{e^{-b^2x^2} \cdot e^x}{1+e^{x}} dx. $$ Adding the two integrals and dividing by $2$, $$ I = \frac{1}{2} \int_{-\infty}^{\infty} e^{-b^2x^2} dx = \frac{1}{2 |b|} \int_{-\infty}^{\infty} e^{-y^2} dy, $$ through the substitution $y =|b|x$. Thus we end up with the familiar Gaussian integral, which evaluates to $\sqrt{\pi}$. Thus the given integral is equal to $$ I = \frac{\sqrt{\pi}}{2|b|}. $$

For general $a$, of course, this trick does not work. I think it should be difficult to compute the integral.


Note. The same idea can be used to show that if $f(x)$ is a continuous even function and $c > 0$, then $$ \int_{-c}^c \frac{f(x)}{1+e^x} dx = \frac{1}{2} \int_{-c}^c f(x) dx = \int_0^c f(x) dx. $$

$\endgroup$
7
$\begingroup$

Split integration region and expand $(1+\mathrm{e}^x)^{-1}$: $$ (1+\mathrm{e}^x)^{-1} = \left\{ \begin{array}{ll} \sum_{k \ge 0} (-1)^k \mathrm{e}^{-(k+1)x} & x > 0 \\ \sum_{k \ge 0} (-1)^k \mathrm{e}^{k x} & x \le 0 \end{array} \right. $$ and then integrate term-wise, assuming $b>0$: $$ \int_0^\infty \mathrm{e}^{-(a+b x)^2} \mathrm{e}^{-(k+1) x} \, \mathrm{d} x = \frac{\sqrt{\pi}}{2 b} \exp \left( \frac{(k+1)(k+1+4 a b)}{4 b^2} \right) \mathrm{erfc}\left( a + \frac{k + 1}{2 b} \right) $$ and $$ \int_{-\infty}^0 \mathrm{e}^{-(a+b x)^2} \mathrm{e}^{k x} \, \mathrm{d} x = \frac{\sqrt{\pi}}{2 b} \exp\left( \frac{k(k-4 a b)}{4 b^2} \right) \mathrm{erfc}\left( \frac{k}{2b} -a\right) $$

$\endgroup$
  • 2
    $\begingroup$ ...but there's no known form for an infinite sum of error functions, right? :( $\endgroup$ – J. M. is a poor mathematician Sep 23 '11 at 4:56
  • 1
    $\begingroup$ Yes, I am afraid. $\endgroup$ – Sasha Sep 23 '11 at 4:58
6
$\begingroup$

Wolfram Alpha gives a result with $a=0$ of $\frac{\sqrt{\pi}}{2b}$ (note my $a$ is your $b^2$) but chokes when $a$ is nonzero.

$\endgroup$
4
$\begingroup$

The result of Srivatsan $$\frac{\sqrt{\pi}}{2|b|} = \int_{-\infty}^{\infty} \frac{e^{-b^2x^2}}{1+e^{x}} dx = \int_{-\infty}^{\infty} \frac{e^{-b^2x^2} \cdot e^x}{1+e^{x}} dx$$ gives the case $a=-\frac{1}{2b}$ because this is $$ = e^\frac{1}{4b^2}\int_{-\infty}^\infty\frac{e^{-(-\frac{1}{2b}+bx)^2}}{1+e^{x}} dx. $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.