How to evaluate improper integral $\int_{0}^{\infty}\frac{\tan^{-1}{x}}{e^{ax}-1}dx$?

I'm trying to evaluate the improper integral,

$$I(a)=\int_{0}^{\infty}\frac{\tan^{-1}{x}}{e^{ax}-1}\mathrm{d}x,~~~\text{where }a\in\mathbb{R}^+.$$

Does this integral have a simple closed form expression? And if so, how best to obtain it?


My attempt

My first idea was to integrate by parts using $f=\tan^{-1}{x}$ and $dg=\frac{\mathrm{d}x}{e^{ax}-1}$, with the hope that the resulting integral would be amenable to solution by differentiating under the integral sign. So I found the indefinite integral,

$$\int\frac{\tan^{-1}{x}}{e^{ax}-1}\mathrm{d}x=\tan^{-1}{x}\left(\frac{1}{a}\log{(1-e^{ax})}-x\right)-\int\left(\frac{\log{(1-e^{ax})}}{a(x^2+1)}-\frac{x}{x^2+1}\right)\mathrm{d}x,$$

but then I realized that this would result in an imaginary boundary term for the corresponding definite integral over $[0,\infty)$ since,

$$\begin{cases}\lim_{x\to\infty}\tan^{-1}{x}\left(\frac{1}{a}\log{(1-e^{ax})}-x\right)=i\frac{\pi^2}{2a},\\ \lim_{x\to0}\tan^{-1}{x}\left(\frac{1}{a}\log{(1-e^{ax})}-x\right)=0.\end{cases}$$

I want to avoid complex variables if at all possible, so I don't know if I want to continue down this route.

Can anyone offer any hints or suggestions?


CORRECTION: As Vladimir pointed out, the correct anti-derivative is actually,

$$\int\frac{\tan^{-1}{x}}{e^{ax}-1}\mathrm{d}x=\tan^{-1}{x}\left(\frac{1}{a}\log{(e^{ax}-1)}-x\right)-\int\left(\frac{\log{(e^{ax}-1)}}{a(x^2+1)}-\frac{x}{x^2+1}\right)\mathrm{d}x.$$

Then, since,

$$\begin{cases}\lim_{x\to\infty}\tan^{-1}{x}\left(\frac{1}{a}\log{(e^{ax}-1)}-x\right)=\frac{\pi}{2}\cdot0=0,\\ \lim_{x\to0}\tan^{-1}{x}\left(\frac{1}{a}\log{-e^{ax}-1)}-x\right)=0,\end{cases}$$

we have,

$$I(a)=-\int_{0}^{\infty}\left(\frac{\log{(e^{ax}-1)}}{a(x^2+1)}-\frac{x}{x^2+1}\right)\mathrm{d}x.$$


Solution 1:

Consider a related integral $\displaystyle\;J(a) = \int_0^\infty e^{-ax}\tan^{-1}(x) dx\;$. We can integrate it by part to get: $$J(a) = \frac{1}{a}\int_0^\infty e^{-ax}\frac{dx}{1+x^2}$$

Using this, we can rewrite our integral as $$I(a) = \int_0^\infty \left(\sum_{n=1}^\infty e^{-nax}\right)\tan^{-1}(x)dx = \sum_{n=1}^\infty J(na) = \sum_{n=1}^\infty \frac{1}{na}\int_0^\infty e^{-nax}\frac{dx}{1+x^2}$$ Replace $x$ by $x/n$ in each terms, this can be transformed as $$I(a) = \frac{1}{a}\int_0^\infty e^{-at}\left(\sum_{n=1}^\infty \frac{1}{t^2+n^2}\right) dt $$ Start with a infinite product expansion of $\displaystyle\;\frac{\sinh(\pi x)}{\pi x}\;$. By taking logarithm and differentiate, $$\frac{\sinh(\pi x)}{\pi x} = \prod_{n=1}^\infty \left(1 + \frac{x^2}{n^2}\right) \quad\implies\quad \sum_{n=1}^\infty \frac{1}{x^2 + n ^2 } = \frac{1}{2x}\left( \pi\coth(\pi x) - \frac{1}{x}\right) $$ we can rewrite the sum inside above integrand of $I(a)$ and obtain

