<s>[INST] Need help with $\int_0^1\frac{\log(1+x)-\log(1-x)}{\left(1+\log^2x\right)x}\,dx$ 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.
 [/INST] 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} $$
Therefore,
$$\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.
</s>