Closed Form for $~\int_0^1\frac{\text{arctanh }x}{\tan\left(\frac\pi2~x\right)}~dx$
Here is an approach.
We give a preliminary result.
A series of squares of logarithms
Let us consider the poly-Hurwitz zeta function initially defined by the series $$ \begin{align} \displaystyle \zeta(s,t\mid a,b) := \sum_{n=1}^{+\infty} \frac{1}{(n+a)^{s}(n+b)^t}, \quad \Re a>-1, \, \Re b>-1, \, \Re (s+t)>1. \tag1 \end{align} $$ The function $ \displaystyle \zeta(\cdot,\cdot \mid a,b)$ extends to a meromorphic function on $\mathbb{C}^2$ with only singularities on the set $\displaystyle \left\{(s,t) \in \mathbb{C}^2, \,\Re (s+t)=1\right\}$. It clearly generalizes the classic Hurwitz zeta function initially defined by the series $$ \begin{align} \displaystyle \zeta(s,a) := \sum_{n=0}^{+\infty} \frac{1}{(n+a)^s}, \quad \Re a>0, \, \Re s>1. \tag2 \end{align} $$
We have the following new result.
Theorem. Let $a, b$ be complex numbers such that $\Re a>-1$ and $\Re b>-1$.
Then $$ \begin{align} \sum_{n=1}^{+\infty}\log^2\!\left(\! \frac{n+a}{n+b}\!\right)= \zeta’’(0,a+1)+ \zeta’’(0,b+1)-2\zeta^{1,1}(0,0\mid a,b)\tag3 \end{align} $$
where $\log (z)$ denotes the principal value of the logarithm defined for all $z \neq 0$ by $$ \log (z) = \ln |z|+i \arg z, \quad -\pi<\arg z\leq \pi, $$ $ \displaystyle \zeta(\cdot,a)$ and $ \displaystyle \zeta(\cdot,\cdot \mid a,b)$ denoting the Hurwitz zeta function and the poly-Hurwitz zeta function respectively and where $$ \zeta’’(0, a)=\partial_{s}^2\left.\zeta(s,a)\right|_{s=0},\qquad \zeta^{1,1}(0,0\mid a,b)=\partial_{st}^2\left.\zeta(s,t\mid a,b)\right|_{(s,t)=(0,0)}.$$
Proof. On the one hand, one has $$ \begin{align} &\partial_a \left(\zeta''(0,a+1)+\zeta''(0,b+1)-2\zeta^{1,1}(0,0\mid a,b)\right)\\\\ &= \left.\partial_s^2 \left(\partial_a \zeta(s,a+1)\right)\right|_{s=0}-2\left.\partial_{st}^2 \left(\partial_a \zeta(s,t\mid a,b)\right)\right|_{(s,t)=(0,0)}\\\\ &= \left.\partial_s^2 \left(-s\zeta(s+1,a+1)\right)\right|_{s=0}-2\left.\partial_{st}^2 \left(-s\zeta(s+1,t\mid a,b)\right)\right|_{(s,t)=(0,0)}\\\\ &= -\left.\left(2\zeta'(s+1,a+1)+s\zeta''(s+1,a+1)\right)\right|_{s=0}+2\left.\partial_s \!\left(s\zeta^{0,1}(s+1,t\mid a,b)\right)\right|_{(s,t)=(0,0)}\\\\ &=2\gamma_1(a+1)-2\gamma_1(b,a), \end{align} $$ using Theorem $1$ here.
On the other hand, one has
$$ \begin{align} \partial_a\! \left(\sum_{n=1}^{+\infty}\log^2\!\left(\! \frac{n+a}{n+b}\!\right)\right) \!= 2\sum_{n=1}^{+\infty} \frac{\log (n+a)-\log (n+b)}{n+a} =2\gamma_1(a+1)-2\gamma_1(b,a), \end{align} $$ using Theorem $2$ here.
Observing that $$ \zeta(s,t\mid 0,0)=\zeta(s+t), \quad \zeta(s,1)=\zeta(s), $$ where $\zeta(\cdot)$ is the Riemann zeta function, then $$ \zeta’’(0,1)-\zeta^{1,1}(0,0\mid 0,0)=0 $$ and both sides of $(3)$ vanish at $a=b=0$.
Thus $(3)$ holds true. $\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \Box$
Lucian's integral
We prove that Lucian's integral is related to the preceding family of logarithmic series.
Proposition 1. We have $$ \begin{align} \int_0^1 \frac{\text{arctanh}\: x}{\tan \left( \frac{\pi}2x\right)}\:{\rm d}x=\frac\pi4-\frac1{2\pi}\sum_{n=1}^{+\infty}\log^2\!\left(\! \frac{2n-1 }{ 2n+1}\!\right).\tag{4} \end{align} $$
Proof. Let us proceed on Jack D'Aurizio's route which starts by using the standard expansion $$ \frac1{\tan \left( \frac{\pi}2x\right)}=\frac{2}{\pi x}-\frac{1}{\pi}\sum_{n=0}^{\infty}\frac{\zeta(2n+2)}{2^{2n}}x^{2n+1},\quad 0<x<1,\tag{5} $$ then integrating termwise using $$ \begin{align} &\int_{0}^{1}x^{2n+1}\:\text{arctanh} \:x \:{\rm d}x\\ &=\frac1{2(n+1)(2n+1)}+\frac{\ln2}{2(n+1)}+\frac1{4(n+1)}\left(\gamma+\psi \left(n+\frac12 \right) \right)\tag{6} \end{align} $$ to get $$ \begin{align} \int_0^1 \frac{\text{arctanh}\: x}{\tan \left( \frac{\pi}2x\right)}\:{\rm d}x &=\frac{\pi }{4}+\frac{2}{\pi }(1-\ln 2)\ln\left(\frac{\pi }{2}\right)\\\\&-\frac{1}{\pi }\sum_{n=0}^{\infty}\frac{\zeta(2n+2)}{(2n+1)2^{2n}}-\frac{1}{\pi }\sum_{n=0}^{\infty}\frac{\zeta(2n+2)\left(\psi\left(n+\frac12\right)+\gamma\right)}{(n+1)2^{2n+2}}. \tag7 \end{align} $$ We are left with two non trivial series to evaluate.
We prove that each series may be evaluated using the poly-Stieltjes constants.
One may write $$ \require{cancel} \begin{align} \sum_{n=0}^{\infty}\frac{\zeta(2n+2)}{(2n+1)2^{2n}}&=\sum_{n=0}^{\infty}\sum_{k=1}^{\infty}\frac1{k^{2n+2}}\frac1{(2n+1)2^{2n}}\\ &=4\sum_{k=1}^{\infty}\sum_{n=0}^{\infty}\frac1{(2n+1)}\frac1{(2k)^{2n+2}}\\ &=\sum_{k=1}^{\infty}\frac1k\left(\log \left(1 + \frac1{2k}\right)-\log \left(1 - \frac1{2k}\right)\right)\\ &=\sum_{k=1}^{\infty}\frac1k\left(\log \left(k + \frac12\right)-\log \left(k - \frac12\right)\right)\\ &=\gamma_1\Big({\small\frac12,0}\Big)-\gamma_1\Big({\small-\frac12,0}\Big) \tag{8} \end{align} $$ using Theorem $2$ here.
To evaluate the last series on the right hand side of $(7)$, one may check with some algebra that, for any complex number $z$ satisfying $|z|<1$, the following identity holds true: $$ \begin{align} &\sum_{n=0}^{\infty}\frac{\psi\left(n+\frac12\right)+\gamma}{n+1}z^{2n+2}\\ &=2z\log\left(\frac{1-z}{1+z} \right)-2\left(1- \ln 2 \right)\log (1-z^2)+\frac12\log^2\left(\frac{1-z}{1+z} \right). \tag9 \end{align} $$ Then $$ \require{cancel} \begin{align} &\sum_{n=0}^{\infty}\frac{\zeta(2n+2)\left(\psi\left(n+\frac12\right)+\gamma\right)}{(n+1)2^{2n+2}} \\ &=\sum_{n=0}^{\infty}\sum_{k=1}^{\infty}\frac1{k^{2n+2}}\frac{\psi\left(n+\frac12\right)+\gamma}{(n+1)2^{2n+2}}\\ &=\sum_{k=1}^{\infty}\sum_{n=0}^{\infty}\frac{\psi\left(n+\frac12\right)+\gamma}{n+1}\frac1{(2k)^{2n+2}}\\ &=\sum_{k=1}^{\infty}\frac1k \log \left(\frac{1-\frac1{2k}}{1+\frac1{2k}}\right)-2\left(1- \ln 2 \right)\sum_{k=1}^{\infty}\log \left(1 - \frac1{4k^2}\right)+\frac12\sum_{k=1}^{\infty}\log^2 \left(\frac{1-\frac1{2k}}{1+\frac1{2k}}\right)\\ &=\sum_{k=1}^{\infty}\frac1k \log \left(\frac{k-\frac12}{k+\frac12}\right)+2\left(1- \ln 2 \right)\ln\left(\frac{\pi }{2}\right)+\frac12\sum_{k=1}^{\infty}\log^2\!\left(\! \frac{2k-1 }{ 2k+1}\!\right)\\ &=\gamma_1\Big({\small-\frac12,0}\Big)-\gamma_1\Big({\small\frac12,0}\Big)+2\left(1- \ln 2 \right)\ln\left(\frac{\pi }{2}\right)+\frac12\sum_{k=1}^{\infty}\log^2\!\left(\! \frac{2k-1 }{ 2k+1}\!\right).\tag{10} \end{align} $$ Inserting $(10)$ and $(8)$ into $(7)$ gives the announced result $(4)$. $\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \Box$
We deduce the following closed form.
Proposition 2. We have
$$ \begin{align} \int_0^1 \frac{\text{arctanh} x}{\tan \left( \frac{\pi}2x\right)}\:{\rm d}x=\frac\pi4+\frac2\pi\ln^2 2+\frac1\pi\ln 2\ln \pi+\frac1\pi\zeta^{1,1}\Big(0,0 \:\Bigr\rvert {\small-\frac12,\frac12}\Big). \tag{11} \end{align} $$
Proof. One may observe that $$ \begin{align} \zeta\left(s,\frac12 \right) & = \left(2^s-1 \right)\zeta(s) \tag{12}\\ \zeta\left(s,\frac32 \right) & = \left(2^s-1 \right)\zeta(s)-2^s, \tag{13} \end{align} $$ and recalling that $\zeta'(0)=-\frac12 \ln (2 \pi)$, one may obtain $$ \begin{align} \zeta''\left(0,\frac12 \right) & = -\frac32 \ln^2 2 - \ln 2 \ln \pi \tag{14}\\ \zeta''\left(0,\frac32 \right) & = -\frac52 \ln^2 2 - \ln 2 \ln \pi. \tag{15} \end{align} $$ From $(4)$ and $(3)$, we have $$ \require{cancel} \begin{align} \int_0^1 \frac{\text{arctanh}\: x}{\tan \left( \frac{\pi}2x\right)}\:{\rm d}x &=\frac\pi4-\frac1{2\pi}\sum_{n=1}^{+\infty}\log^2\!\left(\! \frac{2n-1 }{ 2n+1}\!\right)\\\\ &=\frac\pi4-\frac1{2\pi}\sum_{n=1}^{+\infty}\log^2\!\left(\! \frac{n-\frac12 }{ n+\frac12}\!\right)\\\\ &=\frac\pi4-\frac1{2\pi}\left( \zeta''\left(0,-\frac12+1 \right)+ \zeta''\left(0,\frac12+1 \right)-2\zeta^{1,1}\Big(0,0 \:\Bigr\rvert {\small-\frac12,\frac12}\Big)\right)\\\\ &=\frac\pi4-\frac1{2\pi}\left( \zeta''\left(0,\frac12 \right)+ \zeta''\left(0,\frac32 \right)-2\zeta^{1,1}\Big(0,0 \:\Bigr\rvert {\small-\frac12,\frac12}\Big)\right), \end{align} $$ by appealing to $(14)$ and $(15)$, we get $(11)$. $\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \Box$
By combining Proposition $2$ and pisco125's derivation we obtain the following new closed forms.
Proposition 3. We have
$$ \begin{align} \int_{0}^{\infty} {\ln (1+x^2)\over {e^{2\pi x}+1}}\:{\rm d}x =&\:\frac\pi4+\frac1{2\pi}\ln^2 2+\frac1\pi\zeta^{1,1}\Big(0,0 \:\Bigr\rvert {\small-\frac12,\frac12}\Big) \tag{16} \\\\ \sum_{k=1}^{\infty} {(-1)^k\over k} \text{Ci} (2k\pi)=&\:\frac{\pi^2}4+\frac12\ln^2 2+\:\zeta^{1,1}\Big(0,0 \:\Bigr\rvert {\small-\frac12,\frac12}\Big) \tag{17} \end{align} $$
where $\text{Ci} (\cdot)$ is the cosine integral and where $\displaystyle \zeta(\cdot,\cdot\mid a,b)$ is the poly-Hurwitz zeta function.
This is a partial answer, but it reduces the problem into handling a more decent integral.
$$\color{blue}{\int_{0}^{1} \text{arctanh } x \cot\left({\pi x\over 2}\right)dx = {3\ln^2 2 \over 2\pi}+{\ln \pi \ln 2\over \pi}+ {\int_{0}^{\infty} {\ln(1+x^2)\over e^{2\pi x}+1}dx}}$$
Note that the analogous integral is known $$\int_{0}^{\infty} {x\ln(1+x^2)\over e^{2\pi x}+1}dx = {19\over 24}-{23\over 24} \ln 2-{1\over 2}\ln A$$ where $A$ is the Glaisher–Kinkelin constant.
However, it seems that the fundamental nature of the one related to the question is entirely different, hence its value must be derived in some other manners not known to me.
I briefly outlined the process of obtaining the blue equality below.
Identities/facts that will be used:
- $$\sum_{k=1}^n \sin(2kx) = {1\over 2}\cot x - {\cos(2n+1)x\over {2\sin x}} $$ this is true whenever $\sin x$ isn't zero.
- Riemann-Lebesgue Lemma, which more or less states that: $$\text{For an absolutely integrable function $f(x)$ on the interval $[a,b]$, then}\\ \lim_{n\to \infty}\int_{a}^{b} f(x)\cos (nx) dx = \lim_{n\to \infty}\int_{a}^{b} f(x)\sin (nx) dx = 0 $$
- $$\text{Ci} (x) = -\int_{x}^{\infty} {\cos x\over x} dx, \text{Si} (x) = \int_{0}^{x} {\sin x\over x}dx$$ they are the cosine and sine integral
- Using some elemtary (but delicate) techniques, one can have, for any $a>0$, $$\int_{0}^{\infty} {1\over x}\left({1\over{1+ax}}-\cos ax\right)dx = \gamma$$ And also this series $$\sum_{k=1}^{\infty} (-1)^{k} {\ln k \over k} = \gamma \ln 2 - {{\ln^2 2}\over 2} $$
- $$\int_{0}^{\infty} e^{-x}\sin ax dx={a\over {a^2+1}}$$
Proof
The original integral is equal to $$ {2\over \pi} \int_{0}^{\pi/2} \text{arctanh} {2x\over \pi}\cot x dx = {2\over \pi} \int_{0}^{\pi/2} {{\ln(1+{2x\over \pi})-\ln(1-{2x\over \pi})}\over 2} \cot x dx$$
And by the first fact, $$\int_{0}^{\pi/2} {\ln\left(1\pm{2x\over \pi}\right)} \cot x dx = 2\sum_{k=1}^n \int_{0}^{\pi/2} \ln\left(1\pm{2x\over \pi}\right)\sin(2kx) dx + \\ \int_{0}^{\pi/2} {\cos(2n+1)x\over \sin x}\ln\left(1\pm{2x\over \pi}\right) dx$$ Note that the function $\ln\left(1\pm{2x\over \pi}\right)\over \sin x$ is absolutely integrable its integrated range, thus as $n$ approaches infinity, the latter integral tends to zero. Thus $$\int_{0}^{\pi/2} {\ln\left(1\pm{2x\over \pi}\right)} \cot x dx = 2\sum_{k=1}^{\infty} \int_{0}^{\pi\over 2} \ln\left(1\pm{2x\over \pi}\right)\sin(2kx) dx $$
For the first one, it's striaghtforward $$\begin{align} \int_{0}^{\pi/2} {\ln\left(1+{2x\over \pi}\right)} \sin(2kx) dx & = \ln 2 {(-1)^{k+1}\over {2k}} + {1\over{k\pi}}\int_{0}^{\pi/2} {\cos{2kx}\over {1 +{2x\over\pi} }} dx \\ & = \ln 2 {(-1)^{k+1}\over {2k}} + {(-1)^{n}\over{2k}} \int_{1}^{2} {\cos{k\pi x}\over x} dx \\ & = \ln 2 {(-1)^{k+1}\over {2k}} + {(-1)^{n}\over{2k}} [\text{Ci} (2k\pi) - \text{Ci} (k\pi)] \end{align}$$ Where we have used integration by parts in the first line, a simple substitution in the second and the definition of cosine integral in the third. Hence $$\begin{align} \int_{0}^{\pi\over 2} \ln\left(1+{2x\over \pi}\right)\cot x dx & = \ln^2 2 + \sum_{k=1}^{\infty} {(-1)^k\over k} [\text{Ci} (2k\pi) - \text{Ci} (k\pi)] \end{align}$$
For the second one, it might require some gist, $$\begin{align} \int_{0}^{\pi/2} {\ln\left(1-{2x\over \pi}\right)} \sin(2kx) dx & = \int_{0}^{\pi/2} {\ln\left[1-{2\over \pi}\left({\pi\over 2} -x\right)\right]} \sin\left[2k\left({\pi\over 2} -x\right)\right] dx \\ & = (-1)^{k+1} \int_{0}^{\pi/2} {\ln\left({2x\over \pi}\right)} \sin(2kx) dx \\ & = {(-1)^{k+1}\over {2k}} \int_{0}^{\pi/2} {\ln\left({2x\over \pi}\right)} d(1-\cos 2kx) \\ & = {(-1)^{k}\over {2k}} \int_{0}^{\pi/2} {{1-\cos 2kx} \over x} dx \\ & = {(-1)^{k}\over {2k}} \left\{ \int_{0}^{\pi/2} {1\over x}\left(1-{1\over {1+2kx}}\right) dx+ \int_{0}^{\pi/2} {1\over x}\left({1\over {1+2kx}}-\cos 2kx\right) dx \right\} \\ & = {(-1)^{k}\over {2k}} \left\{ \ln(1+k\pi) + \gamma - \int_{\pi/2}^{\infty} {1\over x}\left({1\over {1+2kx}}-\cos 2kx\right) dx \right\} \\ & = {(-1)^{k}\over {2k}} \{ \ln k +\ln \pi + \gamma -\text{Ci} (k\pi) \} \end{align}$$ Using the series given above, one can get $$\int_{0}^{\pi\over 2} \ln\left(1-{2x\over \pi}\right)\cot x dx = -{{\ln^2 2}\over 2} - \ln \pi \ln 2 - \sum_{k=1}^{\infty} {(-1)^k\over k} \text{Ci} (k\pi)$$
Hence, putting them altogether, $$\int_{0}^{1} \text{arctanh } x \cot\left({\pi x\over 2}\right)dx = {3\ln^2 2 \over 2\pi}+{\ln \pi \ln 2\over \pi} +{1\over \pi} \sum_{k=1}^{\infty} {(-1)^k\over k} \text{Ci} (2k\pi)$$ The latter series is particularly intractable, and by converting $x\over{x^2+1}$ with means a integral (see the last fact), it can be shown that $$\text{Ci} {(2k\pi)} = -\int_{0}^{\infty} {x\over{x^2+1}}e^{-2n\pi x}dx $$ $$ \text{Hence,} \space\space\space\space\space\space \sum_{k=1}^{\infty} {(-1)^k\over k} \text{Ci} (2k\pi) = \int_{0}^{\infty} {x\over{x^2+1}}\ln (1+e^{-2\pi x})dx = \pi \int_{0}^{\infty} {\ln (1+x^2)\over {e^{2\pi x}+1}}dx $$
There are some simple manipulations that can be carried on. For starters,
$$\cot x=\frac{1}{x}-2\sum_{n\geq0}\frac{\zeta(2n+2)}{\pi^{2n+2}}x^{2n+1}\tag{1}$$
hence
$$\cot\frac{\pi x}{2}=\frac{2}{\pi x}-\frac{1}{\pi}\sum_{n\geq0}\frac{\zeta(2n+2)}{4^n}x^{2n+1}\tag{2}$$
and
$$\int_{0}^{1}\text{arctanh}(x)\cdot x^{2n+1}=\frac{1}{2(n+1)}\bigg(\ln2+\frac{1}{2n+1}+\frac{1}{2}H_{n-\frac{1}{2}}\bigg)\tag{3}$$
so
$$I=\int_{0}^{1}\text{arctanh}(x)\cdot\cot\frac{\pi x}{2}\,dx=\frac{\pi}{4}+\frac{2}{\pi}(1-\ln2)\ln\frac{\pi}{2}-\frac{S}{2\pi}\tag{4}$$
where
$$S=\sum_{n\geq0}\frac{\zeta(2n+2)}{4^n}\bigg(\frac{2}{2n+1}+\frac{H_{n-\frac{1}{2}}}{2(n+1)}\bigg)\tag{5}$$
but I am not so sure the last series can be further simplified. In any case, $(4)$ looks like a good starting point.