Evaluating $\int_{-\infty}^{\infty} \frac{x\sin(kx)}{x^2+a^2} \,\mathrm dx$ using complex analysis [duplicate]

I'm trying to solve the following integral:

$$\int_{-\infty}^{\infty} \frac{x\sin(kx)}{x^2+a^2} \,\mathrm{d}x$$

I don't really have any idea where to start. The previous parts of the question involved complex numbers and Cauchy's Integral Formula, however I can't think how I'd applying that here.

Any help would be greatly appreciated :)

marked as duplicate by mfl, Did, E. Joseph, Leucippus, Daniel W. FarlowDec 4 '16 at 0:45

• It's the same integral as that question, however I would like to solve it using complex analysis instead – Jonahhill Dec 3 '16 at 14:00
• Write it as $$\operatorname{Im} \int_{-\infty}^\infty \frac{xe^{ikx}}{x^2+a^2}\,dx$$ and apply the residue theorem. – Daniel Fischer Dec 3 '16 at 14:03
• I haven't been taught the residue theorem yet – Jonahhill Dec 3 '16 at 14:07

Assuming $k>0$:
Consider the following closed path: the interval $[-R,R]$ followed by the closed half upper circle $|z|=R$ (we will denote this by $C_R^+$.
By Cauchy Integral Formula, when $R>|a|$ we have
$$\int_{-R}^R \frac{xe^{kx}}{x^2+a^2} \,\mathrm{d}x+\int_{C_R^+}\frac{xe^{kx}}{x^2+a^2} \,\mathrm{d}x=2 \pi i \left(\frac{xe^{kx}}{x+|a|i}\right)(|a|i)$$
Next, try to prove that $$\lim_{R \to \infty}\int_{C_R^+}\frac{xe^{kx}}{x^2+a^2} \,\mathrm{d}x=0$$