Closed form of integral over fractional part $\int_0^1 \left\{\frac{1}{2}\left(x+\frac{1}{x}\right)\right\}\,dx$

Recenly, several interesting questions have been posted asking for closed forms of integrals over the fractional part of certain functions. For me the story started with Evaluation of $\int_{0}^{1}\int_{0}^{1}\{\frac{1}{\,x}\}\{\frac{1}{x\,y}\}dx\,dy\,$ which after a long and instructive journey I could solve completely. Another example was symmetric double-integral on fractional part. These are examples of double integrals. There are as well many single integrals, and, as we can see below, the field of single integrals is by far not exhausted.

This time my result is given in the beginning and a proof is asked for.

Let $\{z\}$ be the fractional part of $z$. Prove that:

$$i := \int_0^1 \left\{\frac{1}{2}\left(x+\frac{1}{x}\right)\right\} = i_{s}$$

where

$$i_{s}=c_{g}-\frac{\gamma }{2}+\frac{3}{4}+\frac{\log (2)}{2} \simeq 0.28000699470709318696$$

Here $\gamma$ is the Euler-Mascheroni constant and

$$c_{g} = \int_0^{\infty } \frac{t-2 I_1(t)}{2 \left(e^t-1\right) t} \, dt \simeq -0.52795876312211303745$$

where

$I_{n}(t)$ is the modified Bessel function of the first kind.

$c_{g}$ is a (probably) new constant which appears in the asymptotic expansion of the sum

$$g(n) = \sum _{k=1}^n \sqrt{k^2-1}$$

• @ B. Mehta Please see my self answer. – Dr. Wolfgang Hintze Sep 5 '18 at 16:59

It is helpful to derive the asymptotic expansion of $g$ first. We can use the binomial series to find \begin{align} g(n) &= \sum \limits_{k=2}^n k \sqrt{1-k^{-2}} = \sum \limits_{k=2}^n k \sum \limits_{j=0}^\infty {1/2\choose j} (-k^{-2})^j \\ &= \frac{n(n+1)}{2} - 1 - \frac{H_n}{2} + \frac{1}{2} + \sum \limits_{j=2}^\infty {1/2\choose j} (-1)^j \sum \limits_{k=2}^n k^{1-2j} \end{align} with the harmonic numbers $H_n$. The monotone convergence theorem now yields the asymptotic equivalence $$g(n) \sim \frac{n(n+1)}{2} - \frac{H_n}{2} + c_g + \mathcal{o}(1)$$ as $n \to \infty$ . The constant term can be written as $$c_g = - \frac{1}{2} + \sum \limits_{j=2}^\infty {1/2\choose j} (-1)^j [\zeta(2j-1) - 1] = \sum \limits_{k=2}^\infty \left(\sqrt{k^2-1} - k + \frac{1}{2k}\right) \, ,$$ which agrees with the integral representation after using the series expansion of $I_1$.

