<s>[INST] $\int \frac{1}{x^2\sqrt{x^2+x+1}}\, dx$ How would one go about integrating $\int  \frac{1}{x^2\sqrt{x^2+x+1}}\, dx$
I tried rationalizing and then doing partial fractions but got something really ugly and IBP doesn't work too well either.
 [/INST] Let $x=\dfrac1u$ then
\begin{align}
I
&= \int\dfrac{-u}{\sqrt{u^2+u+1}}du \\
&=  -\int\dfrac{2u+1}{2\sqrt{u^2+u+1}}du+\dfrac12\int\dfrac{1}{\sqrt{(u+\frac12)^2+\frac34}}du \\
&= -\sqrt{u^2+u+1}+\dfrac12\operatorname{arcsinh}\dfrac{2u+1}{\sqrt{3}}+C \\
&= -\dfrac{\sqrt{x^2+x+1}}{x}+\dfrac12\operatorname{arcsinh}\dfrac{x+2}{x\sqrt{3}}+C
\end{align}
</s>