Evaluating $\int_{0}^{1}\frac{x-1}{(x+1)\ln x} dx $ [duplicate]
Evaluate the following integral $$\displaystyle I=\int_{0}^{1}\frac{x-1}{(x+1)(\ln x)} \mathrm{d}x $$
My work: I tried it by letting $\displaystyle I(a)=\int_{0}^{1}\frac{(x-1)x^a}{(x+1)(\ln x)} \mathrm{d}x$ and then $\displaystyle I'(a)=\int_{0}^{1}\frac{(x-1)x^a}{x+1} \mathrm{d}x$.
Now $\displaystyle I'(a)=\int_{0}^{1}x^a \mathrm{d}x-\int_{0}^{1}\frac{2x^a}{x+1} \mathrm{d}x$
Now if $\displaystyle J(a)=\int_{0}^{1}\frac{x^a}{x+1}\mathrm{d}x$ , then by applying integration by parts, we get the reccurence relation $J(a)+J(a-1)=\dfrac{1}{a}$ and we can solve it then, but the thing is, we neet to find $I(0)$ ,so even if we compute $J(a)$, it wouldn't be defined at $0$ and so would $I(a)$, then how do I find $I'(a)$ by other method?
I also tried the substitution $x \to \frac{1}{x}$, which yields $\displaystyle I=\int_{1}^{\infty}\frac{(x-1)}{(x+1)(\ln x)} \mathrm{d}x$ and when I saw their graphs, it clearly doesn't seem that the area under the graph of this function from $0$ to $1$ and from $1$ to $\infty$ are equal.
I would appreciate if someone could continue from my method and other solutions are also welcomed...
We know that $$\int_0^1 x^y \, \mathrm{d}y=\frac{x-1}{\ln{x}}$$ Therefore, \begin{align*} \int_{0}^{1}\frac{\color{red}{x-1}}{(x+1)\color{red}{\ln x}} \mathrm{d}x &= \int_0^1 \color{red}{\int_0^1} \frac{\color{red}{x^y}}{1+x} \, \color{red}{\mathrm{d}y} \, \mathrm{d}x\\ &=\int_0^1 \int_0^1 \sum_{n=0}^{\infty} {(-1)}^n x^{n+y} \, \mathrm{d}x \, \mathrm{d}y\\ &= \sum_{n=0}^{\infty} {(-1)}^n \int_0^1 \int_0^1 x^{n+y} \, \mathrm{d}x \, \mathrm{d}y \tag{1}\\ &= \sum_{n=0}^{\infty} {(-1)}^n \int_0^1 \frac{1}{y+n+1} \, \mathrm{d}y \\ &= \sum_{n=0}^{\infty} {(-1)}^n \left(\ln{(n+2)}-\ln{(n+1)}\right) \\ &= \ln{\left(\prod_{n=0}^{\infty} \frac{{(2n+2)}^2}{(2n+1)(2n+3)}\right)} \tag{2}\\ &= \boxed{\ln{\left(\frac{\pi}{2}\right)}} \\ \end{align*}
$(1)$: See Sangchul Lee's comment
$(2)$: Wallis product
Here, we will more focus on answering to OP's specific questions:
1. The substitution $x\mapsto1/x$ yields
$$ I = \int_{1}^{\infty} \frac{x-1}{x^2(x+1)\log x} \, \mathrm{d}x. $$
So it seems that OP made a mistake when applying the substitution.
2. Continuing from OP's approach, the recurrence relation and $J(\infty)=0$ together imply
$$ J(a) = \frac{1}{a+1}-\frac{1}{a+2}+\frac{1}{a+3}-\dots,$$
and hence
\begin{align*} -I'(a) &= -\frac{1}{a+1} + 2 \biggl( \frac{1}{a+1}-\frac{1}{a+2}+\frac{1}{a+3}-\dots \biggr) \\ &= \biggl( \frac{1}{a+1} - \frac{2}{a+2} + \frac{1}{a+3} \biggr) + \biggl( \frac{1}{a+3} - \frac{2}{a+4} + \frac{1}{a+5} \biggr) + \dots \\ &= \sum_{n=1}^{\infty} \biggl( \frac{1}{a+2n-1} - \frac{2}{a+2n} + \frac{1}{a+2n+1} \biggr). \end{align*}
Now we integrate both sides from $0$ to $\infty$. Then the left-hand side becomes $I(0)$ by $I(\infty) = 0$. On the other hand, each term of the summation is non-negative, so we can apply the Fubini-Tonelli Theorem to interchange the order of integration and summation to get
\begin{align*} I(0) &= \int_{0}^{\infty} (-I'(a)) \, \mathrm{d}a \\ &= \sum_{n=1}^{\infty} \int_{0}^{\infty} \biggl( \frac{1}{a+2n-1} - \frac{2}{a+2n} + \frac{1}{a+2n+1} \biggr) \, \mathrm{d}a \\ &= \sum_{n=1}^{\infty} (-\log(2n-1) + 2 \log(2n) - \log(2n+1)) \\ &= \log \Biggl( \prod_{n=1}^{\infty} \frac{2n}{2n-1} \cdot \frac{2n}{2n+1} \Biggr). \end{align*}
By using the Wallis product formula, the product term reduces to $\frac{\pi}{2}$, proving
$$ I(0) = \log\left(\frac{\pi}{2}\right). $$
Note that $$\int_0^1 x^y dy=\frac{x-1}{\ln x}$$using this result our integral becomes $$\begin{aligned} I &=\int_0^1\frac{x-1}{(x+1) \ln x}\\&=\int_0^1\left(\frac{1}{x+1}\int_0^1x^ydy\right)dx \\&=\int_0^1\int_0^1\frac{x^y}{1+x}dy dx\\&=\int_0^1\underbrace{\int_0^1\frac{x^y}{1+x}dx }_{I_1}dy \end{aligned}$$ Since the integral $$I_1=\int_0^1\frac{x^y}{1+x}dx =\frac{1}{2}\left(H_{\frac{ y}{2}}-H_{\frac{y-1}{2}}\right)=\frac{1}{2}\left(\psi^0\left(\frac{2y+1}{2}\right)-\psi^0\left(\frac{y+1}{2}\right)\right)$$ is well know result which I have proved here by polynomial long division. Integrating $I_1$ we yield $$ \begin{aligned}I &= \int_0^1 I_1 dy \\&=\left|\ln\Gamma\left(\frac{y+2}{2}\right)-\ln\Gamma\left(\frac{y+1}{2}\right)\right|_0^1\\& =\ln\left[ \Gamma\left(\frac{3}{2}\right)\Gamma\left(\frac{1}{2}\right)\right)\cdots(1)\\&=\ln\left(\frac{\sqrt{\pi}}{2}\sqrt{\pi}\right)=\ln\left(\frac{\pi}{2}\right)\end{aligned}$$ we use the half gamma $\displaystyle \Gamma\left(\frac{1}{2}+n\right)=\frac{(2n)!}{4^n n!}\sqrt{\pi}$ argument in $(1)$ or using functional equation of gamma function we can write $(1)$ as $\displaystyle=\ln\left(\frac{1}{2}\Gamma^2\left(\frac{1}{2}\right)\right)=\ln\left(\frac{\pi}{2}\right)$
Alternatively$$\begin{aligned}I_1 & =\int_0^1\frac{x^y}{1+x}dx \\&=\int_0^1x^y \left(\sum_{r=0}^{\infty} (-1)^r x^r\right)dx\\&=\sum_{r=0}^{\infty} \frac{(-1)^r}{y+r+1}=\Phi\left(-1,1,y+1\right)\cdots(3)\end{aligned}$$ where $\Phi(z,s,\alpha )$ is Lerch Transcendent function using the equation 5 and 6 we obtain $$I= \frac{1}{2}\left(\psi^0\left(\frac{2y+1}{2}\right)-\psi^0\left(\frac{y+1}{2}\right)\right)$$ To prove tha relationship between $ (3)$ and finally result we can directly use series formula of digamma function.