How to calculate $\int_{0}^{\pi/2}{\{\tan(x)\}dx}$

How to calculate $$\int_{0}^{\pi/2}{\{\tan(x)\}dx}$$ where $\{x\}$ means the fractional part of $x$.
I mentioned the zero points of $\{\tan(x)\}$. $\{\tan(x)\}$ equals to 0 iff $x=\arctan(k)$, $k$ is an integer.
I tried to separate it into$$\sum_{k=0}^{\infty}{\int_{\arctan(k)}^{\arctan(k+1)}{(\tan(x)}-k)dx}$$ Then I found it hard to continue.
I don't think I am on the right way.


Solution 1:

Through straightforward substitutions the computation of the original integral boils down to the computation of $$ \sum_{n\geq 1}\left(\frac{1}{n}-\arctan\frac{1}{n}\right)=\sum_{n\geq 1}\sum_{m\geq 1}\frac{(-1)^{m+1}}{(2m+1)n^{2m+1}}=\sum_{m\geq 1}\frac{(-1)^{m+1}}{2m+1}\zeta(2m+1) $$ which due to $\zeta(2m+1)=\frac{1}{(2m)!}\int_{0}^{+\infty}\frac{x^{2m}}{e^x-1}\,dx$ can be written as $$ \int_{0}^{+\infty}\frac{x-\sin x}{x(e^x-1)}\,dx.$$ This integral is simple to approximate numerically and it is related to $\log\Gamma(1\pm i)$ via $$ \log\Gamma(1+z)=-\gamma z+\int_{0}^{+\infty}\frac{e^{-zt}-1+zt}{t(e^t-1)}\,dt.$$ We have $$ \int_{0}^{\pi/2}\left\{\tan x\right\}\,dx = 1+\text{Arg}\,\Gamma(1+i).$$