A nice expression for $\int_0^{\pi/2} \left[\frac{1}{x \sin(x)}-\frac{1}{x^2}\right] \mathrm{d} x$ Motivated by the easier integral
$$ \int \limits_0^\infty \left[\frac{1}{x^2} - \frac{1}{x \sinh(x)}\right] \mathrm{d} x = \ln(2) \, ,$$
I have been trying to compute

$$ I \equiv \int \limits_0^{\pi/2} \left[\frac{1}{x \sin(x)} - \frac{1}{x^2} \right] \mathrm{d} x \approx 0.29172334953491321 \, .$$

I have not found a closed-form expression yet and inverse symbolic calculators do not give any results either. However, a few other representations for $I$ can be derived using the following methods:


*

*Laurent series
The Laurent series of the cosecant function is given by $$\csc(x) = \frac{1}{x} + \sum \limits_{k=1}^\infty \frac{\lvert \mathrm{B}_{2k}\rvert (4^k - 2)}{(2k)!} x^{2k-1}$$ in terms of the Bernoulli numbers $(\mathrm{B}_n)_{n \in \mathbb{N}_0}$ and has radius of convergence $\pi$ , so we can integrate termwise to obtain $$ \tag{1} I = \sum \limits_{k=1}^\infty \frac{\lvert \mathrm{B}_{2k}\rvert  \left[2-4^{-(k-1)}\right] \pi^{2k-1}}{(2k-1)(2k)!} \, .$$

*Pole expansion
The series $$ \csc(x) = \frac{1}{x} + 2 x \sum \limits_{n=1}^\infty \frac{(-1)^{n-1}}{\pi^2 n^2 - x^2}$$ yields $$\tag{2} I = \frac{1}{\pi} \sum \limits_{n=1}^\infty \frac{(-1)^{n-1}}{n} \ln\left(\frac{2n+1}{2n-1}\right) \, .$$ Expanding the logarithm only leads to $$ \tag{3} I = \frac{1}{\pi} \sum \limits_{k=1}^\infty \frac{\eta(2k)}{(2k-1) 4^{k-1}} \, ,$$ which reduces to $(1)$ when the special values of the eta functions are used. Summation by parts turns $(2)$ into
$$ \tag{4} I =  \frac{4}{\pi} \sum \limits_{n=1}^\infty \frac{(-1)^{n-1} (2n+1) \ln(2n+1)}{(2n+1)^2 -1} \, . $$
This can also be written as
$$ \tag{5} I = \frac{4}{\pi} \beta'(1) + \frac{1}{\pi} \sum \limits_{n=1}^\infty \frac{(-1)^{n-1} \ln(2n+1)}{2n^3+3n^2+n} \, ,$$
where $\beta$ is the Dirichlet beta function (there is a reasonably nice expression for $\beta'(1)$).

*Integration by parts
There are several possible ways to integrate by parts. One of them shows that $$ \tag{6} I = \frac{2}{\pi} \ln \left(\frac{4}{\pi}\right) + \frac{1}{2} \int \limits_0^{\pi/4} \frac{\ln[\tan(t)/t]}{t^2} \, \mathrm{d} t $$ holds. I am not sure how to proceed from here though. Plugging in the Maclaurin series of $\ln[\tan(t)/t]$ reproduces $(1)$ .

*Contour integration (due to eyeballfrog)
As demonstrated in eyeballfrog's answer we also have $$ \tag{7} I = \frac{2}{\pi} - \int \limits_0^\infty \frac{t}{1+t^2} \, \operatorname{sech}\left(\frac{\pi}{2} t\right) \, \mathrm{d} t \, .$$ Using the pole expansion of $\operatorname{sech}$ yields $(4)$ again.  
That is all I have at the moment, so my question is:

Is it possible to find a closed-form expression for the value of $I$ or can we at least rewrite any of the integral or series representation in terms of a suitable special function?

 A: Well here's a start. Consider the contour around the rectangle with corners at $\{0, \pi/2, \pi/2+iR,iR\}$. $1/[x\sin(x)]-1/x^2$ has no poles in this region, so the integral around the contour must be 0. Parameterizing the integrals along each side of the contour then gives
$$
\int_0^{\pi/2}\left[\frac{1}{x\sin x}-\frac{1}{x^2}\right]dx + i\int_0^{R}\left[\frac{1}{(\pi/2+iy)\sin (\pi/2+iy)}-\frac{1}{(\pi/2+iy)^2}\right]dy - \int_0^{\pi/2}\left[\frac{1}{(x+iR)\sin(x+iR)}-\frac{1}{(x+iR)^2}\right]dx -i \int_0^{R}\left[\frac{1}{iy\sin(iy)}-\frac{1}{(iy)^2}\right]dy = 0
$$
The first integral is the one we want. The third integral vanishes as $R\rightarrow\infty$, while the fourth integral is just $\int_0^\infty[1/y^2 - 1/(y\sinh y)]dy = \ln 2$ in that limit. So we have in the limit that $R\rightarrow\infty$,
$$
\int_0^{\pi/2}\left[\frac{1}{x\sin x}-\frac{1}{x^2}\right]dx + i\left(\int_0^{\infty}\left[\frac{1}{(\pi/2+iy)\sin (\pi/2+iy)}-\frac{1}{(\pi/2+iy)^2}\right]dy - \ln 2\right) = 0
$$
Since the first integral is purely real, the $\ln 2$ term must cancel out the real part of the second integral, and we have
$$
\int_0^{\pi/2}\left[\frac{1}{x\sin x}-\frac{1}{x^2}\right]dx =\int_0^{\infty}\mathrm{Im}\left[\frac{1}{(\pi/2+iy)\sin (\pi/2+iy)}-\frac{1}{(\pi/2+iy)^2}\right]dy
$$
Actually expanding the imaginary part and doing various algebra things gives
$$
\int_0^{\pi/2}\left[\frac{1}{x\sin x}-\frac{1}{x^2}\right]dx = \frac{2}{\pi} - \int_0^\infty \frac{t}{1+t^2}\mathrm{sech}\left(\frac{\pi}{2}t\right)dt
$$
Despite the relative simplicity of this last integral, Mathematica won't do it and I can't find it or things that might lead to it in Gradshteyn and Rhyzik. Anyone have an idea of where to go from here?
A: Without the $t$ in the numerator, there is the closed-form evaluation for the eyeballfrog-like integral
$$ \int_0^\infty \frac{dt}{a^2+t^2}\,\text{sech}(\pi t/2) = \frac{1}{2a}\Big(\psi(\frac{a+3}{4}) - \psi(\frac{a+1}{4}) \Big) .$$
I suspect that 'missing t' will prevent the answer from being solved in closed form. There are variants with $t/\sinh{(\pi t/2)}$ and sech-squared, but always the integrand is even.  Nevertheless, with some calisthenics one may derive
$$ \int_0^\infty dt \frac{t}{1+t^2}\text{sech}(\pi t/2) = 2\int_0^\infty
\cos{(2\pi u)}\,\big(\psi(3/4+u) - \psi(1/4+u) \big) du .$$
This provides a little hope because it is known that 
$$\int_0^\infty
\cos{(2\pi u \,x)}\,\big(\psi(1+u) - \log(u) \big) du = \frac{1}{2}\big(\psi(1+x) - \log(x) \big).$$
If only the argument of the digamma function could be replaced with $1+u \to a+u$ and the new right-hand side possessed a closed form evaluation, then the problem would be solved.
