Integrating $ \frac{{ \int_{0}^{\infty} e^{-x^2}\, dx}}{{\int_{0}^{\infty} e^{-x^2} \cos (2x) \, dx}}$ I need help calculating the following integrals. For the top integral we can use the jacobin, right? But how do I calculate the bottom one?:
$$ \frac{{ \int_{0}^{\infty} e^{-x^2}\, dx}}{{\int_{0}^{\infty} e^{-x^2} \cos (2x) \, dx}}$$
 A: We have $$ \int_{0}^{\infty}e^{-x^{2}+2ix}dx=e^{-1}\int_{0}^{\infty}e^{-\left(x-i\right)^{2}}dx=\frac{\sqrt{\pi}}{2e}\left(1+i\textrm{erfi}\left(1\right)\right)
 $$ using the definitions of erf, erfi and erfc functions and now observe that $$\int_{0}^{\infty}e^{-x^{2}}\cos\left(2x\right)dx=\textrm{Re}\left(\int_{0}^{\infty}e^{-x^{2}+2ix}dx\right)
 $$ then $$\int_{0}^{\infty}e^{-x^{2}}\cos\left(2x\right)dx=\frac{\sqrt{\pi}}{2e}
 $$ and the other integral is well known $$\int_{0}^{\infty}e^{-x^{2}}dx=\frac{\sqrt{\pi}}{2}
 $$ hence $$\frac{\int_{0}^{\infty}e^{-x^{2}}dx}{\int_{0}^{\infty}e^{-x^{2}}\cos\left(2x\right)dx}=e.
 $$
A: Consider this function:
$$ f(a) = \int\limits_0^{\infty} e^{-x^2} \cos a x \ \mathrm{d}x$$
Since this is well defined $\forall a\in \mathbb{R}$, we can differentiate it with respect to $a$ and Integrate by Parts:
$$ f'(a) = \int\limits_0^{\infty}- x e^{-x^2} \sin a x \ \mathrm{d}x = \bigg[\frac{e^{-x^2} \sin a x}{2}\bigg]_0^{\infty} - \frac{a}{2} \int\limits_{0}^{\infty} e^{-x^2} \cos a x \ \mathrm{d}x= \frac{-a f(a)}{2}.$$
$\therefore f'(a)= \frac{-af(a)}{2}$, and by Separation of Variables:
$$\ln(f(a))=\int \frac{\mathrm{d}f}{f(a)} = -\int \frac{a}{2} \ \mathrm{d}a= -\frac{a^2}{4} +C \Longrightarrow f(a)= f(0)e^{-\frac{a^2}{4}} \ \ \ \ \forall a\in \mathbb{R}.$$
$$\therefore \frac{\int_0^{\infty} e^{-x^2} \ \mathrm{d}x }{\int_0^{\infty}e^{-x^2} \cos 2 x\ \mathrm{d}x}=  \frac{f(0)}{f(2)}  = e$$
