Complex integration using the residue theorem $\int_{-\infty}^\infty \frac{x\sin(x)}{x^4+1}\,dx$

complex integrationcomplex-analysisresidue-calculus

I've beat my head against a wall with this one for the last couple days. Evaluate:
$$\int_{-\infty}^\infty \frac{x\sin(x)}{x^4+1}\,dx$$

I factored the denominator using Euler's identity such that the roots are $$x=\frac{1+i}{\sqrt2}, \frac{1-i}{\sqrt2}, \frac{-1-i}{\sqrt2}, \frac{-1+i}{\sqrt2}$$

I know that we can apply the residue theorem and calculate and sum the residues in the top half of $\mathbb{C}$ to get our solution to the integral. I set
$$H(z)=\frac{ze^{iz}}{(z-(\frac {-1-i}{\sqrt2}))(z-(\frac{1-i}{\sqrt2}))}$$

and $$f(z)=\frac{H(z)}{(z-(\frac{-1+i}{\sqrt2}))(z-(\frac{1+i}{\sqrt2}))}$$

But when I try to proceed from here to take the residue I am not sure that I have the right setup and quickly get lost in the algebra, could someone please let me know if I am at least on the right path?

Best Answer

If $g(z)=\dfrac{ze^{iz}}{z^4+1}$, then$$\operatorname{res}_{z=\frac{1+i}{\sqrt2}}\bigl(g(z)\bigr)=\frac{\left(\frac{1+i}{\sqrt2}\right)\exp\left(\frac{1+i}{\sqrt2}i\right)}{4\left(\frac{1+i}{\sqrt2}\right)^3}=-\frac14ie^{-\frac{1-i}{\sqrt{2}}}$$and$$\operatorname{res}_{z=\frac{-1+i}{\sqrt2}}\bigl(g(z)\bigr)=\frac{\left(\frac{-1+i}{\sqrt2}\right)\exp\left(\frac{-1+i}{\sqrt2}i\right)}{4\left(\frac{-1+i}{\sqrt2}\right)^3}=\frac{1}{4} i e^{-\frac{1+i}{\sqrt{2}}}.$$So, and since $\exp\left(-\frac1{\sqrt2}\pm\frac i{\sqrt2}\right)=\exp\left(-\frac1{\sqrt2}\right)\left(\cos\left(\pm\frac1{\sqrt2}\right)+\sin\left(\pm\frac1{\sqrt2}\right)i\right)$, the sum of the residues is\begin{multline}\require{cancel}-\frac14i\exp\left(-\frac1{\sqrt2}+\frac i{\sqrt2}\right)+\frac14i\exp\left(-\frac1{\sqrt2}+\frac i{\sqrt2}\right)=\\=\frac{\exp\left(-\frac1{\sqrt2}\right)}4\left(\sin\left(\frac1{\sqrt2}\right)-\cancel{\cos\left(\frac1{\sqrt2}\right)i}+\sin\left(\frac1{\sqrt2}\right)+\cancel{\cos\left(\frac1{\sqrt2}\right)i}\right)=\\=\frac12e^{-\frac{1}{\sqrt2}}\sin\left(\frac1{\sqrt2}\right)\end{multline}and therefore$$\int_{-\infty}^\infty\frac{xe^{ix}}{x^4+1}\,\mathrm dx=\pi ie^{-\frac{1}{\sqrt2}}\sin\left(\frac1{\sqrt2}\right).$$So,\begin{align}\int_{-\infty}^\infty\frac{x\sin(x)}{x^4+1}\,\mathrm dx&=\operatorname{Im}\left(\pi ie^{-\frac{1}{\sqrt2}}\sin\left(\frac1{\sqrt2}\right)\right)\\&=\pi e^{-\frac{1}{\sqrt2}}\sin\left(\frac1{\sqrt2}\right).\end{align}

Related Question