Evaluate $\int \frac{dx}{(x^2-x+1)(\sqrt{x^2+x+1})}$ Evaluate $$I=\int \frac{dx}{(x^2-x+1)(\sqrt{x^2+x+1})}$$
My Try:
we have $x^2-x+1=(x+w)(x+w^2)$ where $w$ is complex cube root of unity
I have splitted $I$ as
$$I=AI_1+BI_2$$  where $A,B$ are some constants
$$I_1=\int \frac{dx}{(x+w)\sqrt{x^2+x+1}}$$
By taylor's series $$x^2+x+1=P(x+w)^2+Q(x+w)+R=(x+w)^2 \left(P+\frac{Q}{x+w}+\frac{R}{(x+w)^2}\right)$$ for some constants complex $P,Q,R$
hence
$$I_1=\int \frac{\frac{dx}{(x+w)^2}}{\sqrt{ \left(P+\frac{Q}{x+w}+\frac{R}{(x+w)^2}\right)}}=\int \frac{dt}{\sqrt{Rt^2+Qt+P}}$$  which is a standard Integral. Similar analysis for $I_2$.
Any other approach?
 A: Substituting
$$ x = \frac{\alpha + \beta t}{1 +t}$$  
we have:
$$ x^2- x+1 = \frac{(\alpha +\beta t)^2-(1+t)(\alpha +\beta t)+(1+t)^2}{(1+t)^2}$$
$$ x^2+x +1 = \frac{(\alpha +\beta t)^2+(1+t)(\alpha +\beta t)+(1+t)^2}{(1+t)^2}$$
Numbers $ \alpha, \beta $ we define like, that coefficients at $ t $ are zero.
Hence
$$ 2\alpha \beta - \alpha - \beta + 2 =0,\ \  2\alpha \beta +\alpha +\beta +2=0.$$
$$ \alpha = 1, \ \ \beta = -1.$$
We have
$$ x = \frac{1-t}{1+t}; \ \ dx = \frac{-2dt}{(1+t)^2};$$
$$ x^2 -x +1 = \frac{3t^2 +2}{1 + t^2};$$ 
$$\sqrt{x^2+x +1} =\frac{\sqrt{t^2+3}}{1+t}; \ \ 1+t>0. $$
$$I =-2\int \frac{(t+1)dt}{(3t^2+1)\sqrt{t^2+3}}= -2\int \frac{tdt}{(3t^2+1)\sqrt{t^2+3}} - 2\int \frac{dt}{(3t^2+1)\sqrt{t^2+3}} = I_{1} + I_{2}.$$
$$ I_{1} = -2\int \frac{tdt}{(3t^2+1)\sqrt{t^2+3}} = (\sqrt{t^2+3}= u) = 2\int \frac{du}{8 -3u^2} = \frac{1}{2\sqrt{6}}\ln \left| \frac{2\sqrt{2}+\sqrt{3}u}{2\sqrt{2}-\sqrt{3}u}\right| = \frac{1}{\sqrt{6}}\ln\left|\frac{2\sqrt{2}+\sqrt{3(t^2+3)}}{2\sqrt{2}- \sqrt{3(t^2+3)}}\right|=\frac{1}{\sqrt{6}}\ln\left|\frac{(1+x)\sqrt{2}+\sqrt{3(x^2+x+1)}}{\sqrt{x^2-x+1}}\right|.$$
$$ I_{2}=-2\int\frac{dt}{(3t^2+1)\sqrt{t^2+3}}=(\frac{t}{\sqrt{t^2+3}}=z)=-2 \int\frac{dz}{8z^2 +1} =-\frac{1}{\sqrt{2}}\arctan\left(\frac{2\sqrt{z}}{1}\right)= -\frac{1}{\sqrt{2}}\arctan\left(\frac{\sqrt{2}(1-x)}{\sqrt{x^2+x +1}}\right).$$
In the end
$$ I =\frac{1}{\sqrt{6}}\ln\left|\frac{(1+x)\sqrt{2}+\sqrt{3(x^2-x+1)}}{\sqrt{x^2-x+1}}\right| -\frac{1}{\sqrt{2}}\arctan\left(\frac{\sqrt{2}(1-x)}{\sqrt{x^2+x +1}}\right) + C.$$ 
