Evaluate $\int_0^1\left(\frac{x-1}{x+1}\right)^n\frac{1}{\ln x} \,dx$

Write $I_n$ for the integral and we introduce the following regularization:

$$ I_n(s) := - \int_{0}^{1} \left(\frac{x-1}{x+1}\right)^n (-\log x)^{s-1} \, \mathrm{d}x. $$

This defines an analytic function for $\operatorname{Re}(s) > -n$. We aim at determining the expression of $I_n(s)$ using the principle of analytic continuation.

To this end, we temporarily assume that $s > n$. Then applying the substitution $x \mapsto e^{-x}$,

\begin{align*} I_n(s) &= - \int_{0}^{\infty}\left(2 - \frac{1}{1+e^{-x}} \right)^n x^{s-1}e^{-x} \, \mathrm{d}x \\ &= - \sum_{k=0}^{n} \binom{n}{k} (-2)^k \int_{0}^{\infty} \frac{x^{s-1}e^{-x}}{(1+e^{-x})^k} \, \mathrm{d}x \end{align*}

Now we utilize the following expansion

$$ \frac{z}{(1+z)^k} = \frac{1}{(k-1)!} \sum_{j=0}^{k-1} \left[ {k-1 \atop j} \right] \sum_{l=1}^{\infty} (-1)^{l-1} l^j z^l, $$

valid for $k \geq 1$ and $|z| < 1$, where $\left[{n \atop k}\right]$ is the unsigned Stirling numbers of the first kind. Then for $k \geq 1$, using the fact that $s > n$, Fubini's Theorem yields

\begin{align*} \int_{0}^{\infty} \frac{x^{s-1}e^{-x}}{(1+e^{-x})^k} \, \mathrm{d}x &= \frac{1}{(k-1)!} \sum_{j=0}^{k-1} \left[ {k-1 \atop j} \right] \sum_{l=1}^{\infty} (-1)^{l-1} l^j \int_{0}^{\infty} x^{s-1}e^{-lx} \, \mathrm{d}x \\ &= \frac{1}{(k-1)!} \sum_{j=0}^{k-1} \left[ {k-1 \atop j} \right] \sum_{l=1}^{\infty} (-1)^{l-1} \frac{\Gamma(s)}{l^{s-j}} \\ &= \frac{1}{(k-1)!} \sum_{j=0}^{k-1} \left[ {k-1 \atop j} \right] \Gamma(s)\eta(s-j), \end{align*}

where

$$ \eta(s) := \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^s} = (1 - 2^{1-s})\zeta(s) $$

is the Dirichlet eta function. Plugging this back, we get

\begin{align*} I_n(s) &= - \Gamma(s) \Biggl( 1 + \sum_{k=1}^{n} \binom{n}{k} \frac{(-2)^k}{(k-1)!} \sum_{j=0}^{k-1} \left[ {k-1 \atop j} \right] \eta(s-j) \Biggr). \end{align*}

Although this equality is initially derived only for $s > n$, both sides define meromorphic functions on the region $\operatorname{Re}(s) > -n$, and as such, they must coincide on all of this region. Then, taking the limit as $s\to0$,

\begin{align*} I_n = I_n(0) &= - \sum_{k=1}^{n} \binom{n}{k} \frac{(-2)^k}{(k-1)!} \sum_{j=0}^{k-1} \left[ {k-1 \atop j} \right] \eta'(-j) \\ &= - \sum_{k=1}^{n} \binom{n}{k} \frac{(-2)^k}{(k-1)!} \sum_{j=0}^{k-1} \left[ {k-1 \atop j} \right] \left( 2^{1+j} \zeta(-j)\log 2 + (1-2^{1+j})\zeta'(-j) \right). \end{align*}

The following table is generated by Mathematica 11 using the above formula:

$$ \begin{array}{c|c} \hline n & I_n \\ \hline 1 & \log (2 \pi )-2 \log (2) \\ 2 & -12 \log (A)+1-\frac{8 \log (2)}{3}+2 \log (2 \pi ) \\ 3 & -24 \log (A)-28 \zeta '(-2)+2-\frac{10 \log (2)}{3}+3 \log (2 \pi ) \\ 4 & -40 \log (A)+40 \zeta '(-3)-56 \zeta '(-2)+\frac{10}{3}-\frac{176 \log (2)}{45}+4 \log (2 \pi ) \\ 5 & -56 \log (A)-\frac{124}{3} \zeta '(-4)+80 \zeta '(-3)-\frac{308}{3} \zeta '(-2)+\frac{14}{3}-\frac{202 \log (2)}{45}+5 \log (2 \pi ) \\ \hline \end{array} $$


Let $$I_n = \int_0^1\left(\frac{x-1}{x+1}\right)^n\frac{1}{\log( x)} \,dx$$ For the first values of $n$,we have $$I_1=-L_2+L_\pi$$ $$I_2=-12 L_A+1-\frac{2 L_2}{3}+2 L_\pi $$ $$I_3=-28 \zeta '(-2)-24 L_A+2-\frac{L_2}{3}+3 L_\pi$$ $$I_4=+40 \zeta '(-3)-56 \zeta '(-2)-40 L_A+\frac{10}{3}+\frac{4 L_2}{45}+4 L_\pi$$ $$I_5=-\frac{124}{3} \zeta '(-4)+80 \zeta '(-3)-\frac{308}{3} \zeta '(-2)-56 L_A+\frac{14}{3}+\frac{23 L_2}{45}+5 L_\pi$$ $$I_6=\frac{168}{5} \zeta '(-5)-\frac{248}{3} \zeta '(-4)+160 \zeta '(-3)-\frac{448}{3} \zeta '(-2)-\frac{372 L_A}{5}+\frac{31}{5}+\frac{926 L_2}{945}+6 L_\pi$$ where $L_p=\log(p)$. Very few patterns seem to appear.

From a numerical point of view, an empirical model such as $$I_n=(-1)^n \frac{a+b\,n^c}{1+d\, n^e}$$ seems to be quite accurate. Built for $1 \leq n \leq 100$ $(R^2 > 0.9999999)$, the following parameters were obtained. $$\begin{array}{llll} \text{} & \text{Estimate} & \text{Std.Error} & \text{Confidence Interval} \\ a & 2.674946 & 0.009256 & \{2.656568,2.693323\} \\ b & 1.416719 & 0.001995 & \{1.412758,1.420680\} \\ c & 0.827227 & 0.000893 & \{0.825453,0.829001\} \\ d & 8.060723 & 0.023499 & \{8.014066,8.107380\} \\ e & 1.984695 & 0.001326 & \{1.982062,1.987328\} \\ \end{array}$$