<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] Here is a simple dérivation of the Taylor expansion of $~\arctan(\frac{x}{1+x})~:$
Since $$~\arctan(u)=\dfrac{i}{2}\ln\big(\dfrac{1-iu}{1+iu}\big),~~\arctan(\frac{x}{1+x})=\dfrac{i}{2}\ln\Big(\dfrac{1-i\frac{x}{1+x}}{1+i\frac{x}{1+x}}\Big)$$
$$=
\dfrac{i}{2}\ln\Big(\dfrac{1+(1-i)x}{1+(1+i)x}\Big)=\dfrac{i}{2}\ln\Big(\dfrac{1+\sqrt{2}\exp(-i\frac{\pi}{4}) x}{1+\sqrt{2}\exp(i\frac{\pi}{4})x}\Big).~$$
So, for $~|x|<\frac{1}{\sqrt{2}},$
$$\arctan(\frac{x}{1+x})=\dfrac{i}{2}\sum\limits_{n=1}^{\infty}\frac{(-1)^{n-1}2^{n/2}}{n}(e^{-in\frac{\pi}{4}}
-e^{in\frac{\pi}{4}})x^n$$
$$=\sum\limits_{n=1}^{\infty}\frac{(-1)^{n-1}2^{n/2}}{n}\sin(n\frac{\pi}{4})x^n,$$
and, for $~|w|<\frac{\pi}{\sqrt{2}},$
$$(1)~~~~~~\arctan(\frac{w}{\pi+w})=\sum\limits_{n=1}^{\infty}\frac{(-1)^{n-1}2^{n/2}}{n}\sin(n\frac{\pi}{4})(\frac{w}{\pi})^n.$$
But I'm a bit worried about the following detail : if $$~S(x)=2\sum\limits_{n=0}^{\infty}\dfrac{x^{4n+3}}{4n+3},
~~~~~~~~~~~~\lim\limits_{x\rightarrow1^{-}}S(x)=+\infty,~$$
 so it seems a bit dangerous to substitute $~S(x)~$ for $~w~$ into $~(1)~$ (since this series diverges for $~|w|>\frac{\pi}{\sqrt{2}})$ (and even more dangerous to interchange summation and integral...)
Am I wrong ?
</s>