# Closed form for $\int_0^\infty\arctan\Bigl(\frac{2\pi}{x-\ln\,x+\ln(\frac\pi2)}\Bigr)\frac{dx}{x+1}$ [closed]

I'm trying to find a closed form for this integral: $$I=\int_0^\infty\arctan\left(\frac{2\pi}{x-\ln\,x+\ln\left(\frac\pi2\right)}\right)\frac{dx}{x+1}$$ Its approximate numeric value is $$I\approx3.3805825284453469793953592216276992165696856825906055108192183...$$

Any help is appreciated. Thanks!

• This question is off-topic for this site, because it lacks sufficient context, such as (1) where the integral comes from and (2) why the integral is of interest. Questions like this are likely to be put on hold. Feb 19, 2015 at 19:58
• @CarlMummert With all my respect, but I completely disagree. I do not care at all were this integral came from, or what purpose does it serve. Mathematics is not a purely utilitarian science, and many problems are interesting just on their own, because they are teasing our mind. It's always subjective of course, but a problem need not to be interesting to everybody to be on-topic here. I like almost all questions about definite integrals, especially ones like this, when we have a good candidate for a closed form, but it's not obvious at all how to get it. Feb 20, 2015 at 17:43
• @CarlMummert: I think this question is of intrinsic interest. I would definitely like to see how one approaches this integral. In this, I agree with Vladimir. However, it would be nice to know where it comes from to have an idea that it does have a solution and what tools might be required. Cleo's answer shows that a solution is highly likely, and may urge others to look for that solution.
– robjohn
Feb 20, 2015 at 22:30
• @Carl Mummert in my opinion your comments are problematic since you don't seem to understand how important is to know the closed form of such integrals, series. I'm here only for these questions. Let me tell you how I understand the question: well, the question is so difficult (in case you didn't realize) that it's even hard to find a starting point. So, I understand the OP. Besides that, the OP is known for posting questions that were proposed in some contest or from personal research. You should do some research and see the questions the OP posted so far. Feb 21, 2015 at 22:27
• @Chris'ssis: if the integral is of some paritcular importance, the OP could certainly explain that in the question. Just "being a hard integral" cannot be sufficient to make a question on-topic here. Otherwise someone could write a script to post hundreds of hard integals, at whatever limit the software allows them to be posted. The question in its current form does not show any research effort, or give any motivation for the integral. We can and should expect more than a PSQ from a user with 2,500 rep. Feb 21, 2015 at 22:49

Computing a Related Contour Integral:

Define $$f(z)=\frac{i}{2}\frac{z-1}{1+az}\left(\frac{1}{z-\ln{z}+\ln\left(\frac{\pi}{2}\right)}+\frac{1}{z-\ln{z}+2\pi i+\ln\left(\frac{\pi}{2}\right)}\right)$$ and let $\gamma$ denote a keyhole contour deformed around $[0,\infty]$. Restricting the argument between $0$ and $2\pi$, it is not hard to see that $f(z)$ has poles at $z=-\dfrac{1}{a}$, $z=-W_{-1}\left(-\dfrac{\pi}{2}\right)=\dfrac{\pi i}{2}$, and $z=-W_0\left(-\dfrac{\pi}{2}\right)=-\dfrac{\pi i}{2}$. The residues at these poles are \begin{align} \operatorname*{Res}_{z=\frac{\pi i}{2}}f(z) &=\frac{i}{2}\frac{\frac{\pi i}{2}-1}{\frac{\pi i}{2}a+1}\frac{1}{1-\frac{2}{\pi i}}\\ \operatorname*{Res}_{z=-\frac{\pi i}{2}}f(z) &=\frac{i}{2}\frac{\frac{\pi i}{2}+1}{\frac{\pi i}{2}a-1}\frac{1}{1+\frac{2}{\pi i}}\\ \operatorname*{Res}_{z=-\frac{1}{a}}f(z) &=-\frac{i}{2}u'(a)\left(\frac{1}{u(a)+\ln\left(\frac{\pi}{2}\right)-\pi i}+\frac{1}{u(a)+\ln\left(\frac{\pi}{2}\right)+\pi i}\right)\\ \end{align} where $u(a)=\ln{a}-\dfrac{1}{a}$. By the residue theorem, \begin{align} \oint_{\gamma}f(z)\ dz &=2\pi i\sum_{z_k\in\left\{-a^{-1}, \pm\pi i/2\right\}}\operatorname*{Res}_{z=z_k}f(z)\\ &=\pi\left(\frac{2\left(u(a)+\ln\left(\frac{\pi}{2}\right)\right)}{\left(u(a)+\ln\left(\frac{\pi}{2}\right)\right)^2+\pi^2}u'(a)-\frac{2\pi^2a}{\pi^2a^2+4}\right) \end{align}

