Integral of $\frac{1}{x^2+x+1}$ and$\frac{1}{x^2-x+1}$ How to integrate two very similar integrals. I am looking for the simplest approach to that, it cannot be sophisticated too much as level of the textbook this was taken from is not very high. $$\int \frac{1}{x^2+x+1} dx$$ and$$\int \frac{1}{x^2-x+1} dx$$

For the first one write $x^2 + x + 1 = (x + 1/2)^2 + 3/4$ and the second one $x^2 - x + 1 = (x - 1/2)^2 + 3/4$ these both are arctan 
