<s>[INST] 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
 [/INST] 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}}}} \, .$$
</s>