# Compute the integral using the residue theorem: $\int_{-\infty}^\infty \frac{x^2}{x^6 + 1}dx$.

Compute the integral using the residue theorem: $\int_{-\infty}^\infty \frac{x^2}{x^6 + 1}dx$.

If we let $\gamma_R$ be the line from $-R$ to $R$, and $\gamma_C$ be the upper half circle, and integrate ccw, we have

$$\int_{\gamma_C \cup \gamma_R} \frac{x^2}{x^6+1}dx = \int_{-R}^R \frac{x^2}{x^6+1}dx + \int_{\gamma_C}\frac{x^2}{x^6 + 1}dx.$$

Now, I need to calculate the residues of the LHS. But it seems really difficult! I see that the poles in our contour are at $x_1 = e^{\pi/6}$, $x_2 = e^{3\pi/6}$, $x_3 = e^{5\pi/6}$. Now, here is where I am getting lost:

We have $\text{res}_{x_1} = \lim_{x\to e^{\pi/6}} (x-e^{\pi/6})\frac{x^2}{x^6 + 1}.$ But if I try to split up the $x^6 + 1$ in the bottom of the fraction here, I get a bunch of terms $(x-e^{3\pi/6})(e-e^{5\pi/6})...$ etc., and that seems very messy to calculate for each pole! Is there an easier/cleaner way to do this?

• Now you want to use the residue theorem, but you know that $\int \frac{x^2}{1+x^6}\,dx=\frac{1}{3}\arctan(x^3)+C$, right? Commented Sep 22, 2015 at 17:58

If you have $f(z)/g(z)$ with a simple pole in $a\in\mathbb{C}$, the residue in $a$ is simply $$\frac{f(a)}{g'(a)}.$$

Proof: since $g(a)=0$ the residue is $$\lim_{z\to a} \frac{f(z)}{g(z)}(z-a)=\lim_{z\to a}f(z)\frac{z-a}{g(z)-g(a)}$$

So in your case the residue is $\frac{a^2}{6a^5}=\frac{1}{6}a^{-4}$ and now substitute the correct values of $a$.

• This is such a great answer! Thank you! This helps me solve this problem, as well as many others of this form. Commented Sep 22, 2015 at 17:21

A simple alternative to the residue theorem is given by considering that:

$$\int_{-\infty}^{+\infty}\frac{x^2}{1+x^6}\,dx = 2\int_{0}^{+\infty}\frac{x^2}{1+x^6}\,dx = 4\int_{0}^{1}\frac{x^2}{1+x^6}\,dx\tag{1}$$ and: $$\begin{eqnarray*} \int_{0}^{1}\frac{x^2}{1+x^6}\,dx &=& \frac{1}{3}-\frac{1}{9}+\frac{1}{15}-\ldots\\ &=& \frac{1}{3}\left(\frac{1}{1}-\frac{1}{3}+\frac{1}{5}-\ldots\right)\\&=&\frac{\arctan(1)}{3}=\frac{\pi}{12},\tag{2}\end{eqnarray*}$$ hence the original integral equals $\large\color{red}{\frac{\pi}{3}}.$

• And more generally, with this method, $$\int_0^\infty \dfrac{x^n}{1+x^{2n+2}}\; dx = \dfrac{\pi}{2n+2}$$ Commented Sep 22, 2015 at 17:19
• Thank you so much for writing this up! This is quite pretty and simple. I've accepted the other answer, because the problem statement specifically asks us to use the residue theorem, but I am really grateful to see this method, as well. Commented Sep 22, 2015 at 17:23

The substitution $u=x^3$ solves the problem immediately, the solution is longer than it needs as I want to make the substitution in a proper integral, but it boils down to $\int_{-\infty}^{+\infty}\frac{x^2}{1+x^6}\,dx =\frac{1}{3} \int_{-\infty}^{+\infty}\frac{du}{1+u^2}$ :)

$$\int_{-\infty}^{+\infty}\frac{x^2}{1+x^6}\,dx = \lim_{R_1,R_2} \int_{-R_2}^{R_1}\frac{x^2}{1+x^6}\,dx = \frac{1}{3} \lim_{R_1,R_2} \int_{-R_2^3}^{R_1^3}\frac{du}{1+u^2}\\=\frac{1}{3} \lim_{R_1,R_2} (\arctan(R_2^3)+\arctan(R_1^3))=\frac{1}{3}(\frac{\pi}{2}+\frac{\pi}{2})=\frac{\pi}{3}$$

One other idea to make your life easier. By using a different contour, you can simplify the calculation. For example, consider

$$\oint_C dz \frac{z^2}{1+z^6}$$

where $C$ is now a wedge of angle $\pi/3$ in the 1st quadrant of radius $R$. Thus, we may write the contour integral as

$$\int_0^R dx \frac{x^2}{1+x^6} + i R \int_0^{\pi/3} d\theta\, e^{i \theta} \frac{R^2 e^{i 2 \theta}}{1+R^6 e^{i 6 \theta}} + e^{i \pi/3} \int_R^0 dt \frac{e^{i 2 \pi/3} t^2}{1+t^6}$$

Note why I chose the contour to have an angle of $\pi/3$: so that the denominator of the integrand is unchanged over the different parts of the contour.

You can easily show that the second integral vanishes as $R \to \infty$.

Now, we may invoke the residue theorem. Note the benefit to this contour: the only pole contained in this contour is at $z=e^{i \pi/6}$. Thus, we may write

$$\int_0^{\infty} dx \frac{x^2}{1+x^6} - \int_{\infty}^0 dt \frac{t^2}{1+t^6}= i 2 \pi \frac{e^{i 2 \pi/6}}{6 e^{i 5 \pi/6}}$$

or

$$2 \int_0^{\infty} dx \frac{x^2}{1+x^6} = \int_{-\infty}^{\infty} dx \frac{x^2}{1+x^6}= \frac{\pi}{3}$$