# The closed form of $\int_0^{\infty} \frac{\log(\cosh(x))}{x} e^{-x} \ dx$

An integral I discussed last days in a chat, and it looks like a hard nut since after some manipulations of the initial form we reach an integral where the integrand is expressed in
terms of digamma function that can be further reduced to some very resistent series.
I conjecture that the integral has a closed form expressed in terms of G-Barnes function
(and newer constants?) Well, I might be wrong, but here we have many integration gurus

$$\int_0^{\infty} \frac{\log(\cosh(x))}{x} e^{-x} \ dx$$

• What is the expression in terms of the digamma function? Perhaps you could link to the chat history. – Random Variable May 10 '14 at 18:13
• @RandomVariable It's actually another integral, but where the integrand is expressed in terms of digamma function $$\int_0^1 \frac{\psi(1/4 (2 + 1/s)) - \psi(0, 1/(4 s))-2 s }{2 s} \ ds$$ – user 1591719 May 10 '14 at 18:18
• I get that it is equivalent to $-1 + \frac{1}{2} \int_{0}^{\infty} \frac{\psi(\frac{t}{4} + \frac{3}{4}) - \psi(\frac{t}{4} + \frac{1}{4})}{t+1} \ dt$. That might be somewhat easier to deal with than the other expression (but I doubt it). – Random Variable May 10 '14 at 18:53

I have come up with two ways to show that $$\int_0^\infty e^{-x}\log(\cosh(x))\,\frac{\mathrm{d}x}{x} =1+\sum_{k=1}^n(-1)^k\frac{\log(2k+1)}{k}\tag{1}$$

Approach 1: Use the series $$\log(1+x)=\sum_{n=1}^\infty(-1)^{n-1}\frac{x^n}{n}\tag{2}$$ to get \begin{align} \frac{\log(\cosh(x))}{x}e^{-x} &=\frac{x-\log(2)+\log(1+e^{-2x})}{x}e^{-x}\\ &=\left(1+\frac1x\sum_{k=1}^\infty(-1)^k\frac{1-e^{-2kx}}{k}\right)e^{-x}\\ &=e^{-x}+\sum_{k=1}^\infty(-1)^k\frac{e^{-x}-e^{-(2k+1)x}}{kx}\tag{3} \end{align} and then use the integral $$\int_0^\infty(e^{-x}-e^{-kx})\frac{\mathrm{d}x}{x}=\log(k)\tag{4}$$ to get $$\int_0^\infty\frac{\log(\cosh(x))}{x}e^{-x}\,\mathrm{d}x =1+\sum_{k=1}^\infty(-1)^k\frac{\log(2k+1)}{k}\tag{5}$$

Approach 2: Use the integral $$\frac{\log(\cosh(x))}{x}=1+\frac{\log\left(1-{\large\frac{1-e^{-2x}}2}\right)}{x}\tag{6}$$ the sum $$\sum_{n=k}^\infty2^{-n-1}\binom{n}{k}=1\tag{7}$$ and $(2)$ to get \begin{align} \int_0^\infty e^{-x}\log(\cosh(x))\,\frac{\mathrm{d}x}{x} &=1-\sum_{n=1}^\infty\frac1{n2^n}\int_0^\infty e^{-x}\left(1-e^{-2x}\right)^{\large n}\,\frac{\mathrm{d}x}{x}\\ &=1+\sum_{n=1}^\infty\frac1{n2^n}\sum_{k=1}^n(-1)^k\binom{n}{k}\log(2k+1)\\ &=1+\sum_{n=1}^\infty\frac1{2^n}\sum_{k=1}^n(-1)^k\binom{n-1}{k-1}\frac{\log(2k+1)}{k}\\ &=1+\sum_{k=1}^\infty(-1)^k\frac{\log(2k+1)}{k}\tag{8} \end{align}

I haven't yet found a closed form for this sum, but we can use a similar sum to help accelerate the convergence of the series in $(8)$.

