The question is calculate the value of the integral, $$\int_{-\infty}^{\infty}\frac{dx}{1+x^4}$$ These are the steps that I followed,
Let $x$ be a complex number. So, the poles of the function $f(x)=\frac{1}{1+x^4}$ occur when $x$ is equal to the roots of the equation $1+x^4=0$, i.e $x=e^{i\pi/4},e^{3i\pi/4},e^{5i\pi/4},e^{7i\pi/4}$. They are all poles of degree 4.
Now Cauchy's theorem says that, $$\frac{1}{2\pi i}\int_C dx\ f(x)=\sum_i\text{Res}(f,x_i)$$ where $x_i$ are the poles of $f$ that lies within $C$. I am pretty sure that my poles lie within $-\infty$ and $\infty$. So, I calculated the residues of $\frac{1}{1+x^4}$ at $x=e^{i\pi/4},e^{3i\pi/4},e^{5i\pi/4},e^{7i\pi/4}$ and they are equal to $-\frac14e^{i\pi/4},-\frac14e^{3i\pi/4},-\frac14e^{5i\pi/4},-\frac14e^{7i\pi/4}$. Wolfram Alpha confirms my calculations.
The sum of residues is $$\sum_i\text{Res}=-\frac14e^{i\pi/4}-\frac14e^{3i\pi/4}-\frac14e^{5i\pi/4}-\frac14e^{7i\pi/4}=0$$ and therefore the integral, $$\int_{-\infty}^{\infty}\frac{dx}{1+x^4}$$ must be equal to zero. However, Wolfram alpha says it is not zero but equal to$\frac{\pi}{\sqrt 2}$. Where am I making a mistake?
In applying the residue theorem, we analyze the integral $I$ given by
$$\begin{align} I&=\oint_C \frac{1}{1+z^4}\,dz\\\\ &=\int_{-R}^R \frac{1}{1+x^4}\,dx+\int_0^\pi \frac{1}{1+(Re^{i\phi})^4}\,iRe^{i\phi}\,d\phi\\\\ &=2\pi i \,\text{Res}\left(\frac{1}{1+z^4}, z=e^{i\pi/4},e^{i3\pi/4}\right) \end{align}$$
where $R>1$ is assumed.
Taking $R\to \infty$, the integration over the semi-circular contour vanishes and we find that
$$\begin{align} \int_{-\infty}^\infty \frac{1}{1+x^4}\,dx&=2\pi i \,\text{Res}\left(\frac{1}{1+z^4}, z=e^{i\pi/4},e^{i3\pi/4}\right)\\\\ &=2\pi i \left(-\frac{e^{i\pi/4}}{4}-\frac{e^{i3\pi/4}}{4}\right)\\\\ & =\frac{\pi}{\sqrt 2} \end{align}$$