Evaluate $\int_0^1\left(\frac{1}{\ln x} + \frac{1}{1-x}\right)^2 \mathrm dx$ Evaluate
$$\int_0^1\left(\frac{1}{\ln x} + \frac{1}{1-x}\right)^2 \mathrm dx$$
 A: A bit late to the party, but here is a slightly different approach that doesn't use any series, Stirling's approximations or anything, though does make use of some values of the zeta function.
First substitute $x=e^{-y}$ to get
$$\int_0^\infty \left(\frac{1}{1-e^{-y}}-\frac{1}{y}\right)^2 e^{-y}dy$$
The integrand is awkward because when you multiply it out, the pieces separately diverge. Multiplying it by $y^z$ regulates the singularity at 0 but also gives standard integrals. So for $Re(z)>1$ we have (by parts)
$$\int_0^\infty \frac{1}{(1-e^{-y})^2}e^{-y}y^zdy=z\int_0^\infty \frac{e^{-y}}{1-e^{-y}}y^{z-1}dy=z\zeta(z)\Gamma(z)$$
and
$$\int_0^\infty \frac{1}{y(1-e^{-y})}e^{-y}y^zdy=\zeta(z)\Gamma(z)$$
$$\int_0^\infty \frac{1}{y^2}e^{-y}y^zdy=\Gamma(z-1)$$
Putting the bits together:
$$\int_0^\infty \left(\frac{1}{1-e^{-y}}-\frac{1}{y}\right)^2 e^{-y}y^zdy = \Gamma(z)\left(\frac{1}{z-1}+(z-2)\zeta(z)\right)$$
The derivation was valid for $Re(z)>1$, but both sides of the above equation are analytic for $Re(z)>-1$ (RHS has a removable singularity at $z=0$), so by analytic continuation we may take the limit $z\to0$. Near $z=0$, $\Gamma(z)=1/z+O(1)$, and the final answer is the derivative of $1/(z-1)+(z-2)\zeta(z)$ at 0, i.e.,
$$-1+\zeta(0)-2\zeta'(0)=\log(2\pi)-\frac{3}{2}$$
A: $$
\int_0^1\left(\frac{1}{\log x} + \frac{1}{1-x}\right)^2\;dx = \log(2\pi) - \frac{3}{2} \approx 0.3378770664
$$
A: Ron:
I am not trying to be pretentious, and I realize this is an old post, but if I may offer a little input on the evaluation of your zeta sum.  If I can assume you're still interested at this point. 
I believe it was Choi who has done research on these series.
Using the Barnes G function, many series involving zeta have been evaluated.
Here is a little.  The G represents the Barnes G function. The derivation of this can probably be found by searching for Choi's papers on the matter. 
$\displaystyle \sum_{k=1}^{\infty}\frac{\zeta(2k)-1}{k+1}=\frac{-1}{2}log(2\pi)+1/2-\log(2)-\int_{0}^{1}log[G(t+2)]dt+\int_{0}^{1}log[G(t+1)]dt$
Note that $\displaystyle\int_{0}^{1}log[G(t+2)]dt=log(2\pi)-1+C$
$\displaystyle\int_{0}^{1}log[G(t+1)]dt=\frac{1}{2}log(2\pi)+C$
Putting this together we find the C cancels and we arrive at the result of $\displaystyle\frac{3}{2}-log(\pi)$
So, taking your log(2) and subtracting this from it:
$\displaystyle log(2)-(3/2-log(\pi))=log(2\pi)-3/2$ as required. 
A working knowledge of the Barnes G function will allow one to evaluate some tough series, especially involving log Gamma or zeta. 
A: As @rlgordonma has let us make use of the substitution $x = e^{-y}$ to get the integral as
$$\int_0^{\infty} dy e^{-y} \left ( \frac{(e^{-y} - (1-y))^2}{y^2 (1-e^{-y})^2} \right ) $$
which can be rewritten as $$\sum_{k=1}^{\infty} k \int_0^{\infty} dy \left ( \frac{(e^{-y} - (1-y))^2}{y^2} \right ) e^{- k y} $$
If we call $$\int_0^{\infty} dy \left ( \frac{(e^{-y} - (1-y))^2}{y^2} \right ) e^{- k y} = I(k)$$ as @rlgordonma has, we get that
$$I(k) = (k+2) \log{ \left( \frac{k (k+2)}{(k+1)^2} \right )} + \frac{1}{k}$$
and we want to hence evaluate $$\sum_{k=1}^{\infty} k I(k).$$
Let us write down the first few terms to see what happens
$$kI(k) = 1 + k(k+2) \log(k) + k(k+2) \log(k+2) - 2 k(k+2) \log(k+1)$$
$$1I(1) = 1 + 3 \log(1) + 3 \log(3) - 6 \log(2)$$
$$2I(2) = 1 + 8 \log(2) + 8 \log(4) - 16 \log(3)$$
$$3I(3) = 1 + 15 \log(3) + 15 \log(5) - 30 \log(4)$$
$$4I(4) = 1 + 24 \log(4) + 24 \log(6) - 48 \log(5)$$
$$5I(5) = 1 + 35 \log(5) + 35 \log(7) - 70 \log(6)$$
We see that $$I(1) +2I(2) +3 I(3) + 4I(4) + 5I(5) = 5 + 2(\log 2 + \log 3 + \log 4 + \log 5) -46 \log 6 + 35 \log 7$$
So we see that if we sum upto $n$ terms, we will get a sum of the form $$n + 2 \log(n!) + (\cdot) \log(n+1) + (\cdot) \log(n+2)$$ and then we can call our good old reliable friend, Stirling, to help us with $\log(n!)$. Let us now proceed along these lines. We get
$$S_n = \sum_{k=1}^n k I(k) = \sum_{k=1}^{n} \left(1 + k(k+2) \log(k) + k(k+2) \log(k+2) - 2 k(k+2) \log(k+1) \right)$$
$$S_n = n + \sum_{k=1}^n \overbrace{\left(k(k+2) + (k-2)k - 2(k-1)(k+1) \right)}^2\log(k)\\
 + ((n-1)(n+1)-2n(n+2)) \log(n+1) + (n(n+2)) \log(n+2)$$