In equation $(8)$ of this answer it is shown that $$\sum_{n=1}^\infty(-1)^n\frac{\log(n)}{n} =\gamma\log(2)-\frac{\log(2)^2}{2}\tag{9}$$ We can use this to accelerate the convergence of \begin{align} &\sum_{k=1}^\infty(-1)^k\frac{\log(2k+1)}{k}\\ &=\sum_{k=1}^\infty(-1)^k\frac{\log(2k)}{k} +\sum_{k=1}^\infty(-1)^k\frac{\log\left(1+\frac1{2k}\right)}{k}\\ &=\gamma\log(2)-\frac{3\log(2)^2}{2} +\sum_{k=1}^\infty\frac{(-1)^k}k\sum_{n=1}^\infty\frac{(-1)^{n-1}}{n(2k)^n}\\ &=\gamma\log(2)-\frac{3\log(2)^2}{2} +\sum_{k=1}^\infty\sum_{n=1}^\infty\frac{(-1)^{k+n+1}}{n2^nk^{n+1}}\\ &=\gamma\log(2)-\frac{3\log(2)^2}{2} +\sum_{n=1}^\infty\frac{(-1)^n}{n2^n}\zeta(n+1)(1-2^{-n})\\ &=\gamma\log(2)-\frac{3\log(2)^2}{2}+\log(5/6) +\sum_{n=1}^\infty\frac{(-1)^n(2^n-1)}{n4^n}(\zeta(n+1)-1)\tag{10} \end{align} Thus, we get \begin{align} \int_0^\infty e^{-x}\log(\cosh(x))\,\frac{\mathrm{d}x}{x} &=1+\gamma\log(2)-\frac{3\log(2)^2}{2}+\log(5/6)\\ &+\sum_{n=1}^\infty\frac{(-1)^n(2^n-1)}{n4^n}(\zeta(n+1)-1)\tag{11} \end{align} The series in $(11)$ converges about $0.6$ digits per term.

• Good job (+1). I'll check the last series. – user 1591719 May 11 '14 at 20:17
• @Chris'ssis: I have checked the formula in $(11)$ and Mathematica says both sides agree up to 200 places. – robjohn May 11 '14 at 21:35
• The work is obviously correct. From the last series it seems hard to continue. – user 1591719 May 11 '14 at 21:37
• @Chris'ssis: I don't think $(11)$ is a good starting point for further simplification, it is simply an acceleration of the very slowly converging series in $(1)$. – robjohn May 11 '14 at 21:40
• Equation (8) is to be replaced with the series of $\sum_{k=1}^{\infty} (-1)^{k} \ln(2k+1) /k$. The reason being that the sum over $k$ is up to $n$. When summing over $n$ a shift is needed to remove the sum of $k$ being dependent upon $n$. Also the zeta series of (11) can be reduced to: $\sum_{k=1}^{\infty} ((-1)^{k}/k) \ln(2k+1) = \gamma + \ln 2 -(3/2)\ln^{2}(2)+S(1/2)-S(1/4)$ where $S(x) = \sum_{n=1}^{\infty} ((-x)^{n}/n) \zeta(n+1)$. – Leucippus May 12 '14 at 6:08

The result given in attachment is not a closed form : The aim is only to transform the integral into a series. The Laplace transform appearing in the calculus comes from H. Bateman,Tables of Integral Transforms, p.49 , Eq.17. Mc.Graw-hill Edit. (1954)

Numerical computations show that the convergence of the series given by Robjohn is faster than the convergence of my series. So, I advice to use the Robjohn's series instead of mine.

