integral $\int_0^{\pi} \left( \frac{\pi}{2} - x \right) \frac{\tan x}{x} \, {\rm d}x$
Evaluate , if possible in a closed form, the integral:
$$\int_0^{\pi} \left( \frac{\pi}{2} - x \right) \frac{\tan x}{x} \, {\rm d}x$$
Basically, I have not done that much. I broke the integral
\begin{align*} \int_{0}^{\pi} \left ( \frac{\pi}{2}-x \right ) \frac{\tan x}{x} \, {\rm d}x &= \int_{0}^{\pi/2} \left ( \frac{\pi}{2} - x \right ) \frac{\tan x}{x} \, {\rm d}x + \int_{\pi/2}^{\pi} \left ( \frac{\pi}{2} - x \right ) \frac{\tan x}{x} \, {\rm d}x\\ &\!\!\!\!\!\!\overset{u=\pi/2-x}{=\! =\! =\! =\! =\! =\!} \int_{0}^{\pi/2} \frac{u \cot u}{\frac{\pi}{2}-u} \, {\rm d}u + \int_{-\pi/2}^{0} \frac{u \cot u}{\frac{\pi}{2}-u} \, {\rm d}u\\ &= \int_{-\pi/2}^{\pi/2} \frac{u \cot u}{\frac{\pi}{2}-u} \, {\rm d}u\\ &\approx 2.13897 \end{align*}
I have no idea how to evaluate this. I was thinking of IBP and then some kind of Fourier , but I cannot get it to work. Any ideas?
Too long for a comment. We have the following representations:
\begin{align*} \int_{0}^{\pi} \left(\frac{\pi}{2} - x\right) \frac{\tan x}{x} \, dx &= \frac{\pi^2}{4} + \frac{\pi}{2}\int_{0}^{1} \psi\left(\frac{1+x}{2}\right) \sin(2\pi x) \, dx \\ &= \frac{\pi^2}{4} - \pi \int_{0}^{\infty} \frac{dt}{(1+t^2)(e^{2\pi t} + 1)}. \end{align*}
At this moment I have no good idea of dealing with these, though I am posting this in hope of providing an alternative start for others as well as for a self record.