$$S_n = n + 2 \sum_{k=1}^n \log(k) - (n^2 + 4n + 1) \log(n+1) + (n^2 + 2n) \log(n+2)$$
$$\sum_{k=1}^n \log(k) = n \log n - n + \dfrac12 \log(2 \pi) + \dfrac12 \log(n) + \mathcal{O}(1/n) \,\,\,\,\,\, \text{(By Stirling)}$$
Hence,
$$S_n = \overbrace{2 n \log n - n + \log(2 \pi) - (n^2 + 4n + 1) \log(n+1) + (n^2 + 2n) \log(n+2) + \log(n)}^{M_n} + \mathcal{O}(1/n)$$
The asymptotic for $M_n$ can now be simplified further by writing $$\log(n+1) = \log (n) + \log \left(1 + \dfrac1n \right)$$
and
$$\log(n+2) = \log (n) + \log \left(1 + \dfrac2n \right)$$
and using the Taylor series for $\log \left(1 + \dfrac1n \right)$ and $\log \left(1 + \dfrac2n \right)$.
$$M_n = \log(2 \pi) - \dfrac32 - \dfrac2{3n} + \dfrac3{4n^2} - \dfrac{17}{15n^3} + \mathcal{O}\left(\dfrac1{n^4}\right)$$
Now, letting $n \to \infty$ gives us
$$\log(2 \pi) - \dfrac32$$
A: @RonGordon last sum becomes:
\begin{align}
&\sum_{k = 1}^{\infty}\left\{
1 + \left(k + 1\right)^{2}\log\left(1 - {1 \over \left[k + 1\right]^2}\right) \right\}=
\sum_{k = 1}^{\infty}\left\{
1 - \left(k + 1\right)^{2}
\int_{0}^{1}{{\rm d}x \over \left(k + 1\right)^{2} - x}\right\}
\\[3mm]&=
-\left[\int_{0}^{1}\sum_{k = 1}^{\infty}{1 \over \left(k + 1\right)^{2} - x}\right]
\,x\,{\rm d}x
=
-\left[\int_{0}^{1}\sum_{k = 0}^{\infty}
{1 \over \left(k + 2 + x^{1/2}\right)\left(k + 2 - x^{1/2}\right)}\right]
\,x\,{\rm d}x
\\[3mm]&=
\int_{0}^{1}{
\Psi\left(2 - x^{1/2}\right) - \Psi\left(2 + x^{1/2}\right) \over 2x^{1/2}}\,x
\,{\rm d}x
=
\underbrace{\int_{0}^{1}
\color{#c00000}{\left\lbrack\Psi\left(2 - x\right) - \Psi\left(2 + x\right)\right\rbrack}\,x^{2}\,{\rm d}x}
_{\displaystyle{\log\left(\pi\right) - {3 \over 2}}}
\end{align}

since
  \begin{align}
&\color{#c00000}{\Psi\left(2 - x\right) - \Psi\left(2 + x\right)}
=\left[\Psi\left(1 - x\right) + {1 \over 1 - x}\right]
-
\left[\Psi\left(x\right) + {1 \over 1 + x} + {1 \over x}\right]
\\[3mm]&=\left[\Psi\left(1 - x\right) - \Psi\left(x\right) - {1 \over x}\right]
+{2x \over 1 - x^{2}}
=\color{#c00000}{\left[\pi\cot\left(\pi x\right) - {1 \over x}\right]
+ {2x \over 1 - x^{2}}}
\end{align}

Sorry. It was too long for a comment !!!
A: New answer (Jun 6, 2022). About 9 and half years since my first solution, it suddenly dawned on me that I can compute this integral in another way:
Note that, for $0 < x < 1$,
$$ \frac{1}{1-x} + \frac{1}{\log x} = \int_{0}^{1} \frac{1-x^s}{1-x} \, \mathrm{d}s. $$
Plugging this to OP's integral and interchanging the order of integration, we get
\begin{align*}
I := \int_{0}^{1} \left( \frac{1}{1-x} + \frac{1}{\log x} \right)^2 \, \mathrm{d}x
&= \int_{0}^{1}\int_{0}^{1} \int_{0}^{1} \frac{1-x^s}{1-x} \cdot \frac{1-x^t}{1-x} \, \mathrm{d}x \, \mathrm{d}s \,\mathrm{d}t
\end{align*}
Let us study the innermost integral. Performing integration by parts,
\begin{align*}
&\int_{0}^{1} \frac{1-x^s}{1-x} \cdot \frac{1-x^t}{1-x} \, \mathrm{d}x \\
&= \underbrace{\left[ \frac{x}{1-x}(1-x^s)(1-x^t) \right]_{x=0}^{x=1}}_{=0} - \int_{0}^{1} \frac{(s+t)x^{s+t} - sx^s - tx^t}{1-x} \, \mathrm{d}x \\
&= (s+t)\psi_0(s+t+1) - s\psi_0(s+1) - t\psi_0(t+1), \tag{1}
\end{align*}
where $\psi_0(\cdot)$ is the digamma function and we utilized its integral representation in the last step. To make use of this formula, note that the change of variables $(x, y) = (s+t, s-t)$ yields
$$ \forall f \in C([0,2]) \ : \quad \int_{0}^{1}\int_{0}^{1} f(s+t) \, \mathrm{d}s\mathrm{d}t
= \int_{0}^{1} x[f(x) + f(2-x)] \, \mathrm{d}x. $$
Using this and by integrating both sides of $\text{(1)}$, we get
\begin{align*}
I
&= \int_{0}^{1} x \bigl[ x \psi(x+1) + (2-x)\psi(3-x) \bigr] \, \mathrm{d}x - 2 \int_{0}^{1} x \psi(x+1) \, \mathrm{d}x \\
&= \int_{0}^{1} x(2-x) \bigl[ \psi(3-x) - \psi(x+1) \bigr] \, \mathrm{d}u \\
&= \int_{0}^{1} x(2-x) \left[ \frac{1}{2-x} + \psi(2-x) - \psi(x+1) \right] \, \mathrm{d}u \\
&= \frac{1}{2} + 2 \int_{0}^{1} (1-x) \log ( \Gamma(2-x)\Gamma(x+1)) \, \mathrm{d}x \tag{int. by parts}
\end{align*}
By noting that $\log ( \Gamma(2-x)\Gamma(x+1))$ is symmetric about $x = \frac{1}{2}$ and using the reflection formula, this further reduces to
\begin{align*}
I
&= \frac{1}{2} + \int_{0}^{1} \log ( \Gamma(2-x)\Gamma(x+1)) \, \mathrm{d}x \tag{by symmetry} \\
&= \frac{1}{2} + \int_{0}^{1} \left( \log(1-x) + \log x + \log \pi - \log\sin(\pi x) \right) \, \mathrm{d}x \\
&= \bbox[color:navy;padding:5px;border:1px dotted navy;]{\log(2\pi) - \frac{3}{2}}
\end{align*}

Old answer (Jan 18, 2013). Here is an another approach using the principle of analytic continuation:
Let $I$ denote the integral. Applying the substitution $x = e^{-t}$, the integral is recast as
\begin{align*} I
&= \int_{0}^{\infty} \left\{ \frac{1}{(1-e^{-t})^{2}} - \frac{2}{t(1-e^{-t})} + \frac{1}{t^2} \right\} e^{-t} \, \mathrm{d}t \\
&= \int_{0}^{\infty} \left\{ \frac{e^{t}}{(e^{t} - 1)^{2}} - \frac{1}{t^2} \right\} \, \mathrm{d}t + \int_{0}^{\infty} \left\{ \frac{1 + e^{-t}}{t^2} - \frac{2}{t(e^{t}-1)} \right\} \, \mathrm{d}t.
\end{align*}
It is easy to observe that the first integral evaluates as
\begin{align*}
\int_{0}^{\infty} \left\{ \frac{e^{t}}{(e^{t} - 1)^{2}} - \frac{1}{t^2} \right\} \, \mathrm{d}t
&= \left[ \frac{1}{t} - \frac{1}{e^{t} - 1} \right]_{0}^{\infty}
= -\frac{1}{2}.
\end{align*}
We thus focus on the second integral. We do so by first introducing the regularized version
$$ F(s) := \int_{0}^{\infty} \left\{ \frac{1 + e^{-t}}{t^2} - \frac{2}{t(e^{t}-1)} \right\} e^{-st} \, \mathrm{d}t. $$
Differentiating $F(s)$ twice, we get
\begin{align*}F''(s)
&= \int_{0}^{\infty} \left\{ 1 + e^{-t} - \frac{2t}{(e^{t}-1)} \right\} e^{-st} \, \mathrm{d}t \\
&= \frac{1}{s} + \frac{1}{s+1} - 2\sum_{n=1}^{\infty} \frac{1}{(n+s)^2} \\
&= \frac{1}{s} + \frac{1}{s+1} - 2\psi'(s+1),
\end{align*}
where $\psi(\cdot)$ refers to the digamma function. Integrating both sides and utilizing the condition $F'(+\infty) = 0$ and the formula $\psi_0(s) = \log s + o(1)$ together, we get
$$ F'(s) = \log s + \log(s+1) - 2\psi_{0}(s+1). $$
Integrating both sides again, we have
$$ F(s) = s \log s + (s+1)\log(s+1) - 2s - 1 - 2\log\Gamma(s+1) + C. $$
To determine the constant $C$, we rearrange the terms as
$$ F(s) = \left\{ (s+1)\log\left(\frac{s+1}{s}\right) - 1 \right\} + 2\left\{ \left(s+\frac{1}{2}\right)\log s - s - \log\Gamma(s+1) \right\} + C. $$
Then by the Stirling's formula, we have
$$ 0 = F(+\infty) = -\log(2\pi) + C $$
and thus $C = \log (2\pi)$. Therefore
$$I
= -\frac{1}{2} + F(0) 
= \bbox[color:navy;padding:5px;border:1px dotted navy;]{\log(2\pi) - \frac{3}{2}}$$
as desired.
A: OK, I'm going to lay this out up to a sum, which will likely evaluate into whatever answer was provided above.  This integral is subject to the same sorts of tricks that I did for another integral involving a factor of $1/\log{x}$ in the integral.  The first piece is to let $x = e^{-y}$; the integral becomes
$$\int_0^{\infty} dy \: e^{-y} \left ( \frac{(e^{-y} - (1-y))^2}{y^2 (1-e^{-y})^2} \right ) $$
Now Taylor expand the factor $(1-e^{-y})^{-2}$, and if we can reverse the order of summation and integration, we get:
$$\sum_{k=1}^{\infty} k \int_0^{\infty} dy \:  \left ( \frac{(e^{-y} - (1-y))^2}{y^2} \right ) e^{- k y} $$
The integral inside the sum is a bit difficult, although it is convergent.  The way I see through it is to replace $k$ with a continuous parameter $\alpha$ and differentiate with respect to $\alpha$ inside the integral twice (to clear the pesky $y^2$ in the denominator) to get a function
$$ I(\alpha) = \int_0^{\infty} dy \:  \left ( \frac{(e^{-y} - (1-y))^2}{y^2} \right ) e^{- \alpha y} $$
$$\begin{align}
& \frac{\partial^2 I}{\partial \alpha^2} = \int_0^{\infty} dy \: (e^{-y} - (1-y))^2 e^{- \alpha y} \\
& = \frac{1}{\alpha+2} - \frac{2}{\alpha+1} + \frac{2}{(\alpha+1)^2} + \frac{1}{\alpha} - \frac{2}{\alpha^2} + \frac{2}{\alpha^3} \\
\end{align} $$
You integrate this twice to recover $I(\alpha)$; the constants of integration may be shown to vanish by considering the limit as $\alpha \rightarrow \infty$.  The original integral is then
$$\sum_{k=1}^{\infty} k \, I(k)$$
where
$$I(k) = (k+2) \log{ \left [ \frac{k (k+2)}{(k+1)^2} \right ] } + \frac{1}{k} $$
so the integral takes on the value
$$ \sum_{k=1}^{\infty} \left [ 1 + [(k+1)^2-1] \log \left ( 1-\frac{1}{(k+1)^2} \right ) \right ] $$
$$ = \sum_{k=1}^{\infty} \left [ 1 + (k+1)^2 \log \left ( 1-\frac{1}{(k+1)^2} \right ) \right ] + \log {2} $$
The sum may be simplified by Taylor expanding the $\log$ term; note that the unit value cancels and we get that the integral equals
$$ \log{2} + \sum_{k=2}^{\infty} \left [ 1 - k^2 \sum_{m=1}^{\infty} \frac{1}{m} \left ( \frac{1}{k^2} \right )^m \right ] $$
$$ = \log{2} - \sum_{m=1}^{\infty} \frac{1}{m+1} [\zeta{(2 m)}-1] $$
I have not yet evaluated this sum yet, but unless someone else does it before me, I will figure it out and come back.
