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

Solution 1:

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}

Solution 2:

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