Trigonometric integral involving the fractional part function I have tried the $u$ substitution yet I could not move forwards on this problem. Could you calculate in closed-form this integral?
$$\int_{0}^{\pi/2}\bigg\{\csc(x)\bigg\}\mathrm{dx}$$
 A: Enforcing the substitution $x\mapsto \arcsin(x)$ followed by $x\mapsto 1/x$ we see that 
$$\begin{align}
\int_0^{\pi/2} \bigg\{\frac{1}{\sin(x)}\bigg\}\,dx&=\int_0^1 \bigg\{\frac1x\bigg\}\frac1{\sqrt{1-x^2}}\,dx\\\\
&=\int_1^\infty \{x\} \frac{1}{x\sqrt{x^2-1}}\,dx\\\\
&=\int_1^\infty \frac{x-\lfloor x\rfloor}{x\sqrt{x^2-1}}\,dx\\\\
&=\sum_{k=1}^\infty \int_{k}^{k+1}\frac{x-\lfloor x\rfloor}{x\sqrt{x^2-1}}\,dx\\\\
&=\sum_{k=1}^\infty \int_{k}^{k+1} \frac{x-k}{x\sqrt{x^2-1}}\,dx\tag1
\end{align}$$
Now, the integral under the summation sign on the right-hand side of $(1)$ can be evaluated in the closed form as
$$\begin{align}
\int_{k}^{k+1} \frac{x-k}{x\sqrt{x^2-1}}\,dx&=(k+1)\arctan\left(\frac1{\sqrt{(k+1)^2-1}}\right)-k\arctan\left(\frac1{\sqrt{k^2-1}}\right)\\\\
&-\arctan\left(\frac1{\sqrt{(k+1)^2-1}}\right)\\\\
&+\log(\sqrt{(k+1)^2-1}+(k+1))-\log(\sqrt{k^2-1}+k)
\end{align}\tag2$$
We can easily evaluate the telescoping series
$$\sum_{k=1}^\infty (k+1)\arctan\left(\frac1{\sqrt{(k+1)^2-1}}\right)-k\arctan\left(\frac1{\sqrt{k^2-1}}\right)=1-\frac\pi2\tag3$$
We can also write the sum $S$ where 
$$S=\sum_{k=1}^\infty \left(\log(\sqrt{(k+1)^2-1}+(k+1))-\log(\sqrt{k^2-1}+k)
-\arctan\left(\frac1{\sqrt{(k+1)^2-1}}\right)\right)$$
as 
$$\begin{align}
S&=\lim_{K\to\infty}\left(\log(K+\sqrt{K^2-1})-\sum_{k=2}^K \arctan\left(\frac1{\sqrt{k^2-1}}\right)\right)\\\\
&=\log(2)+\lim_{K\to\infty}\left(\log(K)-\sum_{k=2}^K \arctan\left(\frac1{\sqrt{k^2-1}}\right)\right)\\\\
&=1+\log(2) -\gamma +\sum_{k=2}^\infty \left(\frac1k-\arctan\left(\frac1{\sqrt{k^2-1}}\right)\right)\tag4
\end{align}$$
Putting $(1)$-$(4)$ together, we find that 
$$\int_0^{\pi/2} \bigg\{\frac{1}{\sin(x)}\bigg\}\,dx=2+\log(2)-\frac\pi2-\gamma-\sum_{k=2}^\infty \left(\frac1k-\arctan\left(\frac1{\sqrt{k^2-1}}\right)\right)\tag5$$
The series in $(5)$ converges quickly with 
$$\sum_{k=2}^\infty \left(\frac1k-\arctan\left(\frac1{\sqrt{k^2-1}}\right)\right)\approx  -0.0368911$$
Hence, 
$$\int_0^{\pi/2} \bigg\{\frac{1}{\sin(x)}\bigg\}\,dx\approx 0.5082441$$
