Please help me to evaluate this integral $$\int_0^1\frac{\log(1+x)-\log(1-x)}{\left(1+\log^2x\right)x}\,dx$$ I tried a change of variable $x=\tanh z$, that transforms it into the form $$\int_0^\infty\frac{4z}{\left(1+\log^2\tanh z\right)\sinh2z}\,dz,$$ but I do not know what to do next.

  • $\begingroup$ @GaussTheBauss Yes, I want a closed form for the definite integral. But it does not mean there should be necessarily a closed-form anti-derivative. Definite integration over some regions can sometimes give closed-form answers even where no closed-form anti-derivative exists. $\endgroup$ – Marty Colos Dec 20 '15 at 21:48
  • 1
    $\begingroup$ On this site, we look for motivation as well as a problem statement. What is the motivation for this integral? Where did you encounter it? What is its background and "biography"? That information would significantly improve this post. $\endgroup$ – Carl Mummert Dec 20 '15 at 22:15
  • 2
    $\begingroup$ @CarlMummert As for me, this integral looks interesting by itself, and I am going to enjoy trying to evaluate it. I do not see how knowing its origin would help me to find a solution. $\endgroup$ – Vladimir Reshetnikov Dec 20 '15 at 22:20
  • 1
    $\begingroup$ @Vladimir Reshetnikov: perhaps that is true, but the purpose of improving the question is not only to help find a solution, but also to raise the general quality of questions on this site. Questions which merely propose a problem with no motivation are unfortunately too common, and new users should be aware that such questions are often put on hold for improvement. $\endgroup$ – Carl Mummert Dec 20 '15 at 22:22
  • 1
    $\begingroup$ This is equivalent to $$2\int_0^\infty \frac{\log(\coth(u))}{1+4u^2}\,du$$ I don't know how to proceed from here. $\endgroup$ – Ben Longo Dec 20 '15 at 22:23

