What is the trick needed to compute the integral $\int \frac{1}{x^{2}+x+1} dx$? Working through Spivak's Calculus and using old assignments from the course offered at my school I'm working on the following problem, asking me to find the integral $$\int \frac{1}{x^{2}+x+1} dx$$
Looking through Spivak and previous exercises I worked on, I thought using a partial fraction decomposition would be the technique, but even in Spivak the only exercises I've seen which are similar involve:
$$\int \frac{1}{(x^{2}+x+1)^{n}} dx\ ,\text{where}\ n> 1$$
In which case it is pretty straightforward to solve. So there must be a reason why the exercise isn't presented unless it is so straightforward.
Integration by parts and substitution (at least for now) have proven fruitless as well. So I come here to ask if I'm missing any special trick to compute this integral ?

$\int \frac{1}{(x+1/2)^2 + 3/4} dx= \frac{2}{\sqrt3}\tan^{-1}\frac{2x+1}{\sqrt3} +c$
