<s>[INST] 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.
 [/INST] 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)$
</s>