How to evaluate $$ \int_{-\infty}^{\infty} x^2 e^{-x^2} \cos x \, dx? $$
My Attempt:
Since the integrand is an even function, we have $$ \int_{-\infty}^{\infty} x^2 e^{-x^2} \cos x \, dx = 2 \int_0^{\infty} x^2 e^{-x^2} \cos x \, dx. \tag{1} $$
Since $-1 \leq \cos x \leq 1$ and $x^2 e^{-x^2} > 0$ for all $x$ such that $0 \leq x < \infty$, we have $$ -x^2 e^{-x^2} \leq x^2 e^{-x^2} \cos x \leq x^2 e^{-x^2}, $$ which implies $$ -\int_0^{\infty} x^2 e^{-x^2} \, dx \leq \int_0^{\infty} x^2 e^{-x^2} \cos x \, dx \leq \int_0^{\infty} x^2 e^{-x^2} \, dx, $$ and hence $$ -2 \int_0^{\infty} x^2 e^{-x^2} \, dx \leq 2 \int_0^{\infty} x^2 e^{-x^2} \cos x \, dx \leq 2 \int_0^{\infty} x^2 e^{-x^2} \, dx. $$
Now if we can show that $$ \int_0^{\infty} x^2 e^{-x^2} \, dx = 0, $$ then would obtain $$ \int_{-\infty}^{\infty} x^2 e^{-x^2} \cos x \, dx = 0. $$ [ Refer to (1) above.]
Am I right? If so, then what next? How to proceed?
Or, is there another better way around this problem?