Integrate $\int^{\frac{\pi}{2}}_{0} \{ \cot x\}$ dx
Solution 1:
Supplementing Thomas Andrews' answer, since: $$ S_N =\ln(N+1) - \sum_{n=1}^N \arctan \left(\frac{1}{n} \right) = \ln(N+1) - \sum_{k=0}^\infty \frac{(-1)^k}{2k+1}\sum_{n=1}^N n^{-2k-1} \\ = \ln(N+1) - H_N - \sum_{k=1}^\infty \frac{(-1)^k}{2k+1}H_{N,2k+1} $$ Where the $H_{N,i}$ denote the generalized Harmonic Numbers, which approaches in the limit: $$ S=\lim_{N\to\infty} S_N = -\gamma - \sum_{k=1}^\infty \frac{(-1)^k\zeta(2k+1)}{2k+1} $$ Which by $(124)$ here, we have: $$ S = -\gamma - \Im(-i\gamma + \ln(\Gamma(1-i))) = - \Im(\ln(\Gamma(1-i))) $$ The integral therefore equals: $$ I = 1 - \Im(\ln(\Gamma(1-i))) \approx 0.698359 $$ Through the use of the argument, this also equals: $$ I = 1 - \arg(\Gamma(1-i)) = 1 + \frac{\pi}{2} + \arg(\Gamma(i)) $$
Solution 2:
Just a start:
The typical way of doing this sort of problem is to let $a_n=\cot^{-1} n=\arctan\frac{1}{n}$. Then the integral can be written:
$$\sum_{n=0}^{\infty} \int_{a_{n+1}}^{a_{n}} ((\cot x)-n)\,dx=\sum_{n=0}^{\infty}\left(n(a_{n+1}-a_{n})+ \int_{a_{n+1}}^{a_n}\cot x\,dx\right)$$
You get the partial sum:
$$\begin{align}\sum_{n=0}^{N}\left(n(a_{n+1}-a_{n})+ \int_{a_{n+1}}^{a_n}\cot x\,dx\right)&=-\left(\sum_{n=1}^{N} a_n \right)+ Na_{N+1} +\int_{a_{N+1}}^{\pi/2}\cot x\,dx\\ &=-\left(\sum_{n=1}^{N} a_n \right) + Na_{N+1}+\log|\sin \pi/2|-\log|\sin a_{N+1}|\\ &=-\left(\sum_{n=1}^{N} a_n \right) + Na_{N+1} +\frac{1}{2}\log((N+1)^2+1) \end{align}$$
The last since $\sin a_n =\sin\cot^{-1} n=\frac{1}{\sqrt{n^2+1}}$.
Since $Na_{N+1}\to 1$, and $\log((N+1)^2+1)-2\log(N+1)\to 0$ the limit is the same as the limit:
$$\lim_{N\to\infty}\left(\log(N+1)-\left(\sum_{n=1}^{N} a_n \right)+1 \right)$$
When I enter into Wolfram Alpha a request for: $$\sum_{n=1}^{N}\left(\log(n+1)-\log(n)-\arctan \frac{1}{n}\right)$$
it finds no closed form, with approximate value $\approx-0.299155$, so your integral is $\approx 0.700845$.
Since $$\begin{align}\log(1+n)-\log(n)&=\log(1+1/n)\\ &=\frac{1}{n}-\frac{1}{2n^2}+\frac{1}{3n^3}-\cdots\end{align}$$ and $$\arctan\frac{1}{n}=\frac{1}{n}-\frac{1}{3n^3}+\frac{1}{5n^5}\cdots$$
So your integral is $$\begin{align}1+&\left(2\zeta(3)-\zeta(2)-\zeta(4)\right)\\+&\left(2\zeta(7)-\zeta(6)-\zeta(8)\right)\\+&\cdots\\+&\left(2\zeta(4n-1)-\zeta(4n-2)-\zeta(4n)\right)\\+&\cdots\end{align}$$