Evaluate $\sum\limits_{n\geq1}\frac{(-1)^n}{3^n(2n+1)}\sum\limits_{k=1}^{n}\frac{(-1)^k}{k}{n\choose k}(x^k-1)$ In my answer here, I reduce the problem of evaluating 
$$J=\int_0^{\pi/6}\frac{x\cos x}{1+2\cos x}dx$$
to the evaluation of $S(8-4\sqrt3)$, were 
$$S(q)=\sum_{n\geq1}\frac{(-1)^n}{3^n(2n+1)}\sum_{k=1}^{n}\frac{(-1)^k}{k}{n\choose k}(q^k-1)\qquad q>0.$$

I am now interested in the evaluation of $S(q)$ in terms of special functions. 

I have not gotten very far with this series. I have shown that 
$$\sum_{k=1}^{n}\frac{(-1)^k}{k}{n\choose k}(q^k-1)=\int_1^q\frac{(1-x)^n-1}{x}dx$$
and consequently that
$$S(q)=\int_0^{1-q}\frac1{1-x}\left[\frac{\tan^{-1}\sqrt{x}}{\sqrt{x}}-\frac{\pi}{2\sqrt3}\right]dx$$
Which 'reduces' to
$$S(q)=\frac{\pi}{2\sqrt3}\ln q+2\int_0^{\sqrt{1-q}}\frac{\tan^{-1}x}{1-x^2}dx$$
But I do not know how to proceed. Could I have some help? Thanks.

Edit:
I've found out I messed up a little earlier on. I found that for $0\leq q\leq 1$ we actually have that 
$$S(q)=-\frac{\pi}{2\sqrt3}\ln q+\sqrt{3}\int_1^q \frac{\tan^{-1}\left[\sqrt{\frac{1-t}{3}}\right]}{t\sqrt{1-t}}dt.$$
It is really quite similar to the previous integral.
 A: Considering the antiderivative, I should start with $$\int\frac{\tan^{-1}(x)}{1-x^2}dx=\frac 12 \int\frac{\tan^{-1}(x)}{1+x}dx+\frac 12 \int\frac{\tan^{-1}(x)}{1-x}dx$$
Now, I suppose that we could use
$$\tan^{-1}(x)=-\frac{i}{2}\, (\log (1+i x)-\log (1-i x))$$
$$\int \frac {\log (1+i x)}{1+x} \,dx=\text{Li}_2\left(\left(\frac{1+i}{2}\right) (1+i x)\right)+\log
   \left(1-\left(\frac{1+i}{2}\right) (1+i x)\right) \log (1+i x)$$
$$\int \frac {\log (1-i x)}{1+x} \,dx=\text{Li}_2\left(\left(\frac{1-i}{2}\right) (1-i x)\right)+\log
   \left(1-\left(\frac{1-i}{2}\right) (1-i x)\right) \log (1-i x)$$
$$\int \frac {\log (1+i x)}{1-x} \,dx=-\text{Li}_2\left(\left(\frac{1-i}{2}\right) (1+i x)\right)-\log
   \left(1-\left(\frac{1-i}{2}\right) (1+i x)\right) \log (1+i x)$$
$$\int \frac {\log (1-i x)}{1-x} \,dx=-\text{Li}_2\left(\left(\frac{1+i}{2}\right) (1-i x)\right)-\log
   \left(1-\left(\frac{1+i}{2}\right) (1-i x)\right) \log (1-i x)$$
A: New Integral. First note that it's not good to have $\sqrt {1-x}$ when the integrating region is greater than $1$. 
$$f=\int_1^{8-4\sqrt 3} \frac{\arctan\left(\sqrt{\frac{1-t}{3}}\right)}{t\sqrt{1-t}}dt=\int_1^{8-4\sqrt 3} \frac{\text{arctanh}\left(\sqrt{\frac{t-1}{3}}\right)}{t\sqrt{t-1}}dt$$
Change the variable $\frac{t-1}{3}=u^2$ and then $\frac{1-u}{1+u}=x$
$$f=\sqrt 3 \int_0^{\frac{2}{\sqrt 3}-1} \frac{\ln\left(\frac{1+u}{1-u}\right)}{1+3u^2}du=-\frac{\sqrt 3}{2}\int_{\sqrt 3-1}^1\frac{\ln x}{x^2-x+1}dx$$
The latter integral can be expressed in terms of Dilogarithms with $\phi =\frac{\sqrt 5+1}{2}$.
$$\int_{\sqrt 3-1}^1\frac{\ln x}{x^2-x+1}dx=\frac{1}{\sqrt 5}\left(\int_{\sqrt 3-1}^1 \frac{\ln x}{x-\phi}dx-\int_{\sqrt 3-1}^1 \frac{\ln x}{x+\phi^{-1}}dx\right)$$
Previous Integral. Integrate by parts first.$$2\int_0^{\sqrt{1-q}}\frac{\tan^{-1}x}{1-x^2}dx=\arctan(\sqrt{1-q})\ln\frac{1+\sqrt{1-q}}{1-\sqrt{1-q}}+\int_0^\sqrt{1-q}\frac{\ln\frac{1-x}{1+x}}{1+x^2}dx$$
For the last integral let $\frac{1-x}{1+x}=u$ followed by $u=\tan t$, also set $k=\frac{1-\sqrt{1-q}}{1+\sqrt{1-q}}$. 
$$\int_0^\sqrt{1-q}\frac{\ln\frac{1-x}{1+x}}{1+x^2}dx=\int_k^1 \frac{\ln u}{1+u^2}du=\int_0^\frac{\pi}{4}\ln(\tan t) -\int_0^{\arctan k}\ln (\tan t)dt$$
$$=-C+\frac12 \text{Cl}_2(\pi-\arctan k)+\frac12 \text{Cl}_2(\pi-2\arctan k)$$
$C$ is Catalan's constant and there is https://en.wikipedia.org/wiki/Clausen_function.
