How to evaluate the following integral involving a gaussian? I want to evaluate the following integral:
$$\int\limits_0 ^\infty {x \sin{px} \exp{(-a^2x^2})} dx$$
Now I am unsure how to proceed. I know that this is an even function so I can extend the limit terms to $-\infty, \infty $ and then divide by 2. I have tried to evaluate this on Wolfram Alpha, but it only shows the answer while I am interested in the procedure.

$$
\begin{align}
\int_0^\infty x\sin{px}\exp{(-a^2x^2)}\ dx
& =\int_0^\infty x\sum_{n\geq0}\dfrac{(-1)^n(px)^{2n+1}}{(2n+1)!}\exp{(-a^2x^2)}\ dx \\
& =\sum_{n\geq0}\dfrac{(-1)^np^{2n+1}}{(2n+1)!}\int_0^\infty x^{2n+2}\exp{(-a^2x^2)}\ dx \\
& =\sum_{n\geq0}\dfrac{(-1)^np^{2n+1}}{(2n+1)!}\dfrac{1}{2a^{2n+3}}\int_0^\infty u^{n+\frac12}e^{-u}\ du ~~~;~~~{a^2x^2=u}\\
& =\sum_{n\geq0}\dfrac{(-1)^np^{2n+1}(2n+2)}{\Gamma(2n+3)}\dfrac{1}{2a^{2n+3}}\Gamma(n+\frac32)\\
& =\sum_{n\geq0}\dfrac{(-1)^np^{2n+1}(2n+2)}{2^{2n+2}\sqrt{\pi}^{-1}\Gamma(n+2)\Gamma(n+\frac32)}\dfrac{1}{2a^{2n+3}}\Gamma(n+\frac32)\\
& =\sqrt{\pi}\sum_{n\geq0}\dfrac{(-1)^np^{2n+1}}{2^{2n+2}}\dfrac{1}{2a^{2n+3}}\\
& =\sqrt{\pi}\dfrac{p}{4a^3}\sum_{n\geq0}\left(\dfrac{-p^2}{4a^2}\right)^n\dfrac{1}{n!}\\
& =\sqrt{\pi}\dfrac{p}{4a^3}\exp\left(\dfrac{-p^2}{4a^2}\right)
\end{align}
$$