In order to find $i$ we use the substitution $x = t - \sqrt{t^2-1}$ : \begin{align} i &= \int \limits_0^1 \left\{\frac{1}{2}\left(x+\frac{1}{x}\right)\right\} \, \mathrm{d} x = \int \limits_1^\infty \{t\} \left(\frac{t}{\sqrt{t^2-1}}-1\right) \, \mathrm{d} t \\ &= \sum \limits_{n=1}^\infty \int \limits_n^{n+1} (t-n) \left(\frac{t}{\sqrt{t^2-1}}-1\right) \, \mathrm{d} t \\ &= \frac{1}{2} \sum \limits_{n=1}^\infty \left[\ln\left(\sqrt{(n+1)^2-1}+n+1\right) - \ln\left(\sqrt{n^2-1}+n\right)\right. \\ &\phantom{= \frac{1}{2} \sum \limits_{n=1}^\infty\left[\right.} \left.- (n+1)\sqrt{(n+1)^2-1} + n \sqrt{n^2-1} + 2\sqrt{(n+1)^2 - 1} - 1 \right] \, . \end{align} The remaining series is (mostly) telescoping and we obtain \begin{align} i &= \frac{1}{2} \lim_{N \to \infty} \left[\ln\left(\sqrt{N^2-1} + N\right) - N \sqrt{N^2-1} + 2 g(N) - N + 1\right] \\ &= \frac{1}{2} \lim_{N \to \infty} \left[\ln\left(1+\sqrt{1-N^{-2}}\right) + \ln(N) - H_N + N \left(N+1 - \sqrt{N^2-1} - 1\right) + 2 c_g + 1\right] \\ &= \frac{1}{2} \left[\ln(2) - \gamma + \frac{1}{2} + 2 c_g + 1\right] \\ &= \frac{3}{4} + \frac{\ln(2)-\gamma}{2} + c_g \, . \end{align}

• @ ComplexYetTrivial Very interesting, specifically the part for g. Question: what is the monotone convergence theorem? – Dr. Wolfgang Hintze Sep 5 '18 at 22:45
• @Dr.WolfgangHintze The sign of the binomial coefficients ${1/2 \choose j}$ is $(-1)^{j-1}$ (for $j \geq 1$), so ${1/2 \choose j} (-1)^{j-1}$ is always positive. Therefore the sequence of functions $$\left(j \mapsto {1/2 \choose j} (-1)^{j-1} \sum \limits_{k=2}^n k^{1-2j}\right)_{n \in \mathbb{N}}$$ is monotonically increasing in $n$ and the monotone convergence theorem for series allows us to interchange limit and summation. – ComplexYetTrivial Sep 6 '18 at 7:26

$\newcommand{\bbx}{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\expo}{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}{\mathcal{#1}} \newcommand{\mrm}{\mathrm{#1}} \newcommand{\pars}{\left(\,{#1}\,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}{\left\vert\,{#1}\,\right\vert}$

An alternative:

\begin{align} &\bbox[10px,#ffd]{\ds{\int_{0}^{1}\braces{{1 \over 2}\pars{x + {1 \over x}}}\dd x}} \,\,\,\stackrel{x\ =\ 1 - t/\root{t^{2} - 1}}{=}\,\,\, \int_{\infty}^{1}\braces{t}\pars{1 - {t \over \root{t^{2} - 1}}}\dd t \\[5mm] & = \underbrace{\int_{1}^{\infty}\pars{{t^{2} \over \root{t^{2} - 1}} - t - {1 \over 2t}}\dd t}_{\ds{{1 \over 4} + {1 \over 2}\,\ln\pars{2}}} \\[2mm] + &\ \lim_{{\large N \to \infty} \atop {\large N\ \in\ \mathbb{N}}}\bracks{{1 \over 2}\,\ln\pars{N} - \int_{1}^{N}\left\lfloor{t}\right\rfloor \pars{{t \over \root{t^{2} - 1}} - 1}\dd t} \label{1}\tag{1} \end{align}

\begin{align} &\bbox[10px,#ffd]{\ds{\int_{1}^{N}\left\lfloor{t}\right\rfloor \pars{{t \over \root{t^{2} - 1}} - 1}\dd t}} = \sum_{k = 1}^{N - 1}\int_{k}^{k + 1}k\pars{{t \over \root{t^{2} - 1}} - 1}\dd t \\[5mm] = &\ \sum_{k = 1}^{N - 1}k\pars{\root{k^{2} + 2k} - \root{k^{2} - 1} - 1} \\[5mm] = &\ \sum_{k = 1}^{N - 1}k\pars{{ 2k + 1\over \root{k^{2} + 2k} + \root{k^{2} - 1}} - 1 - {1 \over 2k^{2}}} + {1 \over 2} \overbrace{\bracks{\sum_{k = 1}^{N - 1}{1 \over k} - \ln\pars{N - 1}}} ^{\ds{\stackrel{\mrm{as}\ N\ \to\ \infty}{\LARGE\to}\gamma}} \\[2mm] + &\ {1 \over 2}\,\ln\pars{N - 1}\label{2}\tag{2} \end{align}

\eqref{1} and \eqref{2} lead to $\ds{\pars{~\mbox{as}\ N \to \infty~}}$:

\begin{align} &\bbox[10px,#ffd]{\ds{\int_{0}^{1}\braces{{1 \over 2}\pars{x + {1 \over x}}}\dd x}} \\[5mm] = &\ {1 \over 4} + {1 \over 2}\,\ln\pars{2} - {1 \over 2}\,\gamma\ -\ \underbrace{\sum_{k = 1}^{\infty}\pars{{2k^{2} + k \over \root{k^{2} + 2k} + \root{k^{2} - 1}} - k - {1 \over 2k}}}_{\ds{\approx 0.0279588}} \\[5mm] \approx &\ \bbx{0.2800070} \end{align}

Proofs of the identity of the OP have already been given in answers.

However, it might be interesting so see the calculation which led me to the result which I didn't know in advance.

Part 1: Transformation of integral into a series

Substituting $x\to z-\sqrt{z^2-1}$ the integral becomes

$$i = \int_{1}^\infty \{z\}( \frac{z}{\sqrt{z^2-1}}-1)\,dx\tag{1}$$

Splitting the integral into the intervals $(k,k+1)$, $k=1,2,3,...$ we get

$$i= i_{s} := \lim_{n\to\infty} i_{s}(n) \tag{2a}$$

$$i_{s}(n):= \sum_{k=1}^n a(k)\tag{2b}$$

Letting $z = k + \xi$ we have $\{z\} = \xi$ and the summands become

$$a(k):=\int_0^1 \xi \left(\frac{k+\xi }{\sqrt{(k+\xi )^2-1}}-1\right)\,d\xi \\=\frac{1}{2} \left(k \sqrt{k^2-1}-(k+1) \sqrt{(k+1)^2-1}\right)+\frac{1}{2} \left(\log \left(k+\sqrt{(k+1)^2-1}+1\right)-\log \left(\sqrt{k^2-1}+k\right)\right)+(\sqrt{(k+1)^2-1}-\frac{1}{2})\tag{3}$$

Summing up from $k=1$ to $k=n$ the first two brackets telescope and one sum is left:

$$i_{s}(n) = p(n) + g(n)\tag{4a}$$

where

$$p(n)=\frac{1}{2} \left(-(n-1)\sqrt{(n+1)^2-1} -n+\log \left(n+\sqrt{n (n+2)}+1\right)\right)\tag{4b}$$

$$g(n) = \sum _{k=2}^n \sqrt{k^2-1}\tag{5}$$

where in $g$ we have omitted the summand with $k=1$ without altering the sum.

Part 2: asymptotics of $g(n)$

This is the tough part. In order to perform the limit (2a) we need the asymptotic behaviour of the terms in (4). We have to focus on $g(n)$ since the asymptotics of the other terms is simple to obtain.

Writing

$$\sqrt{k^2-1} = k \sqrt{1-\frac{1}{k^2}} = \sum _{m=0}^{\infty } (-1)^m \binom {\frac{1}{2}}{m}\frac{1}{k^{2 m-1}}\tag{6}$$

Performing the $k$-sum, according to $\sum _{k=2}^n 1/k^{2 m-1}=-1+H_n^{(2 m-1)}$ we get

$$g(n) = \sum _{m=0}^{\infty } (-1)^m \binom {\frac{1}{2}}{m}(-1+H_n^{(2 m-1)})\tag{7}$$

Notice that (7) is an exact formula. Now we can take the asymptotic limit (with respect to n) under the $m$-sum using the well-known asymptotics of $H_{n}^{(k)}$ leading to

$$H_n^{(2 m-1)}-1 \simeq h_0 +h_1 + h_2 \tag{8a}$$

$$h_0=-1, h_1=-\frac{1}{6} m n^{-2 m}+\frac{n^{-2 m}}{12}+\frac{1}{2} n^{1-2 m}-\frac{n^{2-2 m}}{2 m-2}, h_2 = \zeta (2 m-1)\tag{8b}$$

We now insert this into (7) and proceed carefully with the terms and the index $m$. We collect the contributions in $g_i(n)$.

The m-sum over $h_0$ gives $g_0 = 0$.

For the sum $(h_1+h_2)$ we consider first the two summands $m=0$ and $m=1$ separately

$$g_{1}(n) =\lim_{m\to 0}{ (-1)^m \binom {\frac{1}{2}}{m}(h_1+h_2 )}= \frac{n^2}{2}+\frac{n}{2}$$

$$g_{2}(n) =\lim_{m\to 1}{ (-1)^m \binom {\frac{1}{2}}{m}(h_1+h_2 )}= \frac{1}{24 n^2}-\frac{1}{4 n}-\frac{\log (n)}{2}-\frac{\gamma }{2}$$

Notice that for $m\to 1$ we had to keep the sum $(h_1+h_2)$ so that the pole in $\zeta$ at $m=1$ can compete with the other term with a pole.

The rest of the $m$-sum from $m=2$ is considered separately for $h_1$ and $h_2$.

For $h_1$ we could do the complete sum (Mathematica gives a lengthy expression including a hypergeometric function) but up to order $1/n^3$ we need only the term with $m=2$. This gives

$$g_{3}(n) =\lim_{m\to 2}{ (-1)^m \binom {\frac{1}{2}}{m}(h_1 )}= \frac{1}{16 n^2}-\frac{1}{16 n^3}$$

For $h_2$ the complete sum reads

$$g_{4}(n) =\sum_{m=2}^\infty (-1)^m \binom {\frac{1}{2}}{m}\zeta({2m-1})$$

Making use of the well-known integral representation of the $\zeta$-function

$$\zeta (2 m-1)=\int_0^{\infty } \frac{t^{2 m-2}}{\left(e^t-1\right) \Gamma (2 m-1)} \, dt\tag{9}$$

we can do the sum under the integral for which Mathematica gives the result

$$\sum _{m=2}^{\infty } \frac{(-1)^m \binom{\frac{1}{2}}{m} t^{2 m-2}}{\left(e^t-1\right) \Gamma (2 m-1)}= \frac{t-2 I_1(t)}{2 \left(e^t-1\right) t}\tag{10}$$

This gives $g_4(n)$ = $c_{g}$.

Hence we find for the asymptotic behaviour of $g(n)$

$$g_a(n) = g_1+g_2+g_3+g_4 \\ = c_{g}-\frac{1}{16 n^3}+\frac{n^2}{2}+\frac{5}{48 n^2}+\frac{n}{2}-\frac{1}{4 n}-\frac{\log (n)}{2}-\frac{\gamma }{2}\tag{11}$$

Part 3: harvest and final result

To obtain the complete asymptotic Expression according to (4) we need the asymptotics of $p(n)$ which is, however, easily calculated with the result

$$p_a(n) = -\frac{n^2}{2}+\frac{3}{16 n^2}-\frac{n}{2}+\frac{\log (n)}{2}+\frac{3}{4}+\frac{\log (2)}{2}\tag{12}$$

Adding $p_a(n)$ and $g_a(n)$ the leading terms and the $\log$-terms cancel. Finally, taking the $\lim_{n\to\infty}$ gives

$$i_{s} = c_{g}-\frac{\gamma }{2}+\frac{3}{4}+\frac{\log (2)}{2}\tag{13}$$

which is the result of the OP.

Remark: the simplicity of the final expression surprised me: just a simple fraction, $\log(2)$, and $\gamma$, but at least $c_g$ is a non-trivial quantity which most probably is a new constant.