Recall the Frullani Integral: $$ \int_0^\infty\frac{e^{-ax}-e^{-bx}}{x}\,\mathrm{d}x =\log(b/a)\tag{1} $$ and scale equation $(4)$ from this answer to get $$ \sum_{k=0}^\infty\frac1{(2k+1)^2+u^2} =\frac\pi{4u}\tanh\left(\frac{\pi u}2\right)\tag{2} $$ Then $$ \begin{align} &\int_0^1\frac{\log(1+x)-\log(1-x)}{\left(1+\log^2(x)\right)x}\,\mathrm{d}x\\ &=\int_0^\infty\frac{\log\left(1+e^{-u}\right)-\log\left(1-e^{-u}\right)}{1+u^2}\,\mathrm{d}u\tag{3a}\\ &=2\sum_{k=0}^\infty\int_0^\infty\frac{e^{-(2k+1)u}}{2k+1}\frac{\mathrm{d}u}{1+u^2}\tag{3b}\\ &=2\sum_{k=0}^\infty\int_0^\infty\frac{e^{-u}\,\mathrm{d}u}{(2k+1)^2+u^2}\tag{3c}\\ &=2\int_0^\infty\frac\pi{4u}\tanh\left(\frac{\pi u}2\right)e^{-u}\,\mathrm{d}u\tag{3d}\\ &=\frac\pi2\int_0^\infty\frac{1-e^{-\pi u}}{u}\frac{e^{-u}}{1+e^{-\pi u}}\,\mathrm{d}u\tag{3e}\\ &=\frac\pi2\int_0^\infty\sum_{k=0}^\infty(-1)^k\frac{e^{-(k\pi+1)u}-e^{-((k+1)\pi+1)u}}u\,\mathrm{d}u\tag{3f}\\ &=\frac\pi2\sum_{k=0}^\infty(-1)^k\log\left(\frac{(k+1)\pi+1}{k\pi+1}\right)\tag{3g}\\ &=\frac\pi2\sum_{k=0}^\infty\log\left(\frac{(2k+1)\pi+1}{2k\pi+1}\frac{(2k+1)\pi+1}{(2k+2)\pi+1}\right)\tag{3h}\\ &=\lim_{n\to\infty}\frac\pi2\log\left[\prod_{k=0}^n\frac{k+\frac12+\frac1{2\pi}}{k+\frac1{2\pi}}\frac{k+\frac12+\frac1{2\pi}}{k+1+\frac1{2\pi}}\right]\tag{3i}\\ &=\lim_{n\to\infty}\frac\pi2\log\,\left[\frac{\Gamma\left(n+\frac32+\frac1{2\pi}\right)^2}{\Gamma\left(\frac12+\frac1{2\pi}\right)^2}\frac{\Gamma\left(\frac1{2\pi}\right)\Gamma\left(1+\frac1{2\pi}\right)}{\Gamma\left(n+1+\frac1{2\pi}\right)\Gamma\left(n+2+\frac1{2\pi}\right)}\right]\tag{3j}\\ &=\frac\pi2\log\,\left[\frac{\Gamma\left(\frac1{2\pi}\right)\Gamma\left(1+\frac1{2\pi}\right)}{\Gamma\left(\frac12+\frac1{2\pi}\right)^2}\right]\tag{3k}\\ &=\bbox[5px,border:2px solid #C0A000]{\pi\log\,\left[\frac{\frac1{\sqrt{2\pi}}\Gamma\left(\frac1{2\pi}\right)}{\Gamma\left(\frac12+\frac1{2\pi}\right)}\right]}\tag{3m} \end{align} $$ Explanation:
$\text{(3a)}$: Substitute $x=e^{-u}$
$\text{(3b)}$: $\log\left(\frac{1+x}{1-x}\right)=2\sum\limits_{k=0}^\infty\frac{x^{2k+1}}{2k+1}$
$\text{(3c)}$: Substitute $u\mapsto\frac u{2k+1}$
$\text{(3d)}$: apply $(2)$
$\text{(3e)}$: $\tanh\left(\frac{\pi u}2\right)=\frac{1-e^{-\pi u}}{1+e^{-\pi u}}$
$\text{(3f)}$: $\frac1{1+x}=\sum\limits_{k=0}^\infty(-1)^kx^k$
$\text{(3g)}$: apply $(1)$
$\text{(3h)}$: combine $2k$ and $2k+1$ terms
$\text{(3i)}$: change a sum of logs to a log of a product
$\text{(3j)}$: write products as ratios of Gamma functions
$\text{(3k)}$: apply Gautschi's Inequality
$\text{(3m)}$: $\Gamma(1+x)=x\Gamma(x)$


An alternative way to evaluate $$\frac{\pi}{2} \int_{0}^{\infty} \tanh \left(\frac{\pi u}{2} \right) \frac{e^{-u}}{u} \, du ,$$ which is line $3d$ in robjohn's answer, is to add a parameter and then differentiate under the integral sign.

Specifically, let $$I(a) = \frac{\pi}{2}\int_{0}^{\infty} \tanh \left(\frac{\pi u}{2} \right) \frac{e^{-au}}{u} \, du.$$

Then $$ \begin{align} I'(a) &= - \frac{\pi}{2} \int_{0}^{\infty} \tanh \left(\frac{\pi u}{2} \right) e^{-au} \, du \\ &= -\frac{\pi}{2} \int_{0}^{\infty} \left(\frac{1}{1+e^{- \pi u}}- \frac{e^{- \pi u}}{1+e^{-\pi u}} \right)e^{-au} \, du \\ &= -\frac{\pi}{2} \int_{0}^{\infty} \left(\sum_{n=0}^{\infty} (-1)^{n} e^{-n \pi u} + \sum_{n=1}^{\infty} (-1)^{n} e^{-n \pi u} \right)e^{-au} \, du \\ &= \frac{\pi}{2} \int_{0}^{\infty} \left(1- 2 \sum_{n=0}^{\infty} (-1)^{n}e^{-n \pi u} \right) e^{-au} \, du \\ &= \frac{\pi }{2a} -\pi \sum_{n=0}^{\infty} \frac{(-1)^{n}}{a+n \pi} \\ &= \frac{\pi }{2a} -\frac{1}{2} \psi \left(\frac{a+\pi}{2 \pi} \right) + \frac{1}{2} \psi \left(\frac{a}{2 \pi} \right) \tag{1}. \end{align}$$

Integrating back, we get $$ \begin{align} I(a) &= \frac{\pi}{2} \log(a) - \pi \log \Gamma \left(\frac{a+\pi}{2 \pi} \right) + \pi \log \Gamma\left(\frac{a}{2 \pi} \right) +C \\ &= \pi \log \left(\frac{\sqrt{a} \, \Gamma \left(\frac{a}{2 \pi } \right)}{\Gamma \left(\frac{a}{2 \pi} + \frac{1}{2} \right)} \right) + C,\end{align} $$

where $$\lim_{a \to \infty} I(a) =0 = \lim_{a \to \infty} \pi \log \left(\frac{\sqrt{a} \, \Gamma \left(\frac{a}{2 \pi } \right)}{\Gamma \left(\frac{a}{2 \pi} + \frac{1}{2} \right)} \right) +C $$

$$= \pi \log (\sqrt{2 \pi}) + C. \tag{2} $$


$$\frac{\pi}{2} \int_{0}^{\infty} \tanh \left(\frac{\pi u}{2} \right) \frac{e^{-u}}{u} \, du = I(1) =\pi \log \left(\frac{ \Gamma \left(\frac{1}{2 \pi } \right)}{\sqrt{2 \pi} \, \Gamma \left(\frac{1}{2 \pi} + \frac{1}{2} \right)} \right).$$

$$ $$

$(1)$ http://mathworld.wolfram.com/DigammaFunction.html (6)

$(2)$ In general, for $x,y>0$, $\lim_{a \to \infty} \frac{a^{x} \Gamma(ya)}{\Gamma(ya+x)} = y^{-x}$. This can be proven using Stirling's approximation formula for the gamma function.

  • $\begingroup$ (+1) Nice alternative! Differentiation instead of Frullani; it is not too hard to see that they are related. I think $(2)$ can be shown more easily using Gautschi's inequality, but Stirling also gets there. $\endgroup$ – robjohn Dec 21 '15 at 20:58
  • $\begingroup$ @robjohn My original idea was to use the fact that $\int_{0}^{\infty} \frac{\cos(xt)}{t} \tanh \left(\frac{\pi t}{2} \right) \, dt = \log \left(\coth \frac{x}{2} \right)$. But that only takes you from (3a) to (3d). $\endgroup$ – Random Variable Dec 21 '15 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.