Parameterisation of the Contour Integral:

We take the argument of $z$ to be $0$ above the branch cut, and $2\pi$ below the branch cut. Also, the contribution from the big arc is clearly $2\pi i\times\dfrac{i}{2}\times\dfrac{1}{a}\times (1+1)=-\dfrac{2\pi}{a}$. Taking all of these points into consideration, we eventually arrive at \begin{align} \oint_\gamma f(z)\ dz+\frac{2\pi}{a} &=\small\frac{i}{2}\int^\infty_0\frac{x-1}{1+ax}\left(-\frac{1}{x-\ln|x|-2\pi i+\ln\left(\frac{\pi}{2}\right)}+\frac{1}{x-\ln|x|+2\pi i+\ln\left(\frac{\pi}{2}\right)+\pi^2}\right)\ dx\\ &=2\pi\int^\infty_0\frac{x-1}{\left(x-\ln{x}+\ln\left(\frac{\pi} {2}\right)\right)^2+4\pi^2}\frac{dx}{1+ax}\\ \end{align}

Obtaining the Closed Form:

Integrating with respect to $a$, we obtain \begin{align} \small\int^\infty_0\frac{2\pi\left(1-\frac{1}{x}\right)\ln(1+ax)}{\left(x-\ln{x}+\ln\left(\frac{\pi}{2}\right)\right)^2+4\pi^2}\ dx &\small=\ \pi\int\left(\frac{2\left(u(a)+\ln\left(\frac{\pi}{2}\right)\right)}{\left(u(a)+\ln\left(\frac{\pi}{2}\right)\right)^2+\pi^2}u'(a)-\frac{2\pi^2a}{\pi^2a^2+4}+\frac{2}{a}\right)\ da\\ &=\small\pi\left(\ln\left(\left(u(a)+\ln\left(\frac{\pi}{2}\right)\right)^2+\pi^2\right)-\ln\left(\pi^2a^2+4\right)+\ln{a^2}\right)+\text{const.}\\ &=\small\pi\ln\left(\frac{\left(\ln{a}-\frac{1}{a}+\ln\left(\frac{\pi}{2}\right)\right)^2+\pi^2}{\pi^2+\frac{4}{a^2}}\right)+\text{const.} \end{align} Letting $a\to 0$, we find that the constant term is $\pi\ln{4}$. Plugging in $a=1$ and integrating by parts, we finally arrive at the closed form. \begin{align} \int^\infty_0\frac{2\pi\left(1-\frac{1}{x}\right)\ln(1+x)}{\left(x-\ln{x}+\ln\left(\frac{\pi}{2}\right)\right)^2+4\pi^2}\ dx &=\int^\infty_0\arctan\left(\frac{2\pi}{x-\ln{x}+\ln\left(\frac{\pi}{2}\right)}\right)\frac{dx}{1+x}\\ &=\left.\pi\ln\left(\frac{\left(\ln{a}-\frac{1}{a}+\ln\left(\frac{\pi}{2}\right)\right)^2+\pi^2}{\frac{\pi^2}{4}+\frac{1}{a^2}}\right)\right|_{a=1}\\ &=\color{red}{\pi\ln\left(\frac{\ln^2\left(\frac{\pi}{2}\right)-2\ln\left(\frac{\pi}{2}\right)+1+\pi^2}{\frac{\pi^2}{4}+1}\right)} \end{align}

• Congrats!:-) Very instructive solution! +1 Feb 22, 2015 at 7:13
• Nice! I assume $W$ is the Lambert $W$-function, right? Feb 22, 2015 at 18:40
• @Vladimir Reshetnikov Yes, here $W$ refers to the Lambert W function. Feb 22, 2015 at 22:37
• How on earth do come up with the idea to choose $f(z)$ exactly like that?? Jul 18, 2016 at 20:23
• Damn. 2 bounties!
– user535339
Mar 16, 2018 at 5:11

$$I=\pi\,\ln\left(\frac{1+\pi^2+\ln^2\left(\frac\pi2\right)-2\ln\left(\frac\pi2\right)}{1+\frac{\pi^2}4}\right)$$

It is not very nice, but... integration by parts leads to:

$$I = \int_{0}^{+\infty}\frac{2\pi(x-1)\log(1+x)}{x^2+2x^2\log\frac{\pi}{2}+\left(4\pi^2+\log^2\frac{\pi}{2}\right)x-2x^2\log x+x\log x\log\frac{4\pi}{x^2}}\,dx$$ that, at least in principle, can be computed through the residue theorem.

• It would be helpful if you could shed light on how the poles of the integral are found. Feb 17, 2015 at 15:22