The integral to evaluate is \begin{align} I(1) = \int_{0}^{\infty} e^{-x} \, \ln(\cosh(x)) \, \frac{dx}{x}. \end{align} The evaluation is as follows. Consider \begin{align} \int_{1}^{\infty} e^{-\alpha x} d\alpha = \left[ - \frac{1}{x} e^{-\alpha x} \right]_{1}^{\infty} = \frac{e^{-x}}{x}. \end{align} Let \begin{align} I(\alpha) = \int_{0}^{\infty} e^{-\alpha x} \, \ln(\cosh(x)) \, \frac{dx}{x}, \end{align} where $I(1)$ is the integral to evaluate and $I(\infty) = 0$, for which differentiation with respect to $\alpha$ leads to \begin{align} \partial_{\alpha} I(\alpha) = - \int_{0}^{\infty} e^{- \alpha x} \ln(\cosh(x)) dx. \end{align} Using integration by parts it is seen that \begin{align} \partial_{\alpha} I(\alpha) &= \left[ \frac{1}{\alpha} \, e^{- \alpha x} \ln(\cosh(x)) \right]_{0}^{\infty} - \frac{1}{\alpha} \int_{0}^{\infty} e^{- \alpha x} \tanh(x) dx \\ &= - \frac{1}{\alpha} \int_{0}^{\infty} e^{- \alpha x} \tanh(x) dx \\ &= - \frac{1}{2 \alpha} \left[ \beta\left( \frac{\alpha}{2} \right) - \beta\left( \frac{\alpha + 2}{2} \right) \right] \\ &= - \frac{1}{4\alpha} \left[ 2 \psi\left( \frac{\alpha + 2}{4} \right) - \psi\left( \frac{\alpha}{4} \right) - \psi\left( \frac{\alpha}{4} + 1 \right) \right] \\ &= \frac{1}{\alpha^{2}} - \frac{1}{\alpha} \beta\left(\frac{\alpha}{2}\right), \end{align} where $2 \beta(x) = \psi((x+1)/2) - \psi(x/2)$. Since \begin{align} \beta\left(\frac{x}{2}\right) = 2 \partial_{x} \ln\left( \frac{\Gamma((x+2)/4)}{\Gamma(x/4)} \right) \end{align} then \begin{align} \partial_{\alpha} I(\alpha) &= \frac{1}{\alpha^{2}} - \frac{2}{\alpha} \partial_{\alpha} \ln\left( \frac{\Gamma((\alpha+2)/4)}{\Gamma(\alpha/4)} \right) \end{align} and \begin{align} \int_{1}^{\infty} \partial_{\alpha} I(\alpha) \, d\alpha &= 1 - 2 \int_{1}^{\infty} \frac{1}{\alpha} \partial_{\alpha} \ln\left( \frac{\Gamma((\alpha+2)/4)}{\Gamma(\alpha/4)} \right) \\ I(\infty) - I(1) &= 1 - 2 \left[ \frac{1}{\alpha} \ln\left( \frac{\Gamma((\alpha+2)/4)}{\Gamma(\alpha/4)} \right) \right]_{1}^{\infty} - 2 \int_{1}^{\infty} \ln\left( \frac{\Gamma((\alpha+2)/4)}{\Gamma(\alpha/4)} \right) \, \frac{d\alpha}{\alpha^{2}} \\ - I(1) &= 1 + 2 \ln\left( \frac{\Gamma(3/4)}{\Gamma(1/4)} \right) - \frac{1}{2} \int_{1/4}^{\infty} \ln\left( \frac{\Gamma(u+1/2)}{\Gamma(u)} \right) \, \frac{du}{u^{2}}. \end{align} This is \begin{align} I(1) &= \ln\left( \frac{\Gamma^{4}(1/4)}{2 \pi^{2} e} \right) - \frac{1}{2} \int_{1/4}^{\infty} \ln\left( \frac{\Gamma(u)}{\Gamma(u + 1/2)} \right) \, \frac{du}{u^{2}}. \end{align} It is of note that \begin{align} \ln\left( \frac{\Gamma^{4}(1/4)}{2 \pi^{2} e} \right) < \int_{1/4}^{\infty} \ln\left( \frac{\Gamma(u)}{\Gamma(u + 1/2)} \right) \, \frac{du}{u^{2}} < \ln\left( \frac{\Gamma^{4}(1/4)}{4 \pi^{2} e} \right). \end{align}

