TITLE: Is there other methods to evaluate $\int_1^{\infty}\frac{\{x\}-\frac{1}{2}}{x}\ \mathrm dx$?
QUESTION [29 upvotes]: $$\displaystyle\int_1^{\infty}\frac{\{x\}-\frac{1}{2}}{x}\ \mathrm dx$$
where $\{x\}$ denotes the fractional part of x (for example- $\{3.141\}=0.141)$ 
I'm looking for alternative methods (maybe also ones  which  are shorter) to what I already know (method I have used below), to Evaluate this.

The only method I know:
$$\ln(n!)=\sum_{k=2}^{n} \ln k$$
$$\ln(n!)=\sum_{k=2}^{n} \color{brown}{\int_1^k \frac{dx}{x}}$$

Since: $$\color{brown}{\int_1^k \frac{dx}{x}}=\sum_{j=1}^{k-1} \int_j^{j+1} \frac{dx}{x}$$

$$\ln(n!)=\sum_{k=2}^{n} {\Bigg\{\sum_{j=1}^{k-1} \int_j^{j+1} \frac{dx}{x}}\Bigg\}$$
$$\ln(n!)=(n-1)\int_1^2 \frac{dx}{x}+(n-2)\int_2^3 \frac{dx}{x}+\cdots+\int_{n-1}^n \frac{dx}{x}$$
$$ln(n!)=\int_1^2 \frac{(n-1) dx}{x}+\int_2^3 \frac{(n-2)dx}{x}+\cdots+\int_{n-1}^n \frac{dx}{x}$$
The general form of the terms in the last summation is, with $1\leq j\leq n-1$
$$\int_j^{j+1} \frac{(n-j)}{x}dx=\int_j^{j+1} \frac{(n-[x])}{x} dx$$
where the notation $[x]$ means the integer part of $x$
because, for the integration interval $j\leq x <j+1$
$$\ln(n!)=\int_1^n \frac{n-[x]}{x} dx$$

Now :
$$x=[x]+\{x\}\implies[x]=x-\{x\}$$
$$\Large{\color{orange}{\ln(n!)}} = \int_1^n \frac{n-x+\{x\}}{x}dx=n\ln(n)-n+1+\int_1^n \frac{\{x\}}{x}dx$$
$$=n\ln(n)-n+1+\frac{1}{2}\ln(n)+\int_1^n \frac{\{x\}-\frac{1}{2}}{x}dx$$
$$\left(n+\frac{1}{2}\right)\ln(n)-n+1+\int_1^n \frac{\{x\}-\frac{1}{2}}{x} dx$$
$$=\ln\left(n^{n+\frac{1}{2}}\right)+\ln(e^{-n})+1+\int_1^n \frac{\{x\}-\frac{1}{2}}{x} dx$$
$$=\ln\left(e^{-n}n^{n+\frac{1}{2}}\right)+\ln\left(e^{1+\int_1^n \frac{\{x\}-\frac{1}{2}}{x}dx}\right)$$
$$=\color{crimson}{\Large{\ln\left(e^{-n}n^{n+\frac{1}{2}}e^{1+\int_1^n \frac{\{x\}-\frac{1}{2}}{x}dx}\right)}}$$

