= Solution
Apply the formula to
$$
R(z)=\frac{z}{1+z^4}.
$$
The upper-half-plane poles are
$$
z_1=e^{i\pi/4},\qquad z_2=e^{3i\pi/4},
$$
and their residues are $e^{iz_k}/(4z_k^2)$. Writing $c=1/\sqrt2$, their sum is
$$
\frac{i}{4}\left(e^{iz_2}-e^{iz_1}\right)
=\frac12e^{-c}\sin c.
$$
Since the cosine part of $x e^{ix}/(1+x^4)$ is <odd function>[odd], its integral vanishes, while the sine part is <even function>[even]. Hence
$$
i\int_{-\infty}^{\infty}\frac{x\sin x}{1+x^4}\,dx
=2\pi i\left(\frac12e^{-c}\sin c\right),
$$
so
$$
\boxed{
\int_{-\infty}^{\infty}\frac{x\sin x}{1+x^4}\,dx
=\pi e^{-1/\sqrt2}\sin\!\left(\frac1{\sqrt2}\right)}.
$$
Back to article page