Calculate $\int \frac{1}{x^2+x+1} \, dx$ $$ \int \frac{1}{x^2+x+1}\,  dx = \int \frac{1}{(x+\frac 1 2)^{2} + \frac 3 4}\,  dx $$
Substitute $x+\frac 1 2 = u$, $dx = du$:
$$\int \frac 4 3 \frac{1}{\left(\frac{2u}{\sqrt 3}\right)^2+1} \, du = \frac 4 3 \int \frac{1}{\left(\frac{2u}{\sqrt 3}\right)^2+1} \, du$$
Substitute: $s = \frac{2u}{\sqrt 3}$, $du = \frac{\sqrt{3}}{2}ds$
$$\frac 4 3 \frac{\sqrt 3}{2}\int \frac{1}{s^2+1} \, ds$$
After multiplying and substituting back, we get the solution:
$$\frac{2}{\sqrt 3}\arctan\left(\frac{2x+1}{\sqrt 3}\right)$$
In a book I have however, this integral is evaluated as $\sqrt 3 \arctan\left(\frac{2x+1}{\sqrt 3}\right)$.
Which solution is right, and if the book's, how did the authors arrived to it?

What you did is fine. The book, on the other hand…
