Evaluate: $\int \frac{\mathrm{d}x}{x\sqrt{x^2+x+1}}$ 
Evaluate
  $$
  \int \frac{\mathrm{d}x}{x\sqrt{x^2+x+1}} \cdotp
$$

My attempt: 
$$
    I
  = \int \frac{\mathrm{d}x}{x\sqrt{x^2+x+1}}
  = \int \frac{\mathrm{d}x}{x\sqrt{\left(x + \frac{1}{2}\right)^2 + \left( \frac{\sqrt{3}}{2} \right)^2}}
$$
I thought completing the square would bring the integrand into some form, but it did not. Please help.
 A: Hint: I know a way.  The integral of form $$\int\frac{dx}{(x-n)^m\sqrt{ax^2+bx+c}}$$ could be solved by taking $x-n=1/t.$. If you do this, then the whole integral will change to a integral of form $\int\frac{P(x)dx}{\sqrt{ax^2+bx+c}}$. Try this. Tell me if you can do the last one or not.
A: First use the substitution $x=\frac{1}{t}$ to get
$$\int \frac{\mathrm{d}x}{x\sqrt{x^2+x+1}} =-\int \frac{\mathrm{d}t}{\sqrt{1+t+t^2}}.$$
Now complete the squares and use a tan substitution.
A: For integrals of the form $$\dfrac1{(x+a)\sqrt{(x+b)^2+c^2}},$$
Choose $x+b= c
\tan y,$ to reach  at an integral of the form $$\dfrac1{A\cos y+B\sin y}$$
Now $A\cos y+B\sin y=\sqrt{A^2+B^2}\sin (y+\arctan \dfrac AB)=\sqrt{A^2+B^2}\cos(y-\arctan\dfrac AB)$
A: Try $x=1/t$. The integrand reduces to a known form. 
A: $$I=\class{steps-node}{\cssId{steps-node-1}{2}}{\displaystyle\int}\dfrac{1}{x\sqrt{\left(2x+1\right)^2+3}}\,\mathrm{d}x$$
Substitute $u=2x+1$
$$I=2{\displaystyle\int}\dfrac{1}{\left(u-1\right)\sqrt{u^2+3}}\,\mathrm{d}u$$
Substitute $u=\sqrt{3}\tan\left(v\right)$ 
$$I=2{\displaystyle\int}\dfrac{\sqrt{3}\sec^2\left(v\right)}{\left(\sqrt{3}\tan\left(v\right)-1\right)\sqrt{3\tan^2\left(v\right)+3}}\,\mathrm{d}v$$
$$I=2{\displaystyle\int}\dfrac{\tan^2\left(\frac{v}{2}\right)+1}{\left(1-\tan^2\left(\frac{v}{2}\right)\right)\left(\frac{2\cdot\sqrt{3}\tan\left(\frac{v}{2}\right)}{1-\tan^2\left(\frac{v}{2}\right)}-1\right)}\,\mathrm{d}v$$
Substitute $w=\tan\left(\dfrac{v}{2}\right)$
$$I=\class{steps-node}{\cssId{steps-node-2}{4}}{\displaystyle\int}\dfrac{1}{w^2+2\cdot\sqrt{3}w-1}\,\mathrm{d}w$$
$$I=4{\displaystyle\int}\dfrac{1}{\left(w+\sqrt{3}-2\right)\left(w+\sqrt{3}+2\right)}\,\mathrm{d}w$$
