# Integral of $\int \frac{x+1}{(x^2+x+1)^2}dx$

I'm currently learning Calculus II and I have the following integral:

Integal of $\large{\int \frac{x+1}{(x^2+x+1)^2}dx}$

I've tried with partial fractions but it led nowhere, I've tried with substitution, but I failed again.

If it helps, I know the answer, but I don't know how to get to it.

Answer: $\large{\frac{1}{3}\frac{x-1}{x^2+x+1}} + \frac{1}{3}2\sqrt{3} \arctan{2x+1\sqrt{3}} + C$

• Try differentiating the answer to see how that derivative is a 'deconstruction' of the integrand. – Simon S Jun 24 '15 at 19:05

Hint:

\begin{align*} \int\frac{x+1}{(x^2+x+1)^2}dx&=\frac{1}{2}\int{\frac{2x+1}{(x^2+x+1)^2}}dx+\frac{1}{2}\int\frac{1}{(x^2+x+1)^2}dx\\ &=\frac{1}{2}\int\frac{d(x^2+x+1)}{(x^2+x+1)^2}+\frac{1}{2}\int{\frac{1}{\left[\left(x+\frac{1}{2}\right)^2+\frac{3}{4}\right]^2}}dx \end{align*} The last of these integrals can be found using the trigonometric sustitution $x+\frac{1}{2}=\frac{\sqrt{3}}{2}\tan t$.

HINT:

Write

$$x^2+x+1=\left(x+\frac12\right)^2+\frac34$$

so that $$\frac{x+1}{x^2+x+1}=\frac{\left(x+\frac12\right)+\frac12}{\left(x+\frac12\right)^2+\frac34}$$

Now substitute $(x+1/2)=\sqrt{3/4}\tan \theta$.