How to calculate$ \int_0^{\infty} e^{-x^2} \sin x dx$ in the most simple way How to calculate$ \int_0^{\infty} e^{-x^2} \sin x dx$ in the most simple way?
I remembered doing this calculation last month and got a result easily without using complex analysis or any big mathematic methods. 
However, when I need to do it again today, I lose track of how I did this.
Can someone help me?
 A: The question is what you call a "result". But I would suggest the following:
Express the sine function in terms of its Taylor series and switch the sum and the integral (dominated convergence):
$$\int_0^\infty e^{-x^2}\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)!}x^{2k+1}dx=\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)!}\int_0^\infty e^{-x^2}x^{2k+1}dx$$
The remaining integral can be computed as $$\int_0^\infty e^{-x^2}x^{2k+1}dx=\frac12\int_0^\infty 2x(x^2)^ke^{-x^2}dx=\frac12\int_0^\infty x^ke^{-x}dx=\frac12\Gamma(k+1)=\frac12 k!.$$
Thus we obtain the series $$\frac12\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)!}k!.$$
And if I have made no mistake then you should be able to use some elementary identities to show that this equals $F(\frac12)$, where $F$ is the Dawson Function.
A: Knowing that $\displaystyle\int_0^\infty e^{-x^2}~dx=\frac{\sqrt\pi}2$ we deduce that $\displaystyle\int_0^\infty e^{\large-\big(x^2+2ax+b^2\big)}~dx=\frac{\sqrt\pi}2e^{a^2-b^2}\text{erfc }a$ where erfc is the complementary error function. In your case, $a=\dfrac i2$ and $b=0$, hence the result becomes $\dfrac{\sqrt\pi}{2~\sqrt[\Large4]e}~\text{erfi}\bigg(\dfrac12\bigg)$, where erfi represents the imaginary errof function. All you need to do is to simply complete the square in the exponent, and employ the very definitions of the functions in question, nothing more.
