[Math] Improper Integral $\int_0^1\left(\left\{\frac1x\right\}-\frac12\right)\frac{\log(x)}xdx$

calculusclosed-formdefinite integralsintegrationsequences-and-series

My initial question was to find if this integral
$$ \int_0^1 \left(\left\{\frac 1x\right\}-\frac12\right)\frac{\log(x)}{x}dx$$ is convergent or divergent. ($\left\{\frac 1x\right\}$ is the fractional part of $\frac 1x$ ).

My try :: \begin{align}\int_0^1\left(\left\{\frac 1x\right\}-\frac 12\right)\frac{\log(x)}{x} dx & =-\int_1^\infty (\left\{y\right\}-1/2)\frac{\log(y)}{y} dy \\ & = \sum_{m=1}^{\infty} \int_{m}^{m+1} (\left\{y\right\}-1/2)\frac{\log(y)}{y} dx \\ & = \frac14\sum_{m=1}^{\infty} \left(\log^2 (m+1)+\log^2(m)-2\int_0^1\log^2(x+m)
dx \right) \\ &= … \end{align}
Finally the integral is convergent since the series obtained is convergent. The curious thing is that Mathematica returns $0.\times 10^{-2}$ by numerical integration.

Then my question is: Is this integral equal to zero?

Thank you for your help.

Best Answer

This integral is not equal to zero.

We may obtain the following closed form.

$$ \begin{align} \int_0^1 \left(\left\{\frac{1}{x}\right\}-\frac{1}{2}\right)\frac{\log(x)}{x} \mathrm{d}x & = \dfrac{\ln^2(2\pi)}{4}-\dfrac{\gamma^2}{4}+\dfrac{\pi^2}{48}-\dfrac{\gamma_1}{2}-1\tag1 \\\\ \end{align} $$

where $\left\{x\right\}$ denotes the fractional part of $x$, $\gamma$ denotes the Euler–Mascheroni constant and where $\gamma_{1}$ denotes the Stieltjes constant defined by $$ \gamma_{1} = \lim_{N \rightarrow \infty}\left(\sum_{k=1}^{N}\frac{\ln k}{k}-\frac{\ln^{2}N}{2} \right). $$ Consequently, we have the numerical evaluation:

$$ \begin{align} \int_0^1 \left(\left\{\frac{1}{x}\right\}-\frac{1}{2}\right)\frac{\log(x)}{x} \mathrm{d}x = \color{red}{0.00}31782279542924256050500... . \tag2 \end{align} $$

Here is an approach.

Step 1. Let $s$ be a complex number such that $0<\Re{s}<1$. Then $$ \int_{0}^{1} x^{s-1}\left\{\frac{1}{x}\right\}\mathrm{d}x = -\frac{1}{1-s} -\frac{\zeta(s)}{s}\tag3 $$ where $\left\{x\right\}$ denotes the fractional part of $x$ and where $\zeta$ denotes the Riemann zeta function.

Proof. Let us assume that $0<\Re{s}<1$. We may write $$ \begin{align} \int_{0}^{1} x^{s-1}\left\{\frac{1}{x}\right\}\mathrm{d}x & = \sum_{k=1}^{\infty} \int_{1/(k+1)}^{1/k} x^{s-1}\left\{\frac{1}{x}\right\}\mathrm{d}x \\ & = \sum_{k=1}^{\infty} \int_{k}^{k+1} \left\{x\right\} \frac{\mathrm{d}x}{x^{s+1}} \\ & = \sum_{k=1}^{\infty} \int_{k}^{k+1} (x-k) \frac{\mathrm{d}x}{x^{s+1}} \\ & = \sum_{k=1}^{\infty} \int_{0}^{1}\frac{v}{(v+k)^{s+1}}\mathrm{d}v \\ & = \sum_{k=1}^{\infty} \int_{0}^{1}\left(\frac{1}{(v+k)^{s}}-\frac{k}{(v+k)^{s+1}}\right)\mathrm{d}v \\ & = \sum_{k=1}^{\infty} \left.\left(\frac{1}{(-s+1)(v+k)^{s-1}} +\frac{k}{s(v+k)^s}\right) \right|_{0}^{1} \\ & = -\frac{1}{1-s}-\frac{\zeta(s)}{s}. \end{align} $$

Step 2. We have $$ \int_{0}^{1} x^{s-1}\left(\left\{\frac{1}{x}\right\}-\frac{1}{2}\right)\log(x)\mathrm{d}x = -\frac{1}{(1-s)^2} +\frac{1}{2s^2} +\frac{\zeta(s)}{s^2} -\frac{\zeta'(s)}{s}. \tag4 $$ Using $(3)$, we readily get $$ \int_{0}^{1} x^{s-1}\left(\left\{\frac{1}{x}\right\}-\frac{1}{2}\right)\mathrm{d}x = -\frac{1}{1-s}-\frac{1}{2s} -\frac{\zeta(s)}{s} $$ which we differentiate with respect to $s$ to obtain $(4)$.

Step 3. For $s$ near $0$, we take into account the Taylor series expansion of the Riemann $\zeta$ function: $$ \begin{align} & \zeta(s) =-\frac12-\dfrac{\ln(2\pi)}{2} s +\left(\dfrac{\gamma^2}{4}-\dfrac{\pi^2}{48}+\ln(2\pi)-\dfrac{\ln^2(2\pi)}{4}+\dfrac{\gamma_1}{2}\right)s^2+\mathcal{O}(s^3) \\& \zeta'(s) =-\dfrac{\ln(2\pi)}{2} +\left(\dfrac{\gamma^2}{2}-\dfrac{\pi^2}{24}+2\ln(2\pi)-\dfrac{\ln^2(2\pi)}{2}+\gamma_1\right)s+\mathcal{O}(s^2) \end{align} $$ and upon letting $s$ tend to $0^+$ in $(4)$ we obtain $(1)$.


Remark: A related result to $(3)$.