# A hard integral

Looking for a solution for an integral: $$I(k)=\int_0^{\infty } \frac{e^{-\frac{(\log (u)-k)^2}{2 s^2}}}{\sqrt{2 \pi } s \left(1+u\right)} \, du .$$ So far I tried substitutions and by parts to no avail.

• If you had $u$ instead of $(1+u)$ in the denominator, the integrand would be the density of the lognormal distribution.
– mlc
Commented Mar 10, 2017 at 15:48
• Similar to @mlc, written another way, if we say that $\phi(x|\mu,\sigma^2)$ is the density of a normal r.v. with mean $\mu$ and variance $\sigma^2$, then $$I(k) = \int_0^\infty \frac{\phi(\log(u)|k,s^2)}{(1+u)}du.$$ Commented Mar 10, 2017 at 15:52
• @LeGrandDODOM I believe it is the snowball effect. If it happens to have a catchy title, it gets many views very quickly. If it gets many views very quickly and some actions, it remains at the top of the page. Since it is at the top of the page, and has a catchy title, it gets more views, etc. Commented Mar 10, 2017 at 16:04
• Is $s$ a constant? Commented Mar 10, 2017 at 16:19
• @RaghavChaturvedi yes, $s$ is a constant.
– Nero
Commented Mar 10, 2017 at 16:20

The change of variable $v = \log u$ shows that you're trying to integrate the logistic-normal integral.

$$\int_{-\infty}^{\infty} \frac{e^{-\frac{1}{2}\left(\frac{v-k}{s}\right)^2}}{\sqrt{2\pi} s} \frac{1}{1+e^{-v}}~\mathrm{d}v$$

I doubt there is a closed form solution, and none seems known.

$$\left|I(s,k)- \frac{1}{1+e^{-\frac{k}{\sqrt{1+\frac{\pi s^2}{8}}}}}\right| < 0.02$$

and http://www.sciencedirect.com/science/article/pii/S0377042712002518 for a deeper discussion.

• Hmmm. Good answer. Definitely shows that a closed form is unlikely. Commented Mar 10, 2017 at 22:19

Here is a start: $I(0) = \frac{1}{2}$

Proof:

$$I(0) = \int\limits_0^\infty \frac{\exp\left[-\frac{(\log u)^2}{2s^2}\right]}{\sqrt{2\pi} s (1+u)} \rm{d}u$$

Put $\log u = x$

\begin{align} I(0) &= \int\limits_{-\infty}^\infty \frac{\exp\left[-\frac{x^2}{2s^2}\right]}{\sqrt{2\pi} s} \frac{e^x}{1+e^x} \rm{d}x \\ &= \int\limits_{-\infty}^\infty \frac{\exp\left[-\frac{x^2}{2s^2}\right]}{\sqrt{2\pi} s}\rm{d}x - \int\limits_{-\infty}^\infty \frac{\exp\left[-\frac{x^2}{2s^2}\right]}{\sqrt{2\pi} s} \frac{1}{1+e^x} \rm{d}x \end{align}

The first integral is $1$. Call the second integral $K$. $$K=\int\limits_{-\infty}^\infty \frac{\exp\left[-\frac{x^2}{2s^2}\right]}{\sqrt{2\pi} s} \frac{1}{1+e^x} \rm{d}x$$

Flipping the range around $0$, $$K=\int\limits_{-\infty}^\infty \frac{\exp\left[-\frac{x^2}{2s^2}\right]}{\sqrt{2\pi} s} \frac{1}{1+e^{-x}} \rm{d}x$$

Now take the average of the two expressions, \begin{align} K &=\frac{1}{2}\int\limits_{-\infty}^\infty \frac{\exp\left[-\frac{x^2}{2s^2}\right]}{\sqrt{2\pi} s} \left[\frac{1}{1+e^x}+\frac{1}{1+e^{-x}}\right] \rm{d}x\\ &=\frac{1}{2}\int\limits_{-\infty}^\infty \frac{\exp\left[-\frac{x^2}{2s^2}\right]}{\sqrt{2\pi} s}\rm{d}x\\ &=\frac{1}{2}\\ I(0) &= 1 - K = \frac{1}{2} \end{align}

• The devil is for $k$ different from 0. This result is easily reached by expanding arounf $k$. Even Mathematica integrates to ½ for $k=0$.
– Nero
Commented Mar 10, 2017 at 20:42

If $k$ is an integer multiple of $s^2$, then it appears you can use the result $I(0)=\frac12$ to obtain $I(k)$ as a sum of a finite number of terms.

• But this doesn't really seem to answer the question... Commented Mar 11, 2017 at 0:06
• Start with the logistic-normal shown in Arthur's answer. Expand the 1/(1+e^(-v)) = 1 - e^(-v) + e^(-2v) - ... . Then integrate term by term (each one can be done in closed form). You get an infinite series of terms. But for k an integer multiple of s^2, you can sum the series for I(k). It helps to know that the series for I(0) sums to 1/2. Commented Mar 11, 2017 at 0:10
• So why isn't all the exposition in your answer? Answers should be complete! Commented Mar 11, 2017 at 0:12
• Indeed, that sum is derived in the second link I posted. sciencedirect.com/science/article/pii/S0377042712002518 Commented Mar 11, 2017 at 8:18