Closed form of $\int_{\frac{\pi}{4}}^{\frac{3\pi}{4}}\frac{\lfloor|\tan x|\rfloor}{|\tan x|}dx$? I am trying to find a closed form for the integral $$I=\int_{\frac{\pi}{4}}^{\frac{3\pi}{4}}\frac{\lfloor|\tan x|\rfloor}{|\tan x|}dx$$ So far, my reasoning is thus: write, by symmetry through $x=\pi/2$, $$I=2\sum_{n=1}^{\infty}n\int_{\arctan n}^{\arctan (n+1)}\frac{dx}{|\tan x|}=2\sum_{n=1}^{\infty}n\ln\frac{\sin\arctan(n+1)}{\sin\arctan n}$$
Using $\sin{\arctan {x}}=\frac{x}{\sqrt{1+x^{2}}}$, we get: $$I=2\sum_{n=1}^{\infty}n\ln(\frac{(n+1)\sqrt{1+n^2}}{n\sqrt{1+(n+1)^2}})=\sum_{n=1}^{\infty}n\ln\frac{(n+1)^2(1+n^2)}{n^2(1+(n+1)^2)}=\sum_{n=1}^{\infty}n\ln(1+\frac{2n+1}{n^2(n+1)^2})$$ Expanding the logarithm into an infinite series we get $$I=\sum_{n=1}^{\infty}\sum_{m=1}^{\infty}\frac{(-1)^{m+1}(2n+1)^m}{mn^{2m-1}(n+1)^{2m}}$$ Here I am a bit stuck.. Does anyone have any suggestions to go further?
Thank you.
EDIT:
keeping in mind the nice answer below, applying summation by parts to $$I_N=2\sum_{n=1}^{N}n\ln\frac{\sin\arctan(n+1)}{\sin\arctan n}=2\sum_{n=1}^{N}n(\ln\sin\arctan(n+1)-\ln\sin\arctan n)$$ gives $$I_N=2((N+1)\ln\sin\arctan(N+1)+\frac{\ln 2}{2}-\sum_{n=1}^{N}\ln\sin\arctan(n+1))$$ hence: $$I-\ln2=-\sum_{n=2}^{\infty}\ln\frac{n^2}{1+n^2}=\sum_{n=2}^{\infty}\ln\frac{1+n^2}{n^2}=\sum_{n=2}^\infty\sum_{m=1}^\infty\frac{(-1)^{m+1}}{mn^{2m}}=  \sum_{m=1}^\infty\frac{(-1)^{m+1}}{m}\sum_{n=2}^\infty n^{-2m}=\sum_{m=1}^\infty\frac{(-1)^{m+1}(\zeta(2m)-1)}{m}$$
 Is this valid and helpful?  
EDIT 2: Coming back to $$\sum_{n=2}^{\infty}\ln(1+\frac{1}{n^2})=\ln(\prod_{n=2}^{\infty}(1+\frac{1}{n^2}))=\ln(\prod_{n=2}^{\infty}(1-\frac{i^2}{n^2}))=\ln(\prod_{n=1}^{\infty}(1-\frac{i^2}{n^2}))-\ln2$$
$$=\ln(\frac{\sin(i\pi)}{i\pi})-\ln2=\ln\frac{\sinh\pi}{\pi}-\ln2$$ hence $I=\ln\frac{\sinh\pi}{\pi}$ 

Maybe we are lucky. We may notice that:
$$ 1+\frac{2n+1}{n^2(n+1)^2} = 1+\frac{1}{n^2}-\frac{1}{(n+1)^2} $$
and the roots of the polynomial $x^2(x+1)^2+2x+1$ are given by
$$ \alpha = \frac{1}{2}\left(-1-\sqrt{2}-\sqrt{2\sqrt{2}-1}\right), $$
$$ \beta = \frac{1}{2}\left(-1-\sqrt{2}+\sqrt{2\sqrt{2}-1}\right), $$
$$ \gamma = \frac{1}{2}\left(-1+\sqrt{2}-i\sqrt{2\sqrt{2}+1}\right), $$
$$ \delta = \frac{1}{2}\left(-1+\sqrt{2}+i\sqrt{2\sqrt{2}+1}\right), $$
so:
$$ \sum_{n=1}^{N}\log\left(1+\frac{2n+1}{n^2(n+1)^2}\right)=\log\prod_{n=1}^{N}\frac{(n-\alpha)(n-\beta)(n-\gamma)(n-\delta)}{n^2(n+1)^2}$$
can be written in terms of:
$$ \log\prod_{n=1}^{N}\frac{n-\alpha}{n} = \log\frac{\Gamma(N+1-\alpha)}{\Gamma(N+1)\Gamma(1-\alpha)} $$
and through summation by parts the problem boils down to computing:

$$ \sum_{N\geq 1}\log\frac{\Gamma(N+1-\alpha)\Gamma(N+1-\beta)\Gamma(N+1-\gamma)\Gamma(N+1-\delta)}{(N+1)^2\Gamma(N+1)^4\Gamma(1-\alpha)\Gamma(1-\beta)\Gamma(1-\gamma)\Gamma(1-\delta)}\tag{1}$$

where:
$$\log\Gamma(z+1)=-\gamma z+\sum_{n\geq 1}\left(\frac{z}{n}-\log\left(1+\frac{z}{n}\right)\right) $$
probably leads to a massive simplification of $(1)$, or at least the chance to write $(1)$ as a simple integral by exploiting the identities:
$$ \log(m)=\int_{0}^{+\infty}\frac{e^{-x}-e^{-mx}}{x}\,dx,\qquad \log\left(1-\frac{\nu}{n}\right)=\int_{0}^{+\infty}\frac{1-e^{\nu x}}{x e^{nx}}\,dx.$$
However, by Did's comment we simply have:

$$ \log\prod_{n\geq 1}\left(1+\frac{1}{n^2}\right) = \color{red}{\log\frac{\sinh \pi}{\pi}} $$

through the Weierstrass product for the $\sinh$ function.
