Evaluate $\int \frac{dx}{(x^2-x+1)\sqrt{x^2+x+1}}$

Alternative approach: Using the substitution $x=(t-1)/(t+1)$ the integral is reduced to $$2\int\frac{t\,dt}{(t^2+3)\sqrt{1+3t^2}}+2\int\frac{dt}{(t^2+3)\sqrt{1+3t^2}}$$ For the first integral use the substitution $1/\sqrt{1+3t^2}=u$ and for the second one use $t/\sqrt{1+3t^2}=v$.

Update: The substitution used above is taken from my favorite Hardy's A Course of Pure Mathematics and is applicable to integrals of the form $$\int\frac{px+q} {(ax^2+2bx+c)\sqrt{Ax^2+2Bx+C}} \, dx$$ where $ax^2+2bx+c=0$ has complex roots (ie $b^2<ac$). The substitution to be used here is $$x=\frac{rt+s} {t+1}$$ where $r, s$ are roots of the quadratic equation $$(Ab-Ba)z^2-(Ca-Ac)z+(Bc-Cb)=0$$ The above equation will always have real roots. After performing the substitution the integral is reduced to the form $$\int \frac{Lt+M} {(\alpha t^2+\beta)\sqrt{\gamma t^2+\delta}} \, dt$$ which can be split into two integrals. The first of these is handled by using substitution $u=1/\sqrt{\gamma t^2+\delta}$ and for the second one the substitution $v=t/\sqrt{\gamma t^2+\delta } $ is used.