# How to compute that $\int_{-\infty}^{\infty}x\exp(-\vert x\vert) \sin(ax)\,dx$

$$\int_{-\infty}^{\infty}x\exp(-\vert x\vert) \sin(ax)\,dx\quad\mbox{where}\ a\ \mbox{is a positive constant.}$$ My idea is to use integration by parts. But I have been not handle three terms.. Please, help me solve that.

• How about differentiating $$2\int_{0}^{\infty} \exp(-x)\cos(ax) \, dx$$w.r.t. $a$? – Sangchul Lee Sep 17 '16 at 0:42

or note $$2\int_{0}^{\infty}x\exp(-x) \sin(ax)\,dx = 2\;\mathrm{Im}\int_{0}^{\infty}x\exp((-1+ia)x)\;dx$$
Since the function is symmetric, $I(a) =\int_{-\infty}^{\infty}x\exp(-\vert x\vert) \sin(ax)\,dx =2\int_{0}^{\infty}x\exp(-x) \sin(ax)\,dx$.
At this point, I would write $\sin(ax) =Im(e^{iax})$ so that $I(a) =2Im\int_{0}^{\infty}x\exp(-x) e^{iax}\,dx =2Im\int_{0}^{\infty}x\exp(x(-1+ia))dx$ and try to evaluate $\int_{0}^{\infty}x\exp(-bx)dx$, which should not be too difficult.