# An integral involving hyperbolic functions

I am wondering if it is possible to obtain a closed-form formula for $$f(\alpha) = \frac{1}{{\sqrt{2 \pi } \; \alpha }} \int^\infty_{-\infty} x^2 \cosh(x) \; e^{-\frac{\sinh ^2(x)}{2 \alpha ^2}} \mathop{}\!\mathrm{d}x \; .$$ This integral came up when I tried to calculate the second moment of the random variable $$\DeclareMathOperator\arsinh{arsinh} X = \arsinh(Z \cdot \alpha)$$ where $Z \sim \mathcal{N}(0, 1)$ is a normally distributed random variable and $\arsinh$ denotes the inverse hyperbolic sine.

Motivation/Context: The above came up as I was investigating whether $\arsinh$ could be a useful variance-stabilizing, non-saturating activation function for artificial neural networks. For more details, see this Reddit thread and the original research cited there.

• asymptotics in $\alpha$ is certainly possible, but an exact closed-form expression for all $\alpha$ seems unlikely. Commented Jun 25, 2017 at 20:31

Using a change of variables, I get

$$f(\alpha) = \frac{1}{\sqrt{2\pi} \alpha} \int_0^\infty \frac{\text{arcsinh}^2(\sqrt{x})}{\sqrt{x}} e^{-x/(2\alpha^2)}\; dx$$ so this is basically the Laplace transform of $\text{arcsinh}^2(\sqrt{x})/\sqrt{x}$. Neither Maple nor Wolfram Alpha find a closed-form solution for this.

• Hello Robert, thanks for the response. I think the denominator in the exponent should be $2 \alpha^2$, not $2 \alpha$. Commented Jun 26, 2017 at 18:36

The small-$\alpha$ asymptotics is $f(\alpha)=\alpha^2$. For larger $\alpha$, you can replace the exponential function $e^{-x/2\alpha^2}$ in Robert Israel's expression by a cutoff at $x=2\alpha^2$, and then the integral can be evaluated in closed form, $$f(\alpha)\approx \frac{4 \alpha+2 \alpha \,{\rm arcsinh}^2\, (\alpha\sqrt{2})-2 \sqrt{4 \alpha^2+2} \,{\rm arcsinh}\,(\alpha\sqrt{2})}{\sqrt{\pi } \alpha}$$ This is not a bad approximation over a large range of $\alpha$, see plot (gold is exact, blue is approximate):

In response to a comment by Wolfgang, the large-$\alpha$ behaviour of the approximation can be improved by placing the cutoff at $x=b\alpha^2$, with $b$ a bit smaller than $2$. The integral for arbitrary $b$ evaluates to

$$f(\alpha)\approx \frac{2 \sqrt{b} (2+\,{\rm arcsinh}^2\,\sqrt{b})-4 \sqrt{b+1} \,{\rm arcsinh}\,\sqrt{b}}{\sqrt{2 \pi } \alpha}$$ A quite good agreement with the exact result is obtained for $b=1.7$, see the plot below (again, gold is exact, blue is approximate)

for $\alpha\ll 1$ the asymptotic $f(\alpha)\rightarrow\alpha^2$ is accurate, see plot (the gold and blue curves are almost indistinguishable):

• Hello Carlo, thanks for the analysis. I think you based your analysis on the expression Robert provided, which had a typo -- the denominator in the exponent should read $2 \alpha^2$, not $2 \alpha$. Correcting the typo and plotting, you will quickly see that $f(\alpha)$ a strictly increasing function. I'm curious to see how the expressions for small-$\alpha$ and large-$\alpha$ asymptotics will change after fixing this. Commented Jun 26, 2017 at 18:46
• You haven't updated the plots after the correction, have you? It looks like for both plots (so far), the curves asymptotically vary by a multiplicative constant. What happens around the turning point? Commented Jun 28, 2017 at 15:19
• I added some more plots, for a better fit. Commented Jun 28, 2017 at 20:14

Using the standart $\mathrm{arcsin}^2(x)$ Taylor expansion

$$\arcsin^2(x)=\sum_{n=1}^\infty \frac{2^{2n-1}x^{2n}}{n^2 \binom{2n}{n}}$$

one can show that $f(\alpha)$ can be expressed as $$f(\alpha)=\frac{1}{2}\int_{0}^\infty \frac{\log(1+2t\alpha^2)}{t} e^{-t} dt$$

Maybe it would be helpful.

• I suspect there is a typo here. When I evaluate both the original integral and this integral numerically, I do not obtain the (approximately) equivalent values. Commented Jun 27, 2017 at 16:52
• @MehmetOzanKabak No, there's no typo. Wolfram Mathematica shows that this expression is equal to the original one (or to the one given by Robert Israel). At least at all real values. For example, both expressions give $f(3) \approx 2.44987...$. Commented Jun 27, 2017 at 23:57
• @MehmetOzanKabak Maybe the problem is in parsing the $\ln$ notation of natural logarithm. I've changed it to the standart $\log$ Commented Jun 28, 2017 at 0:20
• You are right, I was the one who committed the typo in this case :) BTW, Mathematica is able to evaluate this integral symbolically, but the answer is too long to be useful (or insightful). Thank you! I will try to simplify Mathematica's answer and report back if I am successful. Commented Jun 28, 2017 at 2:57