# Does $\int_{-1}^1\frac{\arctan x}{\text{arctanh}\,x}\,\mathrm{d}x$ have a closed form?

$$\newcommand{\arctanh}{~\mathrm{arctanh}~}\newcommand{\sech}{~\mathrm{sech}~}$$

$$I=\int_{-1}^1\frac{\arctan x}{\arctanh x}\,\mathrm{d}x$$ Mathematica gives an approximate result of $I=1.581949621806183890451628...$, but no exact form. I predict it's a function of $e$ and $\pi$, and perhaps even the Golden Ratio $\phi$ (It certainly wouldn't be the first time)

The motivation behind this question is pure curiosity. I thought the shape looked nice :)

1st edit: Substitutions of $x=\tan u$ and $x=\tanh u$ respectively yield $$I= 2\int_{-\pi/4}^{\pi/4}\dfrac{u\sec^2u}{\ln|\frac{1+\tan u}{1-\tan u}|}\,\mathrm{d}u$$ $$I= \int_{-\infty}^{\infty}\dfrac{\arctan(\tanh u)}{u}\sech^2u\,\mathrm{d}u$$

2nd edit: I've considered another approach starting with parameterizing the desired integral by $$I_a=\int_{-1}^1\frac{\arctan ax}{\arctanh x}\,\mathrm{d}x$$ so that $$\frac{\partial I_a}{\partial a}=\int_{-1}^1\frac{x}{(1+(ax)^2)\arctanh x}\,\mathrm{d}x$$ Integrating by parts with $$\begin{matrix}u=\dfrac{1}{\arctanh x}&&\mathrm{d}v=\dfrac{x}{1+(ax)^2}\,\mathrm{d}x\\[1ex] \mathrm{d}u=\dfrac{\mathrm{d}x}{(x^2-1)\arctanh^2x}&&v=\dfrac{1}{2a^2}\log(1+(ax)^2)\end{matrix}$$ yields the following integral: $$\frac{\partial I_a}{\partial a}=\frac{1}{2a^2}\int_{-1}^1\frac{\log(1+(ax)^2)}{(1-x^2)\arctanh^2x}\,\mathrm{d}x$$ which can be modified by a substitution of $y=\arctanh x$ to obtain $$\frac{\partial I_a}{\partial a}=\frac{1}{2a^2}\int_{-\infty}^\infty \frac{\log(1+(a\tanh y)^2)}{y^2}\,\mathrm{d}y$$

I have an idea of approaching the remaining integral using the series expansion of $\log(1+x)$; namely, the integral would become $$\frac{\partial I_a}{\partial a}=\frac{1}{2a^2}\int_{-\infty}^\infty \frac{\mathrm{d}y}{y^2}\sum_{k=1}^\infty\frac{(-1)^{k+1}}{k}(a\tanh y)^{2k}=-\frac{1}{2a^2}\sum_{k=1}^\infty \frac{a^{2k}(-1)^k}{k}\underbrace{\int_{-\infty}^\infty \frac{\tanh^{2k}y}{y^2}\,\mathrm{d}y}_{J_k}$$ According to this question, we have a closed from $J_k$ in the case of $k=1$ and potentially all $k>1$ in terms of the Riemann zeta function, but I have yet to do any more investigation.

Another method that occurred to me was to consider a keyhole contour to tackle $\dfrac{\partial I_a}{\partial a}$ but I'm afraid I'm not familiar enough with complex analysis to make that jump just yet.

• As an aside, $~\displaystyle\int_0^1\bigg[\text{arctanh }x-\ln\tan\bigg(\frac\pi2~x\bigg)\bigg]~dx ~=~ \ln2.$ Jun 2, 2015 at 19:47
• Try substitute $x=1/t$. Jun 2, 2015 at 19:55
• A possible path: write $\arctan\tanh u$ as $\frac{\pi}{4}-\arctan(e^{2u})$, compute the Taylor series of $\arctan(z)$ around $z=1$, then the integrals: $$I_n = \int_{0}^{+\infty}\frac{(1-e^{-2u})^n}{u\cosh^2 u}\,du$$ through Frullani's theorem. Jun 2, 2015 at 20:51
• Also, $~\displaystyle{\LARGE\int}_0^1\frac{\text{arctanh }x}{\tan\bigg(\dfrac\pi2~x\bigg)}~dx~$ converges to about $0.488385477\ldots$ Jun 2, 2015 at 21:36
• Does anyone think constructing some sort of contour would work for the third form of the integral? The fact that we're considering the real line as opposed to $(-1,1)$ or $\left(-\frac{\pi}{4},\frac{\pi}{4}\right)$ gives me some hope. Jun 2, 2015 at 23:24

