I am pretty sure that my answer is correct but given answer for the exercise from textbook Calculus James Steward was slightly different. Any idea to solve this:
$$\int\frac{x}{\sqrt{x^2+x+1}} \, dx$$
The given answers: $\sqrt{x^2+x+1}-\frac{1}{2}\ln(\sqrt{x^2+x+1}+x+\frac{1}{2})+c$
Thanks in advance.
$$x^2+x+1 = \left ( x+\frac12 \right )^2+\frac{3}{4} $$
$$\begin{align} \int dx \frac{x}{\sqrt{x^2+x+1}} &= \int dx \frac{x+\frac12}{\sqrt{\left ( x+\frac12 \right )^2+\frac{3}{4}}}-\frac12 \int dx \frac{1}{\sqrt{\left ( x+\frac12 \right )^2+\frac{3}{4}}}\end{align}$$