Residue theorem for a rational function 
Evaluate 
  $$\int_{-\infty}^{\infty}\frac{x^4}{1+x^8}\mathrm{d} x.$$ 

My concern: One of the consequences of the residue theorem states that, given a polynomial of the form $P/Q$ such that the degree of $Q$ exceeds $P$ by at least two, the integral can then be expressed as $$\int fdz=2\pi i\sum_{U}{\mathrm{Res}\left ( f;z_{i} \right )}.$$ 
The zeros of $Q$ in the Upper half plane  is here given by $z=e^{\frac{i \pi}{8}\left ( 2n+1 \right )}$ for $n\in \left \{0,1,2,3\right \}$. The residue at $z_{n}$ is now given by $\frac{P(z_{n})}{Q´(z_{n})}$. 
Should I derive the polynomial or exponential function? 

You can use the following reasoning.
$$\frac{x^4}{x^8+1}=\frac{x^4}{(x^4+\sqrt2x^2+1)(x^4-\sqrt2x^2+1)}=$$
$$=\frac{1}{2\sqrt2}\left(\frac{x^2}{x^4-\sqrt2x^2+1}-\frac{x^2}{x^4+\sqrt2x^2+1}\right)=$$
$$=\frac{1}{2\sqrt2}\left(\tfrac{x^2}{\left(x^2+\sqrt{2-\sqrt2}x+1\right)\left(x^2-\sqrt{2-\sqrt2}x+1\right)}-\tfrac{x^2}{\left(x^2+\sqrt{2+\sqrt2}x+1\right)\left(x^2-\sqrt{2+\sqrt2}x+1\right)}\right)=...$$
