prove that $\int_{-\infty}^{\infty} \frac{x^4}{1+x^8} dx= \frac{\pi}{\sqrt 2} \sin \frac{\pi}{8}$ 
prove that $$\int_{-\infty}^{\infty} \frac{x^4}{1+x^8} dx= \frac{\pi}{\sqrt 2} \sin \frac{\pi}{8}$$

My attempt:
C is semicircle in upper half complex plane
Simple poles = $e^{i\frac{\pi}{8}}, e^{i\frac{3\pi}{8}},e^{i\frac{5\pi}{8}},e^{i\frac{7\pi}{8}}$ lie in upper semi-circle C and real axis
Given integral value $= 2\pi i \cdot (\text{sum of residues}) = 2 \pi i \left(\frac{-1}{8}\right) \left[e^{i\frac{5\pi}{8}}+e^{i\frac{15\pi}{8}}+e^{i\frac{25\pi}{8}}+e^{i\frac{35\pi}{8}}\right] = 0.27059 \pi$
This is numerically equal to $\frac{\pi}{\sqrt 2} \sin \frac{\pi}{8}$. But without using calculator, how to get this expression.

An alternative approach using complex analysis. 
It is not nice to have to calculate many residues. Just reduce it by noting the following:
\begin{align}
I=\int^{\infty}_{-\infty}\frac{x^4}{x^8+1}\,dx=\Re\left(2\int^\infty_{0}\frac{1}{x^4-i}\,dx\right)
\end{align}
Now calculate the RHS by considering:
\begin{align}
\oint_C\frac{1}{z^4-i}\,dz
\end{align}
Where $C$ is a quarter circle  with radius $R>1$ in the first quadrant. There is only one pole inclosed instead of four! Call that number $\alpha$. So you only have to find 1 residue (one fourth of the original number!). By the residue theorem we have:
\begin{align}
\oint_C\frac{1}{z^4-i}\,dz=2\pi i \text{Res}_{z=\alpha}\frac{1}{z^4-i}
\end{align}
On the other hand we have:
\begin{align}
\oint_C\frac{1}{z^4-i}\,dz=-i\int^R_0\frac{1}{x^4-i}\,dx+\int^R_0 \frac{1}{x^4-i}\,dx+\int_{B_R}\frac{1}{z^4-i}\,dz
\end{align}
where $B_R$ is the circular part. After letting $R\to\infty$ you can verify that:
\begin{align}
(1-i)\int^{\infty}_0 \frac{1}{x^4-i}\,dx=2\pi i \text{Res}_{z=\alpha}\frac{1}{z^4-i}
\end{align}
Hence:

\begin{align}
I=\Re\left[4\pi \frac{i}{1-i}\text{Res}_{z=\alpha}\frac{1}{z^4-i} \right]
\end{align}

The calculation are left for you. 
