The integral is really easy but I am stuck on some steps:
$$\int_{-\infty}^{+\infty} \frac{dx}{(x^2+x+1)^2}$$
As it is improper integral with both upper and lower infinity limits I've rewritten it like:
$$\int_{-\infty}^{0} \frac{dx}{(x^2+x+1)^2} + \int_{0}^{+\infty} \frac{dx}{(x^2+x+1)^2}$$
So the solutions should be the same with differences in limits afterwards.
Take the first one and complete the square:
$$\int_{-\infty}^{0} \frac{dx}{(x^2+x+1)^2}$$ = $$\int_{-\infty}^{0} \frac{dx}{\left((x+\frac{1}{2})^2+\frac{3}{4}\right)^2}$$ What's the best way to proceed here? I was thinking of $$t = x +\frac{1}{2}$$
But it does not seem to be the most logical.
Well, when you substitute $\text{u}=x+\frac{1}{2}$:
$$\mathscr{I}:=\int_{-\infty}^\infty\frac{1}{\left(x^2+x+1\right)^2}\space\text{d}x=\int_{-\infty}^\infty\frac{1}{\left(\text{u}^2+\frac{3}{4}\right)^2}\space\text{d}\text{u}\tag1$$
Now, substitute $\text{s}=\arctan\left(\frac{2\cdot\text{u}}{\sqrt{3}}\right)$:
$$\mathscr{I}=\frac{8}{3\sqrt{3}}\int_{-\frac{\pi}{2}}^\frac{\pi}{2}\cos^2\left(\text{s}\right)\space\text{d}\text{s}\tag2$$