I tried 2 ways to find a closed form, though unsuccessful up to this point.

1st trial. Let $I$ denote the integral, and write

$$I = 8 \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} \int_{0}^{\infty} \frac{e^{-x}(1 - e^{-(2n+1)x})}{x (1 + e^{-x})^{2}} \, dx.$$

In order to evaluate the integral inside the summation, we introduce new functions $I(s)$ and $J_n(s)$ by

$$I(s) = 8 \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} \int_{0}^{\infty} \frac{x^{s-1} e^{-x}(1 - e^{-(2n+1)x})}{(1 + e^{-x})^{2}} \, dx =: 8 \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} J_n(s)$$

so that $I = I(0)$. Then it is easy to calculate that for $\Re(s) > 1$, $J_n(s)$ is written as

$$J_n(s) = \Gamma(s) \left( \eta(s-1) + \sum_{k=2n+1}^{\infty} \frac{(-1)^{k-1}}{k^{s-1}} - (2n+1) \sum_{k=2n+1}^{\infty} \frac{(-1)^{k-1}}{k^{s}} \right),$$

where $\eta$ is the Dirichlet eta function. Plugging this back to $I(s)$ and manipulating a little bit, we obtain

$$I(s) = 8\Gamma(s) \left( \frac{\pi}{4} \eta(s-1) - 4^{-s}\left( \zeta(s, \tfrac{1}{4}) - \zeta(s, \tfrac{1}{2}) \right) + \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} \sum_{k=2n+1}^{\infty} \frac{(-1)^{k-1}}{k^{s-1}} \right).$$

This is valid for $\Re(s) > 1$. But if we can somehow manage to find an analytic continuation of the last summation part, then we may find the value of $I = I(0)$.

2nd trial. I began with the following representation

\begin{align*} I &= -2 \int_{0}^{\infty} \frac{1-e^{-t}}{1+e^{-t}} \left( \frac{1}{\cosh t} - \frac{2}{t} ( \arctan(1) - \arctan (e^{-t})) \right) \, \frac{dt}{t} \\ &= \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)(2n+2)} \int_{-\infty}^{\infty} \frac{\tanh^{2(n+1)} x}{x^{2}} \, dx. \end{align*}

With some residue calculation, we can find that

\begin{align*} \int_{-\infty}^{\infty} \frac{\tanh^{2n} x}{x^{2}} \, dx &= \frac{2}{i\pi} \, \underset{z=0}{\mathrm{Res}} \left[ \psi_{1}\left(\tfrac{1}{2} + \tfrac{1}{i\pi} z\right) \coth^{2n} z \right] \\ &= 2^{2n+3} \sum_{m=1}^{n} (-1)^{m-1}m (1-2^{-2m-1}) A_{n-m}^{(2n)} \, \frac{\zeta(2m+1)}{\pi^{2m}}, \end{align*}

where $A_m^{(n)}$ is defined by the following combinatoric sum

$$A_m^{(n)} = \sum_{\substack{ k_1 + \cdots + k_n = m \\ k_1, \cdots, k_n \geq 0 }} \frac{B_{2k_1} \cdots B_{2k_n}}{(2k_1)! \cdots (2k_n)!} = 2^{-2m} [z^{2m}](z \coth z)^{n} \in \Bbb{Q},$$

where $B_k$ are Bernoulli numbers. Still the final output is egregiously complicated, so I stopped here.

3rd trial. The following yet another representation may be helpful, I guess.

$$I = \int_{0}^{1/2} \frac{1 - \cot(\pi u/2)}{2} \left\{ \psi_1\left(\tfrac{1+u}{2}\right) - \psi_1\left(\tfrac{1-u}{2}\right) \right\} \, du.$$

• In your second attempt, what contour are you integrating around? My guess is that it is a rectangular contour in the upper half-plane of fixed height. Jul 28, 2015 at 19:06
• @RandomVariable, Yes, I chose a rectangular region of height $N\pi$ with width $\to \infty$, and then let $N \to \infty$. Jul 28, 2015 at 19:09
• Were you referring to a rectangle in the upper half-plane? I get your result by integrating around a rectangle with vertices at $R - \frac{i \pi}{2}, R + \frac{i \pi}{2}, - R + \frac{i \pi}{2}$, and $-R- \frac{i \pi}{2}$, and then letting $R$ go to infinity. Jul 28, 2015 at 21:46
• @RandomVariable, Actually I was integrating along the rectangle with vertices $\pm R$ and $\pm R + i\pi$, since the poles of $\tanh^{2n} x / x^2$ are at $i\pi (k + \frac{1}{2})$. Jul 28, 2015 at 22:10
• Specifically I integrated the function $\psi_{1}\left(\tfrac{1}{2} + \tfrac{1}{i\pi} z\right) \coth^{2n} (z)$, which has poles at $n \pi i$. The function $\psi_{1}\left(\tfrac{1}{2} + \tfrac{1}{i\pi} z\right)$ has poles along the negative imaginary axis, but they're cancelled by the zeros of $\coth^{2n} (z)$ if $n >0$. Jul 28, 2015 at 23:29

