<s>[INST] Taylor series coefficients This question arose in connection with A hard integral identity on MATH.SE.
Let
$$f(x)=\arctan{\left (\frac{S(x)}{\pi+S(x)}\right)}$$
with $S(x)=\operatorname{arctanh} x -\arctan x$, and let
$$f(x)=\sum_{n=0}^\infty a_nx^n=\frac{2}{3\pi}x^3-\frac{4}{9\pi^2}x^6+\frac{2}{7\pi}x^7+\frac{16}{81\pi^3}x^9-\frac{8}{21\pi^2}x^{10}+\ldots$$
be its Taylor series expansion at $x=0$. Some numerical evidence suggests the following interesting properties of the $a_n$ coefficients ($b_n$, $c_n$, $d_n$, $\tilde{c}_n$, $\tilde{d}_n$ are some positive rational numbers, $k>0$ is an integer):
1) $a_n=0$, for $n=4k$.
2) $a_n=\frac{2/n}{\pi}-\frac{b_n}{\pi^5}+(\text{maybe other terms of higher order in} 1/\pi)$, for $n=4k+3$.
3) $a_n=-\frac{c_n}{\pi^2}+\frac{d_n}{\pi^6}+(\text{maybe other terms of higher order in} 1/\pi)$, for $n=4k+2$.
4) $a_n=\frac{\tilde{c}_n}{\pi^3}-\frac{\tilde{d}_n}{\pi^7}+(\text{maybe other terms of higher order in } 1/\pi)$, for $n=4k+1$, $k>1$.
How can these properties (if correct) be proved?
P.S. We have
$$\arctan{\left(1+\frac{2S}{\pi}\right)}-\frac{\pi}{4}=\arctan{\left(\frac{1+2S/\pi-1}{1+(1+2S/\pi)}\right)}=\arctan{\left(\frac{S}{\pi+S}\right)} .$$
Using
$$\arctan(1+x)=\frac{\pi}{4}+\frac{1}{2}x-\frac{1}{4}x^2+\frac{1}{12}x^3-\frac{1}{40}x^5+\frac{1}{48}x^6-\frac{1}{112}x^7+\ldots$$
we get
$$\arctan{\left(\frac{S}{\pi+S}\right)}=\frac{S}{\pi}-\frac{S^2}{\pi^2}+\frac{2S^3}{3\pi^3}-\frac{4S^5}{5\pi^5}+\frac{4S^6}{3\pi^6}-\frac{8S^7}{7\pi^7}+\ldots$$
This proves 2), 3) and 4), because
$$S=2\left(\frac{x^3}{3}+\frac{x^7}{7}+\frac{x^{11}}{11}+\ldots\right)=2\sum_{k=0}^\infty \frac{x^{4k+3}}{4k+3} .$$
To prove 1), we need to prove the analogous property for $\arctan(1+x)$ and the proof can be based on the formula 
$$\frac{d^n}{dx^n}(\arctan x)=\frac{(-1)^{n-1}(n-1)!}{(1+x^2)^{n/2}}\sin{\left (n\,\arcsin{\left(\frac{1}{\sqrt{1+x^2}}\right)}\right )}$$
proved in K. Adegoke and O. Layeni, The Higher Derivatives Of The Inverse Tangent Function and Rapidly Convergent BBP-Type Formulas For Pi, Applied Mathematics E-Notes, 10(2010), 70-75, available at http://www.math.nthu.edu.tw/~amen/2010/090408-2.pdf. This formula enables us to get a closed-form expression
$$\arctan{\left(\frac{S}{\pi+S}\right)}=\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n}\,2^{n/2}\,\sin{\left(\frac{n\pi}{4}\right)}\,\frac{S^n}{\pi^n} .$$
So the initial questions are not actual now. However I'm still interested to know whether one can calculate in a closed-form the integral $$\int\limits_0^1 S^n(x)\frac{dx}{x} .$$
 [/INST] $\newcommand{\Catalan}{\operatorname{Catalan}}$
I made an attempt for $\int_0^1 S^2\;dx/x$, but with limited success.  
Let
$$
q_1 := \frac{1}{16}\left(
\ln  \left( 1-i \right) {\pi }^{2}+16\,\zeta  \left( 3 \right) -4\,i
\ln  \left( 1+i \right) \pi \,\ln  \left( 2 \right) +i{\pi }^{3}+4\,i
\ln  \left( 1-i \right) \pi \,\ln  \left( 2 \right) \\
-2\,\ln  \left( 1+
i \right) {\pi }^{2}-4\,i \left( \ln  \left( 1-i \right)  \right) ^{2}
\pi -16\,i\ln  \left( 1+i \right) {\it \Catalan}+10\,i \left( \ln 
 \left( 2 \right)  \right) ^{2}\pi 
\\
+8\,\pi \,{\it \Catalan}-2\,{\pi }^{2}\ln  \left( 2 \right) +{\pi }^{2}\ln  \left( i\sqrt {2}+\sqrt {2}+2 \right) +{\pi }^{2}\ln  \left( 2-\sqrt {2}-i\sqrt {2} \right)
\\
 +20\,\ln  \left( 2 \right) {\rm Li}_2 \left(2 \right) -20\,{\rm Li}_3 \left(2 \right) -8\,{\rm Li}_3 \left(-i \right) -8\,
{\rm Li}_3 \left(i \right) +16\,i\ln  \left( 1-i \right) {\it 
\Catalan}
\\
+4\,i \left( \ln  \left( 1+i \right)  \right) ^{2}\pi -2\,{
\pi }^{3}\right) \approx −0.4990969
$$
and
$$
q_2 := 
\sum _{m=1}^{\infty }{\frac {\Psi \left( (m+1)/2\right) -\Psi
 \left(m/2 \right) }{ 2\left( 2\,m-1 \right) ^{2}}} \approx 0.7416483,
$$
Then
$$
\int_0^1({\rm arctanh}\; x - \arctan x)^2\frac{dx}{x} = q_1+q_2 \approx 0.2425514
$$  
added 
Combining the above with Eckhard's alternate version, we get the interesting equation
$$
q_2 =
\frac{\left( 
\ln  \left( 2 \right)  \right) ^{2}\pi}{16} +{\frac {5}{64}}\,{\pi }^{3}
  -{ \Catalan}\,\ln  \left( 2 \right)
-2
\,{\rm Im} \; {\rm Li_3} \left( \frac{1+i}{2} \right)
$$
</s>