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.

A couple of alternative approaches to Euler's Beta function or contour integration.
1) The reflection formula for the digamma function
By parity we have $I=\int_{-\infty}^{+\infty}\frac{x^4}{1+x^8}\,dx = 2\int_{0}^{+\infty}\frac{x^4}{1+x^8}\,dx $ and by splitting $\mathbb{R}^+$ as $(0,1]\cup(1,+\infty)$, then enforcing the substitution $x\mapsto \frac{1}{x}$ on the second interval,
$$ I = 2\int_{0}^{1}\frac{x^2+x^4}{1+x^8}\,dx = 2\sum_{n\geq 0}\left[\frac{1}{16n+3}+\frac{1}{16n+5}-\frac{1}{16n+11}-\frac{1}{16n+13}\right] $$
where the RHS is a sort of BBP-type formula. Since $\sum_{n\geq 0}\frac{1}{(n+a)(n+b)}=\frac{\psi(a)-\psi(b)}{a-b}$ and $\psi(x)-\psi(1-x)=-\pi\cot(\pi x)$,
$$ \sum_{n\geq 0}\left[\frac{1}{16n+3}-\frac{1}{16n+13}\right]=\frac{\pi}{16}\cot\frac{3\pi}{16},$$
$$ \sum_{n\geq 0}\left[\frac{1}{16n+5}-\frac{1}{16n+11}\right]=\frac{\pi}{16}\cot\frac{5\pi}{16},$$
and finally
$$ I = \frac{\pi}{8}\left[\cot\frac{3\pi}{16}+\cot\frac{5\pi}{16}\right] = \color{blue}{\frac{\pi}{\sqrt{2}}\sin\frac{\pi}{8}}=\frac{\pi}{2}\sqrt{1-\frac{1}{\sqrt{2}}}.$$
2) Glasser's Master Theorem
We have
$$ I = \int_{\mathbb{R}}\frac{dx}{x^4+\frac{1}{x^4}}=\int_{\mathbb{R}}\frac{dx}{\left(x^2+\frac{1}{x^2}\right)^2-2}=\int_{\mathbb{R}}\frac{dx}{\left[\left(x-\frac{1}{x}\right)^2+2\right]^2-2} $$
hence, by the residue theorem and de l'Hopital rule,
$$ I = \int_{\mathbb{R}}\frac{dz}{(z^2+2)^2-2}=2\pi i\sum_{\zeta\in Z}\operatorname*{Res}_{z=\zeta}\frac{1}{z^4+4z^2+2}\stackrel{\text{d.H.}}{=}\frac{\pi i}{2}\sum_{\zeta\in Z}\frac{1}{z^3+2z} $$
where $Z=\{i\sqrt{2-\sqrt{2}},i\sqrt{2+\sqrt{2}}\}$. Of course the outcome is the same.
