Compute the integral $\int\frac{dx}{(x^2-x+1)\sqrt{x^2+x+1}}$ 
Compute the indefinite integral
  $$
\int\frac{dx}{(x^2-x+1)\sqrt{x^2+x+1}}
$$

My Attempt:
$$
\int\frac{dx}{(x^2-x+1)\sqrt{x^2+x+1}}=\int\frac{1}{(x^2-x+1)^{3/2}.\sqrt{\dfrac{x^2+x+1}{x^2-x+1}}}\,dx
$$
Now define $t$ such that $t^2=\dfrac{x^2+x+1}{x^2-x+1}$ to get
$$
\begin{align}
2t\,dt &= \frac{(x^2-x+1)(2x+1)-(x^2+x+1)\cdot (2x-1)}{(x^2-x+1)^2}\,dx\\
2tdt &= \frac{-4x^2+2x+2}{(x^2-x+1)^2}dx
\end{align}
$$
I don't know how to proceed from here.
 A: Instead of the Euler substitution we can use the following technique adapted
from a general procedure explained in 2.252 of Table of Integrals,
Series, and Products by I.S. Gradshteyn and I.M. Ryzhik, 7th. ed.
The substitution 
\begin{equation*}
x=\frac{1-t}{t+1},\quad dx=-\frac{2}{\left( t+1\right) ^{2}}dt,\quad t=-%
\frac{x-1}{x+1}
\end{equation*}
reduces the given integral
\begin{equation*}
I=\int \frac{dx}{(x^{2}-x+1)\sqrt{x^{2}+x+1}}
\end{equation*}
to the sum of the two integrals 
\begin{equation*}
I=-2\int \frac{t}{\left( 3t^{2}+1\right) \sqrt{t^{2}+3}}dt-2\int \frac{1}{
\left( 3t^{2}+1\right) \sqrt{t^{2}+3}}dt.
\end{equation*}
The first integral can be evaluated by the substitution
\begin{equation*}
u=\sqrt{t^{2}+3},
\end{equation*}
while the second one is integrable by the substitution
\begin{equation*}
v=\frac{t}{\sqrt{t^{2}+3}}.
\end{equation*}
Both substitutions transform the integrands into simple rational fractions as follows
\begin{eqnarray*}
I_{1} &=&-2\int \frac{t}{\left( 3t^{2}+1\right) \sqrt{t^{2}+3}}dt=-2\int 
\frac{1}{-8+3u^{2}}\,du,\qquad u=\sqrt{t^{2}+3} \\
&=&\frac{\sqrt{6}}{6}\operatorname{arctanh}(\frac{\sqrt{6}}{4}u) \\
I_{2} &=&-2\int \frac{1}{\left( 3t^{2}+1\right) \sqrt{t^{2}+3}}dt=-2\int 
\frac{1}{8v^{2}+1}\,dv,\qquad v=\frac{t}{\sqrt{t^{2}+3}} \\
&=&-\frac{\sqrt{2}}{2}\arctan (2\sqrt{2}v) \\
I &=&I_{1}+I_{2}=\frac{\sqrt{6}}{6}\operatorname{arctanh}\frac{\sqrt{6}\sqrt{t^{2}+3}
}{4}-\frac{\sqrt{2}}{2}\arctan \frac{2\sqrt{2}t}{\sqrt{t^{2}+3}}+C.
\end{eqnarray*}
We finally get
\begin{equation*}
I=\frac{\sqrt{6}}{6}\operatorname{arctanh}\frac{\sqrt{6}\sqrt{x^{2}+x+1}}{2\left(
x+1\right) }+\frac{\sqrt{2}}{2}\arctan \frac{\sqrt{2}\left( x-1\right) }{
\sqrt{x^{2}+x+1}}+C.
\end{equation*}
A: According to http://en.wikipedia.org/wiki/Euler_substitution, this integral can have these four approaches to solve:
Approach $1$: 
Let $u=x+\sqrt{x^2+x+1}$ ,
Then $x=\dfrac{u^2-1}{2u+1}$
$dx=\dfrac{2u(2u+1)-(u^2-1)2}{(2u+1)^2}du=\dfrac{2u^2+2u+2}{(2u+1)^2}du$
$\therefore\int\dfrac{dx}{(x^2-x+1)\sqrt{x^2+x+1}}$
$=\int\dfrac{\dfrac{2u^2+2u+2}{(2u+1)^2}}{\left(\left(\dfrac{u^2-1}{2u+1}\right)^2-\dfrac{u^2-1}{2u+1}+1\right)\left(u-\dfrac{u^2-1}{2u+1}\right)}du$
$=\int\dfrac{\dfrac{2u^2+2u+2}{(2u+1)^2}}{\dfrac{(u^2-1)^2-(u^2-1)(2u+1)+(2u+1)^2}{(2u+1)^2}\times\dfrac{u^2+u+1}{2u+1}}du$
$=2\int\dfrac{2u+1}{u^4-2u^3+u^2+6u+3}du$
Other approaches are similar.
