Compute integral $\int_{-\infty}^\infty \frac{x^4}{1+x^8} \, dx$

Solution 1:

HINTS

Integrate around the usual semi-circular contour $$C := \{x \in \mathbb{R} : -R \le x \le R\} \cup \{R\mathrm{e}^{\mathrm{i}t} : 0 \le t \le \pi \}$$

Your function has simple poles, for $n=0,1,2,\ldots,7$, at

$$z=\cos\left(\frac{\pi}{8}+\frac{\pi n}{4}\right) + \mathrm{i} \sin \left(\frac{\pi}{8}+\frac{\pi n}{4}\right)$$

You'll need to find the residues of those in the upper-half plane, i.e. within the above contour.

Apply Cauchy's Residue Theorem, take the limit $R \to \infty$, and show that the integral along the circular part of the arc tends to zero as $R$ tends towards infinity.

The key fact is that $\displaystyle{\oint_C \mathrm{f}(z)~\mathrm{d}z= \int_{-R}^R \mathrm{f}(x)~\mathrm{d}x + \int_0^{\pi}}\mathrm{f}\left(R\mathrm{e}^{\mathrm{i}t}\right) \cdot \mathrm{i}R\mathrm{e}^{\mathrm{i}t}~\mathrm{d}t$.

Once $R > 1$ we are clear of all of the poles and so the integral around $C$ does not change; let it equal $L$. If we can show that the integral around the circular arc tends to zero as $R \to \infty$ we have $$L = \lim_{R \to \infty}\oint_C \mathrm{f}(z)~\mathrm{d}z= \int_{-\infty}^{\infty} \mathrm{f}(x)~\mathrm{d}x+ 0$$

Solution 2:

Due to parity, $\displaystyle\int_{-\infty}^\infty\frac{x^4}{1+x^8}~dx=2\int_0^\infty\frac{x^4}{1+x^8}~dx.~$ In general, all integrals of the form

$\displaystyle\int_0^\infty\frac{x^{n-1}}{(1+x^m)^p}~dx$ are solved by letting $t=\dfrac1{(1+x^m)^p},~$ then recognizing the expression

of the beta function in the new integral, and lastly applying Euler's reflection formula for

the $\Gamma$ function, finally arriving at $I=\displaystyle\frac1m\cdot B\bigg(p-\frac nm~,~\frac nm\bigg),~$ which for $p=1$ becomes

$\dfrac\pi m\cdot\csc\bigg(n\dfrac\pi m\bigg),~$ where $\csc x=\dfrac1{\sin x}~.~$ By replacing m and n, and taking into account

the fact that $\sin x=\sin(\pi-x)$, we ultimately get the desired result.

Solution 3:

As an alternative, integrate over a wedge contour in the first quadrant of radius $R$ and angle $\pi/4$. This contour encloses only one simple pole (at $z=e^{i \pi/8}$), so application of the residue theorem is simplified.

The contour integral is

$$\int_0^R dx \frac{x^4}{1+x^8} + i R \int_0^{\pi/4} d\theta \, e^{i \theta} \frac{R^4 e^{i 4 \theta}}{1+R^8 e^{i 8 \theta}} + e^{i \pi/4} \int_R^0 dt \frac{-t^4}{1+t^8}$$

I leave it to the reader to show that the second integral in fact vanishes as $R \to \infty$. Thus, by the residue theorem we have

$$\left (1+e^{i \pi/4} \right ) \int_0^{\infty} dx \frac{x^4}{1+x^8} = i 2 \pi \frac{e^{i 4 \pi/8}}{8 e^{i 7 \pi/8}}$$

Then,

$$\int_0^{\infty} dx \frac{x^4}{1+x^8} = 2 \pi \frac{e^{i \pi/8}}{8(1+e^{i \pi/4})} = \frac{\pi}{8\cos{(\pi/8)}} = \frac{\pi}{8\sin{(3\pi/8)}} $$

Solution 4:

Supplementing Fly by Night's answer with a trick sometimes handy when calculating the residues at a root of unity.

Write $P(z)=z^4$, $Q(z)=z^8+1$, $f(z)=P(z)/Q(z)$.

  • The poles in the upper half plane are $z=z_k=e^{(2k+1)\pi i/8},k=0,1,2,3$. Their complex conjugates are the other four poles, so they are all simple. A trick is to use the fact that $z_k^8=-1$. Therefore $$ Res(f;z_k)=\frac{P(z_k)}{Q'(z_k)}=\frac{z_k^4}{8z_k^7}=\frac{z_k^5}{8z_k^8}=-\frac18z_k^5.$$
  • For further simplification it is helpful to observe that for all the poles $z_k$ we have $z_k^4=\pm i$. The choices of the signs work out nicely in that the contributions of $z_0$ and $z_3$ (resp. $z_1$ and $z_2$) sum up to simple real values of a trig function. The known values $$ \cos\frac{\pi}8=\frac12\sqrt{2+\sqrt2},\quad\sin\frac{\pi}8 =\frac12\sqrt{2-\sqrt2} $$ come in handy, and $$ \begin{aligned} \int&=2\pi i\sum_{k=0}^3Res(f,z_k)\\ &=-\frac{\pi i}4(z_0^5+z_1^5+z_2^5+z_3^5)\\ &=-\frac{\pi i}4(iz_0-iz_1+iz_2-iz_3)\\ &=\frac{\pi}4[(z_0-z_3)-(z_1-z_2)]\\ &=\frac{\pi}4[2\sin\frac{3\pi}8-2\sin\frac{\pi}8]\\ &=\frac{\pi}4[2\cos\frac{\pi}8-2\sin\frac{\pi}8]\\ &=\frac{\pi}4\left(\sqrt{2+\sqrt2}-\sqrt{2-\sqrt2}\right). \end{aligned} $$