$$\Large{\color{orange}{n!}=\color{Crimson}{e^{-n}n^{n+\frac{1}{2}}e^{1+\int_1^n \frac{\{x\}-\frac{1}{2}}{x}dx}}}$$
$$\Large{e^{1+\int_1^n \frac{\{x\}-\frac{1}{2}}{x}dx}=\frac{n!}{e^{-n}n^{n+\frac{1}{2}}}}$$
If we let $n\to \infty$ And using Stirling's formula, we have:
$$\Large{e^{1+\int_1^{\infty} \frac{\{x\}-\frac{1}{2}}{x}dx}}=\sqrt{2\pi}$$
Thus, 
$$1+\int_1^{\infty} \frac{\{x\}-\frac{1}{2}}{x}dx=\ln(\sqrt{2\pi})$$
$$\bbox[8pt,border:2px #0099FF solid]{\int_1^{\infty}\frac{\{x\}-\frac{1}{2}}{x} dx=-1+\ln(\sqrt{2\pi})}$$

REPLY [9 votes]: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,{\rm Li}_{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
A 'nice byproduct' of the following evaluation is the identity:
$$
\color{#66f}{\large%
\int_{1}^{\infty}{\braces{x} - 1/2 \over x}\,\dd x}
=\color{#66f}{\large\int_{0}^{1}\ln\pars{\Gamma\pars{x + 1}}\,\dd x}
$$

\begin{align}&\color{#66f}{\large%
\int_{1}^{\infty}{\braces{x} - 1/2 \over x}\,\dd x}
=\int_{1}^{\infty}{x - \floor{x} - 1/2 \over x}\,\dd x
\\[5mm]&=\int_{1}^{2}{x - 1 - 1/2 \over x}\,\dd x
+\int_{2}^{3}{x - 2 - 1/2 \over x}\,\dd x + \cdots
\\[5mm]&=\int_{0}^{1}{x  - 1/2 \over x + 1}\,\dd x
+\int_{0}^{1}{x - 1/2 \over x + 2}\,\dd x + \cdots
=\lim_{N\ \to\ \infty}\int_{0}^{1}
\sum_{n\ =\ 0}^{N}{x - 1/2 \over x + n + 1}\,\dd x
\\[5mm]&=\lim_{N\ \to\ \infty}\int_{0}^{1}\pars{x - \half}
\sum_{n\ =\ 0}^{\infty}\pars{{1 \over n + x + 1} - {1 \over n + x + N + 2}}\,\dd x
\\[5mm]&=\lim_{N\ \to\ \infty}\int_{0}^{1}\pars{x - \half}\bracks{%
\Psi\pars{x + N + 2} - \Psi\pars{x + 1}}\,\dd x
\end{align}
  where $\ds{\Psi\pars{z} \equiv \totald{\ln\pars{\Gamma\pars{z}}}{z}}$ is the Digamma Function .

Then,
\begin{align}&\color{#66f}{\large%
\int_{1}^{\infty}{\braces{x} - 1/2 \over x}\,\dd x}
=\lim_{N\ \to\ \infty}\int_{0}^{1}\pars{x - \half}
\bracks{\ln\pars{x + N + 2} - \Psi\pars{x + 1}}\,\dd x
\\[5mm]&=\ \overbrace{%
\lim_{N\ \to\ \infty}\int_{0}^{1}\pars{x - \half}\ln\pars{x + N + 2}\,\dd x}
^{\ds{=}\ \dsc{0}}\ -\
\int_{0}^{1}\pars{x - \half}\,\totald{\ln\pars{\Gamma\pars{x + 1}}}{x}\,\dd x
\\[5mm]&=-\left.\ln\pars{\Gamma\pars{x + 1}}\pars{x - \half}
\right\vert_{x\ =\ 0}^{x\ =\ 1}
+\int_{0}^{1}\ln\pars{\Gamma\pars{x + 1}}\,\dd x
\\[5mm]&=\underbrace{%
-\ln\pars{\Gamma\pars{2}}\half + \ln\pars{\Gamma\pars{1}}\pars{-\,\half}}
_{\ds{=}\ \dsc{0}}\ +\
\int_{0}^{1}\ln\pars{\Gamma\pars{x + 1}}\,\dd x
\end{align}

$$
\color{#66f}{\large%
\int_{1}^{\infty}{\braces{x} - 1/2 \over x}\,\dd x}
=\color{#66f}{\large\int_{0}^{1}\ln\pars{\Gamma\pars{x + 1}}\,\dd x}
$$

However,
\begin{align}
\int_{0}^{1}\ln\pars{\Gamma\pars{x + 1}}\,\dd x&
=\int_{0}^{1}\ln\pars{x}\,\dd x
+\int_{0}^{1}\ln\pars{\Gamma\pars{x}}\,\dd x
=-1+\int_{0}^{1}\ln\pars{\Gamma\pars{1 - x}}\,\dd x
\\[5mm]&=-1+\int_{0}^{1}\ln\pars{\pi \over \sin\pars{\pi x}\Gamma\pars{x}}\,\dd x
\\[5mm]&=-1 + \ln\pars{\pi}
-{1 \over\pi}\ \underbrace{\int_{0}^{\pi}\ln\pars{\sin\pars{x}}\,\dd x}
_{\ds{=}\ \dsc{-\pi\ln\pars{2}}}
-\int_{0}^{1}\ln\pars{\Gamma\pars{x}}\,\dd x
\\[5mm]&=\ln\pars{2\pi} - 2 - \int_{0}^{1}\ln\pars{\Gamma\pars{x + 1}}\,\dd x
\end{align}

The integral $\ds{\int_{0}^{\pi}\ln\pars{\sin\pars{x}}\,\dd x=-\pi\ln\pars{2}}$
  appears frequently in M.SE .

Finally,
$$
\color{#66f}{\large%
\int_{1}^{\infty}{\braces{x} - 1/2 \over x}\,\dd x}
=\color{#66f}{\large\half\,\ln\pars{2\pi} - 1}
$$