# Very tricky complex integral, with poles on both sides of the real line,

I am trying to evaluate$$\int_{-\infty}^{\infty} \frac {x^2 -x^4}{1-x^6}\,dx,$$

which is an old exam problem. There is a special note on this problem that reads:

Note:

Your answer need not be a simple expression; it suffices to give the answer as a finite sum of terms of the form $\large \frac{z_1…z_m}{w_1…w_n}$ where the $z_i$'s and $w_i$'s are nonzero.

Some ideas:

Simplifying the numerator, using difference of squares, getting $(x-x^2)(x+x^2)$ doesn't appear to help.

The integrand has 6 simple poles; I have found all of them. The problem? There is a pole at $-1$ and at $+1$ -- on both sides of the real line. This makes choosing a contour problematic. I may need an upper-semicircular contour, and use semi-circular indents to avoid the poles on the real line, but perhaps there is a better approach.

Another idea is to first make a change of variable $y=x^2$. This also doesn't appear to make things any simpler or more insightful.

A last idea is to try to use a wedge contour to minimize computation of residues, i.e., choose a wedge that encloses as few poles as possible. However this wedge will still have to include at least the positive real axis - and then perhaps integrate and use the evenness of the integrand to account for computation along all of $R$. But still the problem remains: there is a pole on the positive real axis.

Any hints, comments or suggestions are welcome.

Thanks,

• The answer is $\pi/\sqrt{3}$. I will try to post an answer shortly. – user4571 Dec 9 '15 at 6:48
• Hi @Patrick, thanks so much for your quick response - I welcome your solution and will take a peak at it, as needed, as I try to work out a solution on my own. Any hints on how I can get started? Perhaps...a choice of contour? The poles on $R$ is tricky to deal with. What do you think? Thanks, – User001 Dec 9 '15 at 6:51
• Note that $x^2-1$ divides $x^6-1$, so there aren't actually poles at $\pm 1$! – user4571 Dec 9 '15 at 6:53
• ...so cool, @Patrick :-) – User001 Dec 9 '15 at 6:59
• @NormalHuman, is "very tricky" good for you in the title? – Aditya Agarwal Dec 9 '15 at 7:09

It turns out that $x^2-1$ divides $x^6-1$, so there aren't actually poles at $\pm 1$. So you really want to evaluate something like $$\int_{\mathbb R} \frac{x^2\, dx}{x^4+x^2+1}.$$

Now you can just sum the residues in the upper half-plane as usual. (They're at the $6$th roots of unity that aren't $\pm1$, so there are two of them you need to get at.) I got $\frac{\pi}{\sqrt{3}}$ as the answer, which a quick WolframAlpha query confirms.

• Hi @Patrick, do you mind showing how $x^2-1$ divides $x^6-1$? My work currently is: I am looking at the complexified integral, since then I know the polynomial in the denominator must split into linear factors. It has form $(z-z_1)...(z-z_6)$ where the $z_i$'s are the zeroes of the polynomial. Now I can cancel the $(z-1)(z+1)$ factors from top and bottom of the integrand. However, it seems like you have done all of the algebra ... in the real variables setting, before looking at the complex contour integration. – User001 Dec 9 '15 at 7:58
• But in the real variable setting, the polynomial may not split. What do you think? Thanks @Patrick, – User001 Dec 9 '15 at 7:58
• @LebronJames We don't need the polynomial to split, we just need $x^2-1$ to divide it. You can verify this with the usual division algorithm for polynomials (which makes no use of complex numbers!). – user4571 Dec 9 '15 at 8:00
• Hi @Patrick - I arrived at the same answer as you. And no wonder the problem statement says it suffices to put the answer in that special form - the simplification process for this problem was extremely tedious. Thanks again have a great night :-) – User001 Dec 9 '15 at 9:34

