Calculation of a hard integral $\int^{1/2}_0\frac{1}{x^2-x+1} \ln\frac{1+x}{1-x}\,dx $ Calculate
$$\int^{1/2}_0\frac{1}{x^2-x+1} \cdot \ln\frac{1+x}{1-x}\,dx $$
I tried to subsitute $x=1/2-t$ so $dx=-dt$ but I just complicated more my problem.
 A: Substitute $t=\frac{1-x}{1+x}$
\begin{align}
&\int^{1/2}_0\frac{1}{x^2-x+1} \ln\frac{1+x}{1-x}\,dx \\
=&-2\int_{\frac13}^1 \frac{\ln t}{1+3t^2}dt
\overset{\sqrt3t\to t}= -\frac2{\sqrt3} \int_{\frac1{\sqrt3}}^{\sqrt3} \frac{\ln t-\ln\sqrt3}{1+t^2}dt\\
=& \frac{\ln 3}{\sqrt3} \int_{\frac1{\sqrt3}}^{\sqrt3} \frac{1}{1+t^2}dt = \frac{\pi\ln3}{6\sqrt3}
\end{align}
Note $\int_{\frac1{\sqrt3}}^{\sqrt3} \frac{\ln t}{1+t^2}dt \overset{t\to\frac1t} =0$
A: Mathematica gives:
$$\frac{\pi  \log \left(\frac{9}{8}\right)-3 i \left(\text{Li}_2\left(-\frac{1}{2}
   (-1)^{2/3}\right)+\text{Li}_2\left(\frac{1}{1-\sqrt[3]{-1}}\right)-\text{Li}_2\left(\frac{1}{1+\sqrt[3]{-1}}\right)+\text{Li}_2\left(\frac{1}{1-(-1)^{2/3}}\right)-\text{Li}
   _2\left(\frac{1}{1+(-1)^{2/3}}\right)+\text{Li}_2\left(\frac{3}{4}-\frac{i
   \sqrt{3}}{4}\right)-\text{Li}_2\left(\frac{1}{4}+\frac{i
   \sqrt{3}}{4}\right)-\text{Li}_2\left(\frac{3}{4}+\frac{i \sqrt{3}}{4}\right)\right)}{3
   \sqrt{3}}$$
which suggests you have a lot of work ahead of you if you want to do this by hand.
A: This is quit easy if you are not afraid to use complex numbers. I will focus on the indefinite integral first. First note that $$x^2-x+1=(x-e^{i\pi/3})(x-e^{-i\pi/3})$$ (two purely complex roots of $-1$) and hence $$\dfrac{1}{x^2-x+1}=\dfrac{\sqrt{3}i}{3(x-e^{-i\pi/3})}-\dfrac{\sqrt{3}i}{3(x-e^{i\pi/3})}.$$ Since $$\ln\left(\dfrac{1+x}{1-x}\right)=\ln(1+x)-\ln(1-x)$$ We can easily split the given integral into four simple integrals of the form $$\displaystyle\int\dfrac{\ln (1\pm x)}{x-e^{\pm i\pi/3}}\,dx$$ and you can easily use dilogarithm to solve each of them respectively.
Added: In general, $$\displaystyle\int\dfrac{\ln(x-a)}{(x-b)}\, dx=\operatorname{Li}_2\left(\dfrac{a-x}{a-b}\right)+\ln(x-a)\ln\left(\dfrac{x-b}{a-b}\right)+C.$$
