I have to calculate:
$$\int \sqrt{x^2+x+2} \, dx$$
I have tried Euler substitutions. It lead me to polynomial:
$$\int 2\left(\frac{-t^2 + t -2}{1-2t}\right)^2 \, dx$$
Maybe I made a mistake somewhere but this looks ugly to me. There have to be a better method.
I tried to integrate by parts. It lead me to:
$$x\sqrt{x^2+x+2} - \frac{1}{2} \int \frac{2x^2+x}{\sqrt{x^2+x+2}} \, dx$$
Unfortunatelly I can't solve $\int \frac{2x^2+x}{\sqrt{x^2+x+2}} \, dx$.
Could you help me to get few steps further?
Thank you for your time.
Integrate by parts, instead, as follows \begin{align} I&=\int \sqrt{x^2+x+2} \ d(x+\frac12)\\ &=(x+\frac12)\sqrt{x^2+x+2} - \int \frac{(x+\frac12)^2}{\sqrt{x^2+x+2}} \, dx\\ &=(x+\frac12)\sqrt{x^2+x+2} -I+\frac74 \int \frac{1}{\sqrt{x^2+x+2}} \, dx\\ &= \frac12 (x+\frac12)\sqrt{x^2+x+2} +\frac78\sinh^{-1}\frac{2x+1}{\sqrt7}+C \end{align}