<s>[INST] Solving integral $ \int \frac{x+\sqrt{1+x+x^2}}{1+x+\sqrt{1+x+x^2}}\:\mathrm{d}x $ there is integral $$ \int \frac{x+\sqrt{1+x+x^2}}{1+x+\sqrt{1+x+x^2}}\:\mathrm{d}x$$
i am trying to separate this :
$$=\int \mathrm{d}x -\int \frac{\mathrm{d}x}{1+x+\sqrt{1+x+x^2}} $$ but have no idea about second
 [/INST] Decompose the integrand as follows
\begin{align}
&\int \frac{x+\sqrt{1+x+x^2}}{1+x+\sqrt{1+x+x^2}}dx\\
 =& \int \frac{2x+1}{2\sqrt{x^2+x+1}}+\frac1{2\sqrt{x^2+x+1}}+\frac1x\bigg(\frac1{\sqrt{x^2+x+1}}
-1\bigg)\ dx\\
= &\ \sqrt{x^2+x+1}+\frac12\sinh^{-1}\frac{2x+1}{\sqrt3}
-\ln \bigg(\frac x2+1+\sqrt{x^2+x+1}\bigg)+C
\end{align}
</s>