# How to use a contour integral to evaluate $\frac{2}{\pi }\int\limits_0^\infty {x{e^{ - {x^2}t}}\sin ax} {\rm{ }}dx$?

So I faced this question in our textbook: Using a contour integral, evaluate the improper integral

$$\frac{2}{\pi }\int\limits_0^\infty {x{e^{ - {x^2}t}}\sin ax} {\rm{ }}dx$$

I don't need the answer, in fact, the answer is given at the end of the textbook $$\frac{2}{\pi }\int\limits_0^\infty {x{e^{ - {x^2}t}}\sin ax} {\rm{ }}dx = \frac{a}{{\sqrt {4\pi {t^3}} }}{e^{ - \frac{{{a^2}}}{{4t}}}}$$

However, I just need hints on how to start.

• Shall I use exponentials instead of sines/cosines?
• How about attacking the improper integral using the residue theorem - no?
• A slight hint would to re-write your integral as $$-\frac{\partial}{\partial a}\frac{2}{\pi}\int_0^{\infty}\mathrm{e}^{-x^2 t}\cos (a x) dx$$ and proceed with using exponential s as you stated. – Chinny84 May 18 '15 at 8:44
• And note that the integrand is even in $x$ so the integral can be changed into one from -∞ to +∞. Now use exponentials as you proposed and do an analytic continuation. – Urgje May 18 '15 at 10:40
• @Mike would you like an outline where you can fill in the details? – kobe May 18 '15 at 20:39
• @kobe Sure, why not :) – Mike May 18 '15 at 21:51
• @Mike based on the answer given, I'm assuming $a \ge 0$ and $t > 0$. Are these the assumptions you were given? – kobe May 18 '15 at 22:01

Note that your integral is the imaginary part of

$$f(a,t) := \frac{1}{\pi} \int_{-\infty}^\infty xe^{-x^2t + iax}\, dx.$$

Using the transformation $x \mapsto \frac{x}{t}$ and completing the square in the exponential argument, we find

$$f(a,t)=\frac{e^{-\frac{a^2}{4t}}}{\pi t} \int_{-\infty}^\infty xe^{-(x - i\frac{a}{2\sqrt{t}})^2}\, dx.$$

By contour shifting,

$$\int_{-\infty}^\infty xe^{-(x - i\frac{a}{2\sqrt{t}})^2}\, dx = \int_{-\infty}^\infty \left(x + i\frac{a}{2\sqrt{t}}\right)e^{-x^2}\, dx,$$

but this needs justification. To proceed, consider the contour integral

$$\oint_{\Gamma(R)} \left(z + i\frac{a}{2\sqrt{t}}\right)e^{-z^2}\, dz,$$

where $\Gamma(R)$ is the positively oriented rectangle with vertices at $-R,-R - i\frac{a}{2\sqrt{t}}, R - i\frac{a}{2\sqrt{t}}$, and $R$. The integrals along the vertical edges of $\Gamma(R)$ are $O(Re^{-R^2})$ as $R\to \infty$. Furthermore, by Cauchy's integral theorem, $\int_{\Gamma(R)} (z + i\frac{a}{\sqrt{t}})e^{-z^2}\, dz = 0$. Hence, the contour shifting is valid.

Now

$$\int_{-\infty}^\infty \left(x + i\frac{a}{2\sqrt{t}}\right) e^{-x^2}\, dx = i\frac{a}{2\sqrt{t}}\int_{-\infty}^\infty e^{-x^2}\, dx = i a\sqrt{\frac{\pi}{4t}},$$

and thus

$$f(a,t) = i\frac{a}{\sqrt{4\pi t^3}}e^{-\frac{a^2}{4t}}.$$

Taking the imaginary part of $f(a,t)$ gives the answer you've written above.