TITLE: How to solve the improper integral $\int_{-\infty}^{\infty} \frac{x^2}{x^6+9}dx$ (possible trig substitution)
QUESTION [4 upvotes]: $$\int_{-\infty}^{\infty} \frac{x^2}{x^6+9}dx$$ I'm a bit puzzled as how to go about solving this integral. I can see that it isn't undefined on -infinity to infinity. But I just need maybe a hint on how to go about solving the problem.

REPLY [2 votes]: With complex analysis: define the complex function
$$f(z)=\frac{z^2}{z^6+9}\;\;,\;\;\text{with simple poles at}\,\,\,z_k:=\sqrt[6] 9\,\,e^{\frac{\pi i}{6}(1+2k)}\;\;,\;k=0,1,2,3,4,5$$
Note that the only poles on the upper half plane are the first three ones $\,z_0,\,z_1,\,z_2\,$ , with residues
$$Res_{z=z_0}(f)=Res_{z=z_2}(f)=-\frac{i}{18}\;\;,\;\;\;Res_{z=z_1}(f)=\frac{i}{18}$$
Choosing the contour
$$C_R:=[-R,R]\cup\gamma_R:=\{z\in\Bbb C\;;\;|z|=R\,,\,\Im (z)\ge 0\}$$
we get, by Cauchy's Integral Theorem, that
$$(**)\;\;\;\;\;\;\;2\pi i\left(\sum_{k=0}^2 Res_{z=z_k}(f)\right)=\frac{\pi}{9}=\oint_{C_R}f(z)\,dz=\int\limits_{-R}^Rf(x)\,dx+\int\limits_{\gamma_R} f(z)\,dz$$
But
$$\left|\int\limits_{\gamma_R} f(z)\,dz\right|\le\max_{z\in \gamma_R}\frac{|z|^2}{|z^6+9|}\pi R\le\frac{\pi R^3}{R^6-9}\xrightarrow[R\to\infty]{}0$$
Thus passing to the limit in (**) above we get
$$\int\limits_{-\infty}^\infty\frac{x^2}{x^6+9}dx=\frac{\pi}{9}$$
{"set_name": "stack_exchange", "score": 4, "question_id": 318983}