TITLE: $ \int_{0}^1\frac{1+x^6}{1-x^2+x^4-x^6+x^8}dx$
QUESTION [6 upvotes]: How do we compute this integral ?
$$ \int_{0}^1\frac{1+x^6}{1-x^2+x^4-x^6+x^8}dx$$
I have tried partial fraction but it is quite hard to factorize the denominator. Any help is appreciated.

REPLY [5 votes]: $$
\begin{align}
\int_0^1\frac{1+x^6}{1-x^2+x^4-x^6+x^8}\,\mathrm{d}x
&=\int_0^1\frac{(1+x^6)(1+x^2)}{1+x^{10}}\,\mathrm{d}x\tag{1a}\\
&=\int_1^\infty\frac{(1+x^6)(1+x^2)}{1+x^{10}}\,\mathrm{d}x\tag{1b}\\
&=\frac12\int_0^\infty\frac{(1+x^6)(1+x^2)}{1+x^{10}}\,\mathrm{d}x\tag{1c}
\end{align}
$$
Explanation:
$\mathrm{(1a)}$: multiply by $\frac{1+x^2}{1+x^2}$
$\mathrm{(1b)}$: substitute $x\mapsto1/x$ and simplify
$\mathrm{(1c)}$: average $\mathrm{(1a)}$ and $\mathrm{(1b)}$
Depending on the context of the question, there are a few ways to compute $\mathrm{(1c)}$.
One is to use this answer, which gets $\int_0^\infty\frac{x^n}{1+x^{10}}\,\mathrm{d}x=\frac\pi{10}\csc\!\left(\frac{(n+1)\pi}{10}\right)$ by contour integration:
$$
\begin{align}
\int_0^\infty\frac{(1+x^6)(1+x^2)}{1+x^{10}}\,\mathrm{d}x
&=\int_0^\infty\frac1{1+x^{10}}\,\mathrm{d}x
+\int_0^\infty\frac{x^2}{1+x^{10}}\,\mathrm{d}x\\
&+\int_0^\infty\frac{x^6}{1+x^{10}}\,\mathrm{d}x
+\int_0^\infty\frac{x^8}{1+x^{10}}\,\mathrm{d}x\\
&=\frac\pi{10}\left[\csc\left(\frac{\pi}{10}\right)
+\csc\left(\frac{3\pi}{10}\right)
+\csc\left(\frac{7\pi}{10}\right)
+\csc\left(\frac{9\pi}{10}\right)\right]\\
&=\frac\pi5\left[\csc\left(\frac{\pi}{10}\right)+\csc\left(\frac{3\pi}{10}\right)\right]\\
&=\frac{2\pi}{\sqrt5}\tag{2}
\end{align}
$$
Therefore,
$$
\int_0^1\frac{1+x^6}{1-x^2+x^4-x^6+x^8}\,\mathrm{d}x=\frac\pi{\sqrt5}\tag{3}
$$