Residue/Contour integration problem Supposedly, 
$\displaystyle\int_{-\infty}^\infty \frac{\cos ax}{x^4+1}dx=\frac{\pi}{\sqrt{2}}e^{-a/\sqrt{2}}\left(\cos\frac{a}{\sqrt{2}}+\sin\frac{a}{\sqrt{2}}\right)$, $a>0$.
Using Residues/Contour integrals, I have 
$\displaystyle\int_{-\infty}^\infty \frac{e^{iax}}{x^4+1}dx=\int_{-\infty}^\infty \frac{\cos ax}{x^4+1}dx+i\int_{-\infty}^\infty \frac{\sin ax}{x^4+1}dx=\frac{\pi}{\sqrt{2}}e^{-a/\sqrt{2}}\left(\cos\frac{a}{\sqrt{2}}+i\sin\frac{a}{\sqrt{2}}\right)$
I don't see how to draw the final conclusion. 

Here, because $a >0$, it is easiest to use a contour $C$ that is a semicircle of radius $R$ in the  upper half-plane in the complex plane.  Thus, consider
$$\oint_C dz \frac{e^{i a z}}{z^4+1} $$
This contour integral is equal to
$$\int_{-R}^{R} dx  \frac{e^{i a x}}{x^4+1} + i R \int_0^{\pi} d\theta \, e^{i \theta} \frac{e^{-a R \sin{\theta}} e^{i a R \cos{\theta}}}{R^4 e^{i 4 \theta}+1}  $$
As $R \to \infty$, the magnitude of the second integral vanishes as
$$\frac{2}{R^3} \int_0^{\pi/2} d\theta\, e^{-a R \sin{\theta}} \le \frac{2}{R^3} \int_0^{\pi/2} d\theta e^{-2 a R/\pi} \le \frac{\pi}{R^4}$$
The contour integral is also equal to $i 2 \pi$ times the sum of the residues of the poles within $C$.  These poles are at $z=e^{i \pi/4}$ and $e^{i 3 \pi/4}$.  The integral we seek is therefore found through the following equality:
$$\begin{align}\int_{-\infty}^{\infty} dx  \frac{e^{i a x}}{x^4+1} &= i 2 \pi \left [\frac{e^{-a/\sqrt{2}} e^{i a/\sqrt{2}}}{4 e^{i 3 \pi/4}} + \frac{e^{-a/\sqrt{2}} e^{-i a/\sqrt{2}}}{4 e^{i 9 \pi/4}} \right ]\\ &= i\frac{\pi}{2} e^{-a/\sqrt{2}} e^{-i \pi/2} \left [e^{i(a/\sqrt{2}-\pi/4)} +  e^{-i(a/\sqrt{2}-\pi/4)}\right ]\\ &= \pi  \, e^{-a/\sqrt{2}} \cos{\left (\frac{a}{\sqrt{2}}-\frac{\pi}{4} \right )} \\ &= \pi  \, e^{-a/\sqrt{2}} \frac{1}{\sqrt{2}} \left (\cos{\frac{a}{\sqrt{2}}} + \sin{\frac{a}{\sqrt{2}}} \right )\end{align}$$
Because cosine is even and sine is odd, the desired integral is equal to the above result, as was to be shown.
