# Compute $\int_0^\infty \frac{x \sin(ax)}{1+x^4} \, dx$

Compute $\displaystyle \int_0^\infty \frac{x \sin(ax)}{1+x^4} \, dx$.

Thoughts so far: I see that the function is odd, so is one half the integral on the whole real line. So a half circle contour will work. My problem is how to compute the residues. In the top half circle we have singularities at $e^{ip\pi /4}$ and $e^{3i\pi/4}$, and we can replace the $x\sin(ax)$ in the numerator with $ze^{iaz}$ and just take the imaginary part at the end. However, I'm stuck on computing the residue. It seems that it's not going to come out neatly. Any hints would be appreciated!

By parity, $$I = \int_{0}^{+\infty}\frac{x\sin(ax)}{1+x^4}\,dx = \frac{1}{2}\int_{-\infty}^{+\infty}\frac{x\sin(ax)}{1+x^4}\,dx = \frac{1}{2}\text{Im}\int_{\mathbb{R}}\frac{z e^{aiz}}{1+z^4}\,dz$$ and the poles of $\frac{z}{1+z^4}$ with a positive imaginary part occur at $z=\frac{\pm 1+i}{\sqrt{2}}$, hence by setting $f(z)=\frac{z e^{aiz}}{1+z^4}$ and using a semi-circular contour, the residue theorem gives:
$$I = \pi i\cdot \text{Im}\left(\text{Res}\left(f(z),z=\frac{-1-i}{\sqrt{2}}\right)+\text{Res}\left(f(z),z=\frac{1-i}{\sqrt{2}}\right)\right)$$ hence, assuming $a>0$:
$$I = \frac{\pi}{2} e^{-\frac{a}{\sqrt{2}}}\sin\left(\frac{a}{\sqrt{2}}\right).$$
Just recall that if $z=w$ is a simple pole for $f(z)=\frac{a(z)}{b(z)}$ and a simple zero for $b(z)$, $$\text{Res}\left(f(z),z=w\right) = \lim_{z\to w}\frac{(z-w)a(z)}{b(z)}=\lim_{z\to w}\frac{a(z)+(z-w)a'(z)}{b'(z)}=\frac{a(w)}{b'(w)}$$ by De l'Hopital theorem.