Evaluating the Integral $\int_{-\infty}^\infty e^{-x^2}\cos\big(2x^2\big)\,\mathrm dx$ How to compute the integral
$$\int_{-\infty}^\infty e^{-x^2}\cos\big(2x^2\big) dx$$
I am wondering if there's a nice closed form of this elegant integral. I have tried to compute this integral using some substitutions, Laplace and Mellin transforms, however it doesn't seem to get or transform to something more simplified.
Any approach (including complex analysis) is most welcomed.
Thanks.
EDIT $\textbf{1}$: @heropup has provided a beautiful answer, however I would be much more happy if there's another nice way to prove the same. Thanks.
 A: The first thing that comes to my mind is to do something like this:  $$e^{-x^2} \cos (2x^2) = e^{-x^2} \frac{e^{2x^2 i} + e^{-2x^2 i}}{2} = \frac{1}{2} \left( e^{-(1-2i)x^2} + e^{-(1+2i)x^2} \right),$$ then use the fact that $$\int_{x=-\infty}^\infty e^{-x^2} \, dx = \sqrt{\pi}$$ to evaluate $$\int_{x=0}^\infty e^{-zx^2} \, dx = \frac{\sqrt{\pi}}{2 \sqrt{z}}, \quad \Re(z) > 0.$$  Then we obtain $$\int_{x=-\infty}^\infty e^{-x^2} \cos (2x^2) \, dx = \frac{\sqrt{\pi}}{2} \left((1-2i)^{-1/2} + (1+2i)^{-1/2}\right) = \sqrt{\frac{1 + \sqrt{5}}{10} \pi}.$$

In case that last step is unclear, one simply writes
$$\frac{1}{\sqrt{1 - 2i}} + \frac{1}{\sqrt{1 + 2i}} = \frac{\sqrt{1 + 2i} + \sqrt{1 - 2i}}{\sqrt{5}}.$$  Then because $$1 \pm 2i = \sqrt{5} \left(\frac{1}{\sqrt{5}} \pm \frac{2}{\sqrt{5}} i\right) = \sqrt{5} e^{\pm i \theta}$$ where $\theta = \tan^{-1} 2$, we have $$\sqrt{1 + 2i} + \sqrt{1 - 2i} = 5^{1/4}(e^{i\theta/2} + e^{-i\theta/2}) = 2 \cdot 5^{1/4} \cos \frac{\theta}{2} = 2 \cdot 5^{1/4} \sqrt{\frac{1 + \cos \theta}{2}} \\ = 2 \cdot 5^{1/4} \sqrt{\frac{1 + 1/\sqrt{5}}{2}}.$$  The rest is algebra.  I believe such a computation should be accessible to a student of complex analysis--indeed, a student of high school trigonometry and complex number arithmetic.
A: Using the gaussian integral
$$I=\int_{-\infty}^\infty e^{-x^2}\cos\big(2x^2\big)\, dx=\Re\Bigg[\int_{-\infty}^\infty e^{-(1-2 i) x^2}\,dx\Bigg]$$
$$I=\Re \Bigg[\sqrt{\frac \pi {1-2i}}\Bigg]=\sqrt \pi\,\Re \Bigg[\sqrt{\frac{1}{5}+\frac{2 i}{5}}\Bigg]=\frac{\sqrt{\pi }}{\sqrt[4]{5}}\, \cos \left(\frac{1}{2} \tan ^{-1}(2)\right)$$ Finally
$$I=\sqrt{\frac{1+\sqrt{5}}{10} \, \pi }$$