$$I(a) = \frac{\pi}{2a}F\left(\frac{a}{\pi}\right) \quad\text{ where }\quad F(x) = \int_0^\infty e^{-xt} \left(\coth(t) - \frac{1}{t}\right) \frac{dt}{t} $$ Notice $$-\frac{dF(x)}{dx} = \int_0^\infty e^{-xt}\left(\coth(t) - \frac{1}{t}\right)dt$$ and compare this with a integral representation of digamma function $\displaystyle\;\psi(x) = \frac{d\log\Gamma(x)}{dx}\;$, $$\psi(x) = \int_0^\infty\left(\frac{e^{-t}}{t} - \frac{e^{-xt}}{1-e^{-t}}\right)dt \quad\implies\quad \psi\left(\frac{x}{2}\right) = \int_0^\infty\left(\frac{e^{-2t}}{t} - \frac{2e^{-xt}}{1-e^{-2t}}\right)dt $$ We get $$\begin{array}{rrl} &-\frac{dF(x)}{dx} &= \int_0^\infty \frac{e^{-2t} - e^{-xt}}{t}dt - \frac12 \left[\psi\left(\frac{x}{2}\right) + \psi\left(\frac{x}{2}+1\right)\right]\\ &&= \log\frac{x}{2} - \frac12\left[\psi\left(\frac{x}{2}\right) + \psi\left(\frac{x}{2}+1\right)\right]\\ \implies & F(x) &= \text{const.} + \log\Gamma\left(\frac{x}{2}\right) + \log\Gamma\left(\frac{x}{2}+1 \right) - x\log\left(\frac{x}{2e}\right) \end{array}$$ Since $\lim\limits_{x\to\infty}F(x) = 0$, we can use Stirling's approximation to fix the constant in $F(x)$ to $-\log(2\pi)$. As a result, We find

$$I(a) = \frac{\pi}{2a}\left[ 2\log\Gamma\left(\frac{a}{2\pi}+1\right) - \log(a)\right] -\frac12\log\left(\frac{a}{2\pi e}\right) $$

Solution 2:

$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ $\ds{{\rm I}\pars{a}=\int_{0}^{\infty} {\arctan\pars{x}\over \expo{ax} - 1}\,\dd x\,,\qquad \mbox{where }\quad a \in \mathbb{R}^{+}}$.

Set $\quad\ds{ax \equiv 2\pi t\quad\imp\quad x = {2\pi t \over a}}$: \begin{align} {\rm I}\pars{a}&={2\pi \over a}\int_{0}^{\infty} {\arctan\pars{2\pi t/a}\over \expo{2\pi t} - 1}\,\dd t \quad\imp\quad \totald{\bracks{a{\rm I}\pars{a}}}{a} =2\pi\int_{0}^{\infty}{-2\pi t/a^{2} \over \pars{2\pi t/a}^{2} + 1}\, {\dd t \over \expo{2\pi t} - 1} \end{align}

$$ \totald{\bracks{a{\rm I}\pars{a}}}{a} =-\int_{0}^{\infty} {t\,\dd t \over \bracks{t^{2} + \pars{a/2\pi}^{2}}\pars{\expo{2\pi t} - 1}} $$

We'll use the identity ${\bf\mbox{6.3.21}}$ where $\ds{\Psi\pars{z}}$ is the Digamma Function ${\bf\mbox{6.3.1}}$ \begin{align} \Psi\pars{z} = \ln\pars{z} - {1 \over 2z} - 2 \int_{0}^{\infty} {t\,\dd t \over \pars{t^{2} + z^{2}}\pars{\expo{2\pi t} - 1}}\tag{$\bf 6.3.21$} \end{align} we'll get $$ \totald{\bracks{z\,{\rm I}\pars{2\pi z}}}{z} =\half\bracks{\Psi\pars{z} - \ln\pars{z} + {1 \over 2z}} $$

\begin{align} {\rm I}\pars{2\pi z}&={1 \over 2z} \bracks{\ln\pars{\Gamma\pars{z}} + z - z\ln\pars{z} + \half\,\ln\pars{z}} +{{\rm C} \over z} \end{align} where $\ds{\rm C}$ is a constant and $\ds{\Gamma\pars{z}}$ is the Gamma Function ${\bf\mbox{6.1.1}}$.

$\ds{C}$ is found by noting that $\ds{\lim_{z \to \infty}{\rm I}\pars{2\pi z} = 0}$. With Stirling Asymptotic Formula ${\bf\mbox{6.1.41}}$: $$ \ln\pars{\Gamma\pars{z}}\sim \pars{z - \half}\ln\pars{z} - z + \half\,\ln\pars{2\pi}\,,\qquad \verts{z} \to \infty\quad\mbox{in}\quad \verts{{\rm arg}\pars{z}} < \pi $$ we get $\ds{C = -\,{\ln\pars{2\pi} \over 4}}$ such that \begin{align} {\rm I}\pars{2\pi z}&={1 \over 2z} \bracks{\ln\pars{\Gamma\pars{z}} + z - z\ln\pars{z} + \half\,\ln\pars{z \over 2\pi}} \end{align}

