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,
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.