Integration without complex analysis on rational-improper integral Evaluate:
$$\int_{0}^{\infty} \frac{1}{x^6 + 1} \,\mathrm dx$$
Without the use of complex-analysis.
With complex analysis it is a very simple problem, how can this be done WITHOUT complex analysis?
 A: Let $\displaystyle \quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\mathcal I=\int_0^\infty\frac{1}{1+x^6} \,\mathrm dx
$
$$\begin{align} 
I&=\frac{1}{2}\left[ \int_0^\infty \frac{(1-x^2+x^4)+x^2+(1-x^4)}{(1+x^2)(1-x^2+x^4)} \,\mathrm  dx \right]\tag{1}\\
&=
\frac{1}{2}\left[\int_0^\infty \frac{1}{1+x^2}  \,\mathrm dx
+ \int_0^\infty \frac{x^2}{1+x^6}  \,\mathrm dx 
+ \color{grey}{\int_0^\infty \frac{1-x^2}{1-x^2+x^4} \,\mathrm  dx}\right] \tag{2}\\
&=\frac{1}{2}\left[\frac\pi2+ \frac\pi{6} +\color\grey{0} \right] \tag{3}\\
&\mathcal I=\frac{\pi}{3} \tag{4}\\
\end{align}$$

$$\int_0^\infty\frac{1}{1+x^6} \,\mathrm dx=\frac\pi3$$


$\text{ Explanation : }(3)$
$$
\small\color\grey{J=\int_0^\infty \frac{1-x^2}{1-x^2+x^4} \,\mathrm  dx}
=\int_0^1 \frac{1-x^2}{1-x^2+x^4} \,\mathrm  dx
+\int_1^\infty \frac{1-x^2}{1-x^2+x^4} \,\mathrm  dx$$
Now substitute 
$\small\displaystyle x=\frac1t$ in second integral, To get
$$
\small\color\grey{J=\int_0^\infty \frac{1-x^2}{1-x^2+x^4} \,\mathrm  dx}
=\int_0^1 \frac{1-x^2}{1-x^2+x^4} \,\mathrm  dx
-\int_0^1 \frac{1-t^2}{1-t^2+t^4} \,\mathrm  dt=\color\grey0$$
A: 
how can this be done WITHOUT complex analysis?

$\quad$ All integrals of the form $~\displaystyle\int_0^\infty\frac{x^{k-1}}{(x^n+a^n)^m}dx~$ can be evaluated by substituting $x=at$ and $u=\dfrac1{t^n+1}$ , then recognizing the expression of the beta function in the new integral, and lastly 
employing Euler's reflection formula for the $\Gamma$ function to simplify the result.
A: Setting $x=\dfrac1y,$
$$I=\int_0^\infty\frac1{1+x^6}dx=\cdots=\int_0^\infty\frac{x^4}{1+x^6}dx$$
$$2I=\int_0^\infty\frac{1+x^4}{1+x^6}dx=\int_0^\infty\frac{(1+x^2)^2-2x^2}{1+x^6}dx$$
$$=\int_0^\infty\frac{1+x^2}{1-x^2+x^4}dx-\frac23\int_0^\infty\frac{3x^2}{1+x^6}dx$$
$$I_1=\int_0^\infty\frac{1+x^2}{1-x^2+x^4}dx=\int_0^\infty\frac{1/x^2+1}{1/x^2-1+x^2}dx$$
$$=\int_0^\infty\frac{1/x^2+1}{\left(x-\dfrac1x\right)^2-3}dx =\int_{-\infty}^\infty\frac{dz}{z^2-3}$$
$$=\frac1{2\sqrt3}\ln\frac{z-\sqrt3}{z+\sqrt3}|_{-\infty}^\infty=\frac1{2\sqrt3}\ln\frac{1-\sqrt3/z}{1+\sqrt3/z}|_{-\infty}^\infty=\ln1-\ln1=0$$
$$I_2=\int_0^\infty\frac{3x^2}{1+x^6}dx=\arctan(1+x^3)|_0^{\infty}=\frac\pi2-\frac\pi4=\frac\pi4$$