Notice, $$\int_{-\infty}^{\infty}\frac{x^2-x^4}{1-x^6}\ dx=\lim_{b\to \infty}\int_{-b}^{b}\frac{x^2-x^4}{1-x^6}\ dx$$ $$=2\lim_{b\to \infty}\int_{0}^{b}\frac{x^2(1-x^2)}{(1-x^2)(x^4+x^2+1)}\ dx$$ $$=2\lim_{b\to \infty}\int_{0}^{b}\frac{x^2}{x^4+x^2+1}\ dx$$ $$=\lim_{b\to \infty}\int_{0}^{b}\frac{2}{x^2+\frac{1}{x^2}+1}\ dx$$ $$=\lim_{b\to \infty}\int_{0}^{b}\frac{\left(1+\frac{1}{x^2}\right)+\left(1-\frac{1}{x^2}\right)}{x^2+\frac{1}{x^2}+1}\ dx$$

$$=\lim_{b\to \infty}\int_{0}^{b}\frac{\left(1+\frac{1}{x^2}\right)\ dx}{\left(x-\frac{1}{x}\right)^2+3}+\lim_{b\to \infty}\int_{0}^{b}\frac{\left(1-\frac{1}{x^2}\right)\ dx}{\left(x+\frac{1}{x}\right)^2-1}$$

$$=\lim_{b\to \infty}\int_{0}^{b}\frac{d\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^2+(\sqrt 3)^2}+\lim_{b\to \infty}\int_{0}^{b}\frac{d\left(x+\frac{1}{x}\right)}{\left(x+\frac{1}{x}\right)^2-1^2}$$

$$=\lim_{b\to \infty}\frac{1}{\sqrt 3}\tan^{-1}\left(\frac{x-\frac{1}{x}}{\sqrt 3}\right)\biggm|_0^{b}+\lim_{b\to \infty}\frac{1}{2}\ln\left|\frac{x+\frac{1}{x}-1}{x+\frac{1}{x}+1}\right|\biggm|_{0}^b$$ $$=\frac{1}{\sqrt3}(\pi)+0=\color{red}{\frac{\pi}{\sqrt 3}}$$

the two non-removable singularities in the upper half-plane are the simple poles located at $\frac{\pm 1 +i\sqrt{3}}2$ which we may write as $a,a^2$. we require the residues $r(a),r(a^2)$ of $-\frac{x^2-x^4}{x^6-1}=\frac{-x^2(1-x^2)}{\prod_{k=0}^5 (x-a^k)}$

so $$-r(a) = \frac{a^2(1-a^2)}{(a-1)(a-a^2)(a-a^3)(a-a^4)(a-a^5)}$$ since $a^3=-1$ and $a(a-a^5)=a^2-1$ this gives $-r(a)=\frac1{2(1-a)^2(1-a^2)}$ and $$-r(a^2) = \frac{a^4(1-a^4)}{(a^2-1)(a^2-a)(a^2-a^3)(a^2-a^4)(a^2-a^5)} \\ =-\frac{1+a^2}{2(1-a)^2(1-a^2)}$$ thus: $$-r(a)-r(a^2) = \frac{-a^2}{2(1-a)^2(1-a^2)}= \frac12\frac{-a}{(1-a)^2}\frac1{a^{-1}-a}\\$$ now $a^{-1}-a=\frac{1-i\sqrt{3}}2 -\frac{1+i\sqrt{3}}2 = -i\sqrt{3}$, and $(1-a)^2=1-2a+a^2= (1-a+a^2)-a=-a$ (since $a$ is a primitive sixth root of unity) so $$2\pi i\left(r(a)+r(a^2)\right) = \frac{-2\pi i}{-2i\sqrt{3}} \\ =\frac{\pi}{\sqrt{3}}$$


$$\color{#f00}{\int_{-\infty}^{\infty}{x^{2} - x^{4} \over 1 - x^{6}}\,\dd x} = \color{#f00}{\pi \over \root{3}}$$