Evaluation of $\int^{1}_{0}\frac{x^4}{1+x^8}dx$ 
How can I Integrate $\displaystyle \int^{1}_{0}\frac{x^4}{1+x^8}dx$?

I have searched in that forum and get the result for $\displaystyle \int^{\infty}_{-\infty}\frac{x^4}{1+x^8}dx$ or for $\displaystyle \int^{\infty}_{0}\frac{x^4}{1+x^8}dx$
Although i know the formula $\displaystyle \int^{\infty}_{0}\frac{x^{m-1}}{1+x^n}dx=\frac{\pi}{n}\cdot \csc\frac{\pi m}{n}$
But did not understand How can i use in my original Integration
Help me please Thanks
 A: Note 
$$\int^{1}_{0}\frac{x^4}{1+x^8}dx
=\frac1{2\sqrt2}\int_0^1 \left(\frac{x^2}{x^4-\sqrt2x^2+1}
 - \frac{x^2}{x^4+\sqrt2x^2+1}\right)dx $$
where
$$\begin{align}
I(a)& =\int_0^1 \frac{x^2}{x^4+ax^2+1}dx \\
&=\frac12\int_0^1 \frac{x^2+1}{x^4+ax^2+1}dx -
\frac12\int_0^1 \frac{1-x^2}{x^4+ax^2+1}dx \\
&=\left(\frac1{2\sqrt{2+a}}\tan^{-1}\frac{x-\frac1x}{\sqrt{2+a}} 
 - \frac1{2\sqrt{2-a}}\coth^{-1}\frac{x+\frac1x}{\sqrt{2-a}} 
\right)_0^1 \\
&=\frac\pi{4\sqrt{2+a}}
 - \frac1{2\sqrt{2-a}}\coth^{-1}\frac{2}{\sqrt{2-a}} \\
\end{align}$$
Thus,
$$\begin{align}
&\int^{1}_{0}\frac{x^4}{1+x^8}dx
=\frac1{2\sqrt2}\left[I(-\sqrt2)-I(\sqrt2)\right]\\
=&\frac{\sqrt2}{8\sqrt{2-\sqrt2}}\left( \frac\pi2
+ \coth^{-1}\frac{2}{\sqrt{2-\sqrt2}} \right)
 -\frac{\sqrt2}{8\sqrt{2+\sqrt2}}\left( \frac\pi2+\coth^{-1}\frac{2}{\sqrt{2+\sqrt2}}\right) \\
\end{align}$$
A: Knowing that the roots of the denominator are the primitives $x_k=e^{i\pi/8 + i2\pi k/8}$ with $k=0,1,2,...,7$ the integral is quickly calculated by partial fractions decomposition i.e.
$$\int_0^1 \frac{x^4}{1+x^8} \, {\rm d}x = \int_0^1 {\rm d}x \sum_{k=0}^7 \frac{A_k}{x-x_k} = \sum_{k=0}^7 A_k \log\left(1-\frac{1}{x_k}\right)$$
where the $A_k=\frac{1}{8x_k^3}$ are the residues and the result is $$\sum_{k=0}^7 \frac{e^{-i3\pi/8 - i6\pi k/8}}{8} \, \log\left(1-e^{-i\pi/8 - i2\pi k/8}\right) \, .$$
Complex conjugates are $k=[0,7],[1,6],[2,5],[3,4]$, so grouping these terms gives
$$\frac{1}{4}\sum_{k=0}^3 \left\{ {\cos\left(\frac{3\pi}{8}+\frac{3\pi k}{4}\right)\log\left(2\sin\left(\frac{\pi}{16}+\frac{\pi k}{8}\right)\right)} + \sin\left(\frac{3\pi}{8}+\frac{3\pi k}{4}\right) \left(\frac{7\pi}{16} - \frac{\pi k}{8}\right) \right\} \\
=\frac{\pi}{8} \left\{ \cos\left(\frac{\pi}{8}\right) - \sin\left(\frac{\pi}{8}\right) \right\} + \frac{1}{4} \left\{ \sin\left(\frac{\pi}{8}\right) \log\left(\tan\left(\frac{\pi}{16}\right)\right) - \cos\left(\frac{\pi}{8}\right) \log\left(\tan\left(\frac{3\pi}{16}\right)\right) \right\}$$
which is relatively symmetric. The $\sqrt{2}$ expressions arise by using $$\cos\left(\frac{\pi}{8}\right) = \frac{\sqrt{2+\sqrt{2}}}{2} \\
\sin\left(\frac{\pi}{8}\right) = \frac{\sqrt{2-\sqrt{2}}}{2} \\
\tan\left(\frac{\pi}{16}\right) = \sqrt{\frac{2-\sqrt{2+\sqrt{2}}}{2+\sqrt{2+\sqrt{2}}}} \\
\tan\left(\frac{3\pi}{16}\right) = \sqrt{\frac{2-\sqrt{2-\sqrt{2}}}{2+\sqrt{2-\sqrt{2}}}} \, .$$
A: Typing integral x^4/(x^8+1) into wolframalpha and you get this result.

You may simplify it by inserting the known values of $\cos\left(\frac \pi 8\right),\sin\left(\frac \pi 8\right)$, etc.