Set $\ds{z = {a \over 2\pi}}$ $\ds{\pars{~\mbox{with}\ a \in {\mathbb R}^{+}~}}$: \begin{align} &\color{#77f}{\large\int_{0}^{\infty}\!\!\!{\arctan\pars{x}\,\dd x \over \expo{ax} - 1}} \\[3mm]&=\color{#77f}{\large{\pi \over a} \bracks{\ln\pars{\Gamma\pars{a \over 2\pi}} + {a \over 2\pi} - {a \over 2\pi}\, \ln\pars{a \over 2\pi} + \half\,\ln\pars{a \over 4\pi^{2}}}} \end{align}

Solution 3:

I hope it is OK that I chime in, but I had played around with this one sometime back using the Abel-Plana formula. A formula which can come in handy. It isn't as nice as Achille and Felix solutions, but it does show how cool the AP formula can be.

In case you're unfamiliar, the Abel-Plana formula states:

$$\sum_{n=0}^{\infty}f(n)=1/2f(0)+\int_{0}^{\infty}f(x)dx+i\int_{0}^{\infty}\frac{f(ix)-f(-ix)}{e^{2\pi x}-1}dx$$

Now, let $\displaystyle f(n)=\frac{1}{(n+t)^{a}}$

Note the sum $\sum_{n=0}^{\infty}\frac{1}{(n+t)^{a}}=\zeta(a,t)$

and we have: $$\sum_{n=0}^{\infty}\frac{1}{(n+t)^{a}}=\frac{1}{2t^{a}}+\frac{1}{(s-1)t^{s-1}}+i\int_{0}^{\infty}\frac{(t+ix)^{-a}-(t-ix)^{-a}}{e^{2\pi x}-1}dx \tag{1}$$.

Note that $$\frac{1}{(t+ix)^{a}}-\frac{1}{(t-ix)^{a}}=\frac{2}{i(t^{2}+x^{2})^{a/2}}\sin(a\cdot \tan^{-1}(x/t))$$

diff (1) w.r.t 'a' and get:

$$\zeta'(a,t)=\frac{-\log(t)}{2t^{a}}-\frac{t^{1-a}[1+(a-1)\log(t)]}{(a-1)^{2}}+i\int_{0}^{\infty}\frac{(t-ix)^{-a}\log(t-ix)-(t+ix)^{-a}\log(t+ix)}{e^{2\pi x}-1}dx \tag{2}$$

The integral on the right can be written as:

$$2\Im \int_{0}^{\infty}\frac{(t+ix)^{-a}\log(t+ix)}{e^{2\pi x}-1}dx$$

Now, let $a=0$ in (2):

$$\zeta'(0,t)=(t-1/2)\log(t)-t+i\int_{0}^{\infty}\frac{\log(t-ix)-\log(t+ix)}{e^{2\pi x}-1}dx$$

Notice what the right side is beginning to look like?. Remember the complex arctan identity.

so, we have $$\zeta'(0,t)=(t-1/2)\log(t)-t+2\int_{0}^{\infty}\frac{\tan^{-1}(x/t)}{e^{2\pi x}-1}dx$$

We can also use an identity that states $\displaystyle \zeta'(0,t)=\log\Gamma(t)-1/2\log(2\pi)$

and finally arrive at:

$$\log\Gamma(t)-1/2\log(2\pi)=(t-1/2)\log(t)-t+2\int_{0}^{\infty}\frac{\tan^{-1}(x/t)}{e^{2\pi x}-1}dx$$

But, to get this last arctan integral into your form, I used the same sub Felix used and let $t\to \frac{a}{2\pi}$

$$\frac{2\pi}{a}\int_{0}^{\infty}\frac{\tan^{-1}(\frac{2\pi u}{a})}{e^{2\pi u}-1}du=\frac{\pi}{a}\left[\log\Gamma(\frac{a}{2\pi})-\frac{a}{2\pi}\log(\frac{a}{2\pi})+1/2\log(\frac{a}{2\pi})+\frac{a}{2\pi}-1/2\log(2\pi)\right]$$

i.e. Let $a=2\pi$ and get the famous:

$\displaystyle \int_{0}^{\infty}\frac{\tan^{-1}(x)}{e^{2\pi x}-1}dx=1/2-1/4\log(2\pi)$