Evaluate $\int_{0}^{\pi} \frac{x\coth x-1}{x^2}dx$ I've been trying to evaluate certain series recently, and I found that
$$\sum_{r=1}^{\infty}\frac{1}{r}\arctan\frac{1}{r}=\frac{\pi}{2}\int_{0}^{\pi} \frac{x\coth x-1}{x^2} \, dx$$
Therefore, I would like to know how to evaluate $$\int_{0}^{\pi} \frac{x\coth x-1}{x^2} \, dx$$
The integral is approximately equal to $0.895004...$ but even Wolfram Alpha gives no closed form solution. Any ideas? Part of the problem is that the indefinite integral has no elementary antiderivative. I've tried using 'Feynman's trick' on this integral too but without success.
Thank you for your help.
 A: Another method, if you'd like:
Consider the continued fraction of $\coth x$ which is
$$\coth x=\dfrac{1}{x}\left\{1+\dfrac{x^2}{3+\dfrac{x^2}{5+\dfrac{x^2}{7+\dfrac{x^2}{\ddots}}}}\right\}$$
Considering the third iteration, that is:
$$\dfrac{1}{x}+\dfrac{x}{3+\dfrac{x^2}{5+\dfrac{x^2}{7}}}=\dfrac{1}{x}+\dfrac{5x+\dfrac{x^3}{7}}{15+\dfrac{10x^2}{7}}=\dfrac{105+45x^2+x^4}{5x(21+2x^2)}$$
we may write
$$\int_0^{\pi}\dfrac{105+45x^2+x^4}{5x^2(21+2x^2)}-\dfrac{5(21+2x^2)}{5x^2(21+2x^2)}dx= \int_0^{\pi}\dfrac{35+x^2}{105+10x^2}dx\approx 0.89\color{red}{6287}$$
which was only the third iteration.
A: Not an answer, but I thought I'd give some equivalent statements. As James and the original poster mentioned, we have:
$$
\sum _{r=1}^{\infty } \frac{1 }{r}\arctan\left(\frac{1}{r}\right)= \sum _{n=0}^{\infty } \frac{(-1)^{n}}{2n+1}\zeta(2n+2) = \frac{\pi}{2}\int_{0}^{\pi} \frac{x\coth x-1}{x^2} \, dx \tag{1}
$$
Changing the integrand yields the equivalent:
$$
\frac{1}{2}\int_{0}^{1} \frac{\pi\coth (\pi x)}{x} - \frac{1}{x^2} \, dx = \frac{1}{2}\int_{0}^{\infty} \pi\coth (\frac{\pi}{e^x}) - e^x \, dx = (1)
$$
Recalling that:
$$
\int_{0}^{\infty} e^{-x} \frac{\sin t x}{\sinh x} \, dx = \frac{\pi}{2} \ \coth(\frac{\pi}{2} t) - t
$$
and integrating over $t$ with some rearranging gives us
$$
\int_{0}^{\infty} \frac{Si(x)}{e^x-1} \, dx = (1)
$$
This integral (where Si(x) is the Sine Integral) also equals (1) and part by part can give the series above.
If one expands the $\coth(x)$ in the original integral it can be rearranged to:
$$
\frac{\pi}{4} + \frac{1}{4}\int_{0}^{\pi} \psi^{(0)}(-ie^{ix}) \ - \psi^{(0)}(-ie^{-ix}) \ - (-i + 2\cos(x)) \tan(x) \ dx = (1)
$$
However, this form is basically useless as the Polygamma function doesn't simplify anything.
I hope others will have better luck than I did.
A: An inelegant method (for pure mathematicians) is to use infinite series forms for both sides of the claimed equality to meet at some identical intermediate result:
Starting with the infinte series expansion for $\arctan x$
$$\arctan x = \sum _{k=1}^{\infty } \frac{(-1)^{k-1} }{2 k-1}x^{2 k-1}$$
immediately gives
$$\sum _{r=1}^{\infty } \frac{1 }{r}\arctan\left(\frac{1}{r}\right)=\sum _{r=1}^\infty \frac{1}{r} \sum _{k=1}^{\infty } \frac{(-1)^{k-1} }{2 k-1} \frac{1}{r^{2 k-1}}\tag{1}$$
swapping the order of the double sum gives
$$\sum _{r=1}^{\infty } \frac{1 }{r}\arctan\left(\frac{1}{r}\right)=\sum _{k=1}^{\infty } \frac{(-1)^{k-1} \zeta (2 k)}{2 k-1}\tag{2}$$
Then using the infinite series expansion for $\coth x$
$$\coth(x)=\frac{1}{x}+2 \sum _{k=1}^{\infty } \frac{  (-1)^{k-1} \zeta (2 k)}{\pi ^{2 k}}x^{2 k-1}$$
We can integrate
$$\frac{\pi}{2}\int_{0}^{\pi} \frac{x\coth x-1}{x^2} \, dx$$
term by term to give
$$\frac{\pi}{2}\int_{0}^{\pi} \frac{x\coth x-1}{x^2} \, dx=\sum _{k=1}^{\infty } \frac{(-1)^{k-1} \zeta (2 k)}{2 k-1}\tag{3}$$
A: This isn't really an answer, but an approximation.  It can be shown that, for large positive $x$,
$$ \sum_{n=1}^\infty \frac{1}{n} \arctan{(\frac{x}{n})} \sim \frac{1}{2}\big( \gamma \  \pi + \frac{1}{x} + \pi \log{x} + 2\pi \text{Ei}(-2\pi x) \big) $$  where Ei is the exponential integral. The number 1 is hardly large, but putting in for the right hand side gives seven decimal digit agreement.  Plotting the integral against this asymptotic form shows that the latter really is a stellar approximation, even for $x$ as small as 1/2.