The Gudermannian function can be defined as: $$\text{gd}(x)= \int_0^x\frac{dt}{\cosh(t)}= 2\arctan(\tanh(\frac{1}{2}x))$$

Furthermore, notice that: $$\text{gd}'(x)=\frac{1}{\cosh(x)}$$ with this in mind, the integral can be rewritten as: $$\int_{0} ^{+\infty}\frac{\text{gd}(2x)(\text{gd'}(x))^2}{x}dx$$

From here on out it gets messy. Trying to compute $\int \text{gd}(2x)(\text{gd'}(x))^2$ alone yields a closed form (though a very complicated one!). So I doubt that the actual integral could be written in terms of common mathematical constants (at least through this path, i.e. setting $x=\tanh(u)$). I've tried differentiating under the integral sign using several functions of $t$, to no avail.

EDIT I don't know if this'll help: I've also considered the following: $$\int_{-1}^1 \frac{\arctan(x)}{\text{arctanh}(x)}dx=\frac{1}{2}i\int_{-1}^1 \frac{\ln(1+ix)-\ln(1-ix)}{\text{arctanh}(x)}dx$$$$=\frac{1}{2}i\int_{-1}^1 \frac{[\ln(1+ixy)]_{-1}^1}{\text{arctanh}(x)}dx=\frac{1}{2}i\int_{-1}^1\int_{-1}^1 \frac{1}{(1+ixy)\text{arctanh}(x)}dydx$$

But hit a road block at the end.

I have successfully evaluated the integral in @Sangchul Lee form:

$$I = 8 \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} \int_{0}^{\infty} \frac{e^{-x}(1 - e^{-(2n+1)x})}{x (1 + e^{-x})^{2}} \, dx.$$

Start with the generalized integral: \begin{align} &\int_{0}^{\infty}\frac{e^{-t\left(m_{1}+1\right)}-e^{-t\left(m_{2}+1\right)}}{t\left(e^{-t}+1\right)^{2}}dt \\ \\ =\space&\int_{m_{2}}^{m_{1}}\left(-\frac{1}{2}+tL\left(-1,1,t+1\right)\right)dt \\ \\ =\space&\frac{m_{2}-m_{1}}{2}+\int_{m_{2}}^{m_{1}}tL\left(-1,1,t+1\right)dt \\ \\ =\space&\frac{m_{2}-m_{1}}{2}+\int_{m_{2}}^{m_{1}}t\int_{0}^{\infty}\frac{e^{-u\left(t+1\right)}}{e^{-u}+1}\space du\space dt \\ \\ =\space&\frac{m_{2}-m_{1}}{2}+\int_{0}^{\infty}\frac{e^{-u\left(m_{2}+1\right)}\left(m_{2}u+1\right)-e^{-u\left(m_{1}+1\right)}\left(m_{1}u+1\right)}{u^{2}\left(e^{-u}+1\right)}du \\ \\ =\space&\frac{m_{2}-m_{1}}{2}+m_{2}\int_{0}^{\infty}\frac{e^{-u\left(m_{2}+1\right)}}{u\left(e^{-u}+1\right)}du-m_{1}\int_{0}^{\infty}\frac{e^{-u\left(m_{1}+1\right)}}{u\left(e^{-u}+1\right)}du \\ &\qquad\qquad\qquad+\int_{0}^{\infty}\frac{e^{-u\left(m_{2}+1\right)}}{u^{2}\left(e^{-u}+1\right)}du-\int_{0}^{\infty}\frac{e^{-u\left(m_{1}+1\right)}}{u^{2}\left(e^{-u}+1\right)}du \end{align}

Above $$L(z,s,a)$$ is the Lerch Transcendent.

I have found (without a full proof yet) that

\begin{align} &2\int_{x}^{\infty}\frac{e^{-at}}{t^{s}\left(e^{-t}+1\right)}dt \\ &=\left(-1\right)^{s}\frac{\gamma+\ln2}{\left(s-1\right)!}E\left(s-1,a\right)+\left(-1\right)^{s}2^{s}\sum_{n=0}^{s-2}\frac{{\psi^*}^{(n-s)}\left(0\right)}{2^{n+1}n!}E\left(n,a\right)+\left(-1\right)^{s}2^{s}\left({\psi^*}^{(-s)}\left(\frac{a+1}{2}\right)-{\psi^*}^{(-s)}\left(\frac{a}{2}\right)\right) \\&-\sum_{n=0}^{s-2}\left(-1\right)^{n}E\left(n,a\right)\frac{x^{n-s+1}}{n!\left(n-s+1\right)}+\left(-1\right)^{s}E\left(s-1,a\right)\frac{1}{\left(s-1\right)!}\ln x-\sum_{n=s}^{\infty}\left(-1\right)^{n}E\left(n,a\right)\frac{x^{n-s+1}}{n!\left(n-s+1\right)} \end{align}

for $$|x|\le \pi$$ and

$${\psi^*}^{(-n)}(x)=\frac{1}{\left(n-2\right)!}\int_{1}^{x}\left(x-t\right)^{n-2}\ln\left(\Gamma(t)\right)dt$$

Note this would be a valid definition for the Polygamma function of negative order, except the bound starts at $$1$$ instead of $$0$$.

For $$s=1$$ we have

\begin{align} \int_{x}^{\infty}\frac{e^{-at}}{t\left(e^{-t}+1\right)}dt=-\frac{1}{2}\left(\gamma+\ln2\right)-\left(\psi^{(-1)}\left(\frac{a+1}{2}\right)-\psi^{(-1)}\left(\frac{a}{2}\right)\right) \\-\frac{1}{2}\ln x-\frac{1}{2}\sum_{n=1}^{\infty}\left(-1\right)^{n}E\left(n,a\right)\frac{x^{n}}{n!n} \end{align}

and $$s=2$$,

\begin{align} \int_{x}^{\infty}\frac{e^{-at}}{t^2\left(e^{-t}+1\right)}dt=\left(\frac{a}{2}-\frac{1}{4}\right)\left(\gamma+\ln2\right)-\frac{\ln2\pi}{2}+2\left({\psi}^{(-2)}\left(\frac{a+1}{2}\right)-{\psi}^{(-2)}\left(\frac{a}{2}\right)\right) \\+\frac{1}{2x}+\left(\frac{a}{2}-\frac{1}{4}\right)\ln x-\frac{1}{2}\sum_{n=2}^{\infty}\left(-1\right)^{n}E\left(n,a\right)\frac{x^{\left(n-1\right)}}{n!\left(n-1\right)} \end{align}

Notice that in these cases we are able to use the regular Polygamma functions since $${\psi^*}^{(-1)}\left(x\right)={\psi}^{(-1)}\left(x\right)$$ and $${\psi^*}^{(-2)}\left(x\right)={\psi}^{(-2)}\left(x\right)+\text{constant}$$

Therefore

\begin{align} &\int_{0}^{\infty}\frac{e^{-t\left(m_{1}+1\right)}-e^{-t\left(m_{2}+1\right)}}{t\left(e^{-t}+1\right)^{2}}dt \\ &=\frac{m_{2}-m_{1}}{2}+m_{1}\ln\left(\frac{\Gamma\left(\frac{m_{1}+2}{2}\right)}{\Gamma\left(\frac{m_{1}+1}{2}\right)}\right)-m_{2}\ln\left(\frac{\Gamma\left(\frac{m_{2}+2}{2}\right)}{\Gamma\left(\frac{m_{2}+1}{2}\right)}\right)-2\left(\psi^{(-2)}\left(\frac{m_{1}+2}{2}\right)-\psi^{(-2)}\left(\frac{m_{1}+1}{2}\right)\right)+2\left(\psi^{(-2)}\left(\frac{m_{2}+2}{2}\right)-\psi^{(-2)}\left(\frac{m_{2}+1}{2}\right)\right) \end{align}

Setting $$m_1=0$$ and $$m_2=2n+1$$ gives us

\begin{align} &\int_{0}^{\infty}\frac{e^{-t}\left(1-e^{-t\left(2n+1\right)}\right)}{t\left(e^{-t}+1\right)^{2}}dt \\ &=3\ln A-\frac{7}{12}\ln2-\frac{1}{2}\ln\pi+\frac{2n+1}{2}-\left(2n+1\right)\ln\left(\frac{\Gamma\left(\frac{2n+3}{2}\right)}{\Gamma\left(\frac{2n+2}{2}\right)}\right)+2\left(\psi^{(-2)}\left(\frac{2n+3}{2}\right)-\psi^{(-2)}\left(\frac{2n+2}{2}\right)\right) \\ &=6\ln A-\frac{1}{6}\ln2+\frac{2n+1}{2}-\left(2n+1\right)\ln\left(\frac{\Gamma\left(\frac{2n+3}{2}\right)}{\Gamma\left(\frac{2n+2}{2}\right)}\right)-\left(n+1\right)\ln2-\left(n+1\right)-\sum_{k=1}^{2n+1}\left(-1\right)^{k}k\ln k \end{align}

Taking into account that $$\frac{\Gamma\left(\frac{2n+3}{2}\right)}{\Gamma\left(\frac{2n+2}{2}\right)}=\sqrt{\pi}\frac{2n+1}{2^{\left(2n+1\right)}}\binom{2n}{n}$$

$$I=\pi\left(12\ln A-\frac{4}{3}\ln2-1\right)-4\ln\left(\frac{\pi}{2}\right)-8\sum_{n=1}^{\infty}\left(\frac{\ln4n}{4n-1}-\frac{2}{\left(4n-1\right)\left(4n+1\right)}\sum_{k=1}^{4n}\left(-1\right)^{k}k\ln k\right)$$

Not taking into account $$\frac{\Gamma\left(\frac{2n+3}{2}\right)}{\Gamma\left(\frac{2n+2}{2}\right)}=\sqrt{\pi}\frac{2n+1}{2^{\left(2n+1\right)}}\binom{2n}{n}$$, we obtain

$$I=\pi\left(12\ln A-\frac{4}{3}\ln2-1\right)+8\sum_{n=1}^{\infty}\left(\frac{\ln\left(4n-2\right)}{4n-3}-\frac{2}{\left(4n-3\right)\left(4n-1\right)}\sum_{k=1}^{4n-2}\left(-1\right)^k k\ln k\right)$$

Therefore

$$I=\pi\left(12\ln A-\frac{4}{3}\ln2-1\right)-2\ln\left(\frac{\pi}{2}\right)-4\sum_{n=1}^{\infty}\left(-1\right)^{n}\left(\frac{\ln2n}{2n-1}-\frac{2}{\left(2n-1\right)\left(2n+1\right)}\sum_{k=1}^{2n}\left(-1\right)^{k}k\ln k\right)$$

Which I was able to whittle down to

\begin{align} I&=\pi\left(12\ln A-\frac{4}{3}\ln2-1\right)+4\ln\left(\frac{\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(\frac{1}{4}\right)}\right)+\lim\limits_{m\to\infty}\left(-2\ln 2m+8\sum_{n=1}^{2m}\frac{\left(-1\right)^{n}}{2n-1}\sum_{k=1}^{2n-2}\left(-1\right)^{k}k\ln k\right)\\ &=\pi\left(12\ln A-\frac{4}{3}\ln2-1\right)+4\ln\left(\frac{\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(\frac{1}{4}\right)}\right)+4\ln2+\lim\limits_{m\to\infty}\left(2\ln2m-8\sum_{n=1}^{2m}\frac{\left(-1\right)^{n}}{2n+1}\sum_{k=1}^{2n}\left(-1\right)^{k}k\ln k\right) \end{align}

Following this post we can obtain an integral form where the integrals don't contain logs or hyperbolic trig functions:

\begin{align} I &= 2\pi\left(3\ln A-\frac{2}{3}\ln2-\frac{1}{2}+\frac{7}{12}\ln2\right)+4\ln\left(\frac{\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(\frac{1}{4}\right)}\right)+\frac{4}{3}\ln2-2\ln\pi+24\ln A \\ &+2\int_{0}^{\infty}\frac{1}{t}\left(1+\left(\frac{\pi}{4}-1\right)e^{-t}-e^{\frac{t}{2}}\arctan\left(e^{-\frac{t}{2}}\right)\right)dt \\ &+8\int_{0}^{\infty}\left(-\frac{1}{12t}+\frac{1}{t^{2}\left(e^{t}-1\right)}+\frac{1}{2t^{2}}-\frac{1}{t^{3}}\right)\left(4e^{\frac{t}{2}}\arctan\left(e^{-\frac{t}{2}}\right)-e^{t}\arctan\left(e^{-t}\right)-3\right)dt \end{align}

• Nice wook. However, the sum you obtained is as intractable as the original integral given by Sangchul Lee. In general, if you are summing $\sum \ln(an + b)/(cn+d)^s$ with $an+b\neq k(cn+d)$, then they do not arise from ordinary zeta function, and no hope in obtaining closed form. Mar 25, 2020 at 2:37