I was trying to see if I could find an alternate solution to the below problem (just playing around, not getting ambitious). I came at some point which I thought was interesting - so thought of posting this in order to check if the approach is correct and if there are any ideas to take this forward.
\begin{equation} \int_{0}^{pi/2} \{\tan {x}\} dx =\int_{0}^{\arctan {1}} (\tan {x} -0) dx +\int_{\arctan {1}}^{\arctan {2}} (\tan {x} -1) dx +\int_{\arctan {2}}^{\arctan {3}} (\tan {x} -2) dx............+\int_{\arctan {n}}^{\arctan {n+1}} (\tan {x} -n) dx = \sum_{n=0}^{\infty} {\int_{\arctan {n}}^{\arctan {n+1}}(\tan {x} -n) dx}= \sum_{n=0}^{\infty} {\int_{n}^{{n+1}}\frac{y-n}{y^2+1} dy}\space(by\space substituting\space y=\tan{x}) =\sum_{n=0}^{\infty} {\int_{0}^{{1}}\frac{z}{(z+n)^2+1} dz}\space(by\space substituting\space y-n=z) = {\int_{0}^{{1}}z\sum_{n=0}^{\infty}\frac{1}{(z+n)^2+1} dz} \end{equation}
Now the question is whether there is any way of evaluating \begin{equation}\sum_{n=0}^{\infty}\frac{1}{(z+n)^2+1}\end{equation} as a function of z.
If you enjoy the digamma function, after using partial fraction decomposition$$\sum_{n=0}^{p}\frac{1}{(z+n)^2+1}=\sum_{n=0}^{p}\frac{1}{(z+n+-i) (z+n+i)}=$$ $$\frac i 2\left(\sum_{n=0}^{p}\frac{1}{ (z+n+i)} -\sum_{n=0}^{p}\frac{1}{ (z+n-i)}\right)$$ $$\sum_{n=0}^{p}\frac{1}{ (z+n+i)}=\psi (z+p+(1+i))-\psi (z+i)$$ $$\sum_{n=0}^{p}\frac{1}{ (z+n-i)}=\psi (p+z+(1-i))-\psi (z-i)$$ and we can use harmonic numbers $$\sum_{n=0}^{p}\frac{1}{ (z+n+i)} -\sum_{n=0}^{p}\frac{1}{ (z+n-i)}=-H_{p+z-i}+H_{p+z+i}+H_{z-(1+i)}-H_{z-(1-i)}$$ Using asymptotics $$\sum_{n=0}^{p}\frac{1}{ (z+n+i)} -\sum_{n=0}^{p}\frac{1}{ (z+n-i)}=\left(H_{z-(1+i)}-H_{z-(1-i)}\right)+O\left(\frac{1}{p}\right)$$