• I'm afraid the result and its derivation are incurably wrong. There many places with calculation errors but the crucial point is that $$\partial_{\alpha} I(\alpha)= -\frac{1}{\alpha^2}+\frac{\psi((\alpha+2)/4) - \psi(\alpha/4)}{2\alpha}$$ The principal problem to continue along the lines of your answer is the $\alpha$ in the denominator. – Start wearing purple May 11 '14 at 0:49
• I'm afraid I have to agree with O.L. Numerical evaluation of the integral yields $0.3522558990333047$ while $$1-\frac2\pi\left[\Gamma\left(\frac34\right)-\Gamma\left(\frac14\right)\right] \doteq2.5280104522870652$$ Noticing that $\frac{\log(\cosh(x))}{x}\le1$ on the domain of the integral shows that the integral must be less than $\displaystyle\int_0^\infty e^{-x}\,\mathrm{d}x=1$. – robjohn May 11 '14 at 13:14


\begin{align}&\color{#c00000}{% \int_{0}^{\infty}{\ln\pars{\cosh\pars{x}} \over x}\,\expo{-x}\,\dd x} =\int_{0}^{\infty}{x + \ln\pars{1 + \expo{-2x}} - \ln\pars{2} \over x}\, \expo{-x}\,\dd x \\[3mm]&=1 + \color{#00f}{\int_{0}^{\infty} {\ln\pars{1 + \expo{-2x}} - \ln\pars{2} \over x}\,\expo{-x}\,\dd x} \end{align}

\begin{align}&\color{#00f}{\int_{0}^{\infty} {\ln\pars{1 + \expo{-2x}} - \ln\pars{2} \over x}\,\expo{-x}\,\dd x} =\int_{0}^{\infty}\bracks{\sum_{n = 1}^{\infty} {\pars{-1}^{n + 1} \over n}\expo{-2nx} -\ln\pars{2}}\expo{-x}\,{\dd x \over x} \\[3mm]&=-\int_{0}^{\infty}\ln\pars{x}\bracks{\sum_{n = 1}^{\infty} {\pars{-1}^{n + 1} \over n}\pars{-2n - 1}\expo{-\pars{2n + 1}x} +\ln\pars{2}\expo{-x}}\,\dd x \end{align}

However, $$\int_{0}^{\infty}\ln\pars{x}\expo{-\alpha x}\,\dd x =-\,{\ln\pars{\alpha} + \gamma \over \alpha}\,,\qquad\Re\pars{\alpha} > 0$$

Then, \begin{align}&\color{#00f}{\int_{0}^{\infty} {\ln\pars{1 + \expo{-2x}} - \ln\pars{2} \over x}\,\expo{-x}\,\dd x} =-\braces{\sum_{n = 1}^{\infty}{\pars{-1}^{n + 1} \over n}\, \bracks{\ln\pars{2n + 1} + \gamma}} + \gamma\ln\pars{2} \\[3mm]&=\sum_{n = 1}^{\infty}{\pars{-1}^{n} \over n}\,\ln\pars{2n + 1} =\int_{0}^{2}\sum_{n = 1}^{\infty}{\pars{-1}^{n} \over \xi n + 1}\,\dd\xi =\int_{0}^{2} \sum_{n = 1}^{\infty}{\pars{-1}^{n} \over n + 1/\xi}\,{\dd\xi \over \xi} \\[3mm]&=\int_{0}^{2}{\Phi\pars{-1,1,1/\xi} \over \xi}\,\dd\xi \end{align} where $\ds{\Phi\pars{z,s,\alpha}}$ is the Lerch Trascendent Function.

$$\color{#00f}{\large\int_{0}^{\infty} {\ln\pars{\cosh\pars{x}} \over x}\,\expo{-x}\,\dd x} =\color{#00f}{\large 1 + \int_{0}^{2}{\Phi\pars{-1,1,1/\xi} \over \xi}\,\dd\xi}$$

So far, I was unable to evaluate or/and find the 'logarithm involved sums' and we didn't find anything related to $\ds{\Phi}$ integration. Besides the usual links, this one seems to be very interesting.

• Interesting approach. Thank you for the answer (+1). – user 1591719 Jun 9 '14 at 8:22