Solving integral depending on $a$ So the problem I have is with this integral: $$\int_{-\infty}^{\infty}\frac{1}{(x^2+x+1)^a}\,\mathrm dx, a > 0$$ I tried with factoring but didn't get anywhere. Some hint? Could any trick be applied here?
 A: By letting $x=\frac{\sqrt{3}\tan\theta-1}{2}$ we turn the original integral into
$$\frac{\sqrt{3}}{2}\left(\frac{4}{3}\right)^{a}\int_{-\pi/2}^{\pi/2}\cos(\theta)^{2a-2}\,d\theta =\color{red}{\frac{2\pi\sqrt{3}}{3^a}\binom{2a-2}{a-1}}.$$
A: The denominator's roots are at $x_{\pm}=-\frac{1}{2} \pm \frac{\sqrt{3}}{2}i$. For the residue theorem, we want to enclose $1$ pole with a half circle. If we pick $x_+$, the circle will be in the upper half, and it will only enclose the pole at $x_+$. We can rewrite your function as
$$f(x)=\frac{1}{(x^2+x+1)^a}=\frac{(x-x_-)^{-a}}{(x-x_+)^a}$$
And if $a \in \mathbb{N}$, and it's big enough for the integral of semicircle to vanish, the integral will just be the residue of $f$ at $x_+$:
$$\int_{-\infty}^{\infty}f=2i \pi \text{Res}(f, x_+)$$
And the residue is:
$$\text{Res}(f, x_+)=\frac{1}{(a-1)!}\frac{\mathrm{d}^{a-1}}{\mathrm{d}x^{a-1}}\left((x-x_+)^af(x)\right)_{x=x_+}$$
$$\text{Res}(f, x_+)=\frac{1}{(a-1)!}\frac{\mathrm{d}^{a-1}}{\mathrm{d}x^{a-1}}\left((x-x_-)^{-a}\right)_{x=x_+}$$
Differentiating it $a-1$ times we can get that:
$$\text{Res}(f, x_+)=\frac{1}{(a-1)!}(-a)(-a-1)\dots(-a-(a-1)+2)(x_+-x_-)^{-a-(a-1)}$$
$$\text{Res}(f, x_+)=\frac{1}{(a-1)!}(-1)^{a-1}(a)(a+1)\dots(2a-2)(x_+-x_-)^{-2a+1}$$
And because $x_+-x_-=\sqrt{3}i$:
$$\text{Res}(f, x_+)=\frac{1}{(a-1)!}(-1)^{a-1}(a)(a+1)\dots(2a-2)(\sqrt{3}i)^{-2a+1}$$
$$\text{Res}(f, x_+)=\frac{1}{(a-1)!}(-1)^{a-1}(a)(a+1)\dots(2a-2)\frac{\sqrt{3}i}{(\sqrt{3}i)^{2a}}$$
$$\text{Res}(f, x_+)=\frac{1}{(a-1)!}(-1)^{a-1}(a)(a+1)\dots(2a-2)\frac{\sqrt{3}i}{3^a (i)^{2a}}$$
$$\text{Res}(f, x_+)=\frac{1}{(a-1)!}(-1)^{a-1}(a)(a+1)\dots(2a-2)\frac{\sqrt{3}i}{3^a (-1)^{a}}$$
$$\text{Res}(f, x_+)=-\frac{1}{(a-1)!}(a)(a+1)\dots(2a-2)\frac{\sqrt{3}i}{3^a }$$
So the integral is:
$$\int_{-\infty}^{\infty}f=2i \pi \text{Res}(f, x_+)$$
$$\int_{-\infty}^{\infty}f=2i \pi \left(-\frac{1}{(a-1)!}(a)(a+1)\dots(2a-2)\frac{\sqrt{3}i}{3^a }\right)$$
$$\int_{-\infty}^{\infty}f=2 \pi \frac{1}{(a-1)!}(a)(a+1)\dots(2a-2)\frac{\sqrt{3}}{3^a}$$
And from a little comparision with Jack D'Aurizio's answer, and with the verification of WolframAlpha, we can rewrite the product as:
$$\int_{-\infty}^{\infty}f=2 \pi \binom{2a-2}{a-1}\frac{\sqrt{3}}{3^a}$$
