Improper integral of an even power of $x$ times $e^{-x^2}$ In Donald McQuarrie’s Mathematical Methods for Scientists and Engineers, he has a problem I would like to assign to my class, but I am having trouble solving it. It states

Show that
$$\int_0^\infty e^{-x^2} \cos\alpha x \,dx = \frac{\sqrt{\pi}}{2} e^{-\alpha^2/4},$$
by expanding $\cos\alpha x$ in a Maclaurin series and integrating term by term.

Doing as suggested, you get
$$
\int_0^\infty e^{-x^2} \left( 1 - \frac{\alpha^2}{2!} x^2 + \frac{\alpha^4}{4!} x^4 + \dots \right)dx.
$$
I know that the first integral is $\sqrt{\pi}/2$ and that the remaining integrals can be evaluated using the following result from a table of integrals that I have
$$
\int_0^\infty x^{2n} e^{-x^2} dx = \frac{1 \cdot 3 \cdot 5 \dots (2n-1) }{2^{n+1}} \sqrt{\pi}.
$$
Doing this, I can complete the problem, the issue is that I do not know how to evaluate the above integral to obtain the result I found in the table of integrals.
Can anyone point me in the right direction?

Evaluate the table integral as follows
$$
\int_0^\infty x^{2n} e^{-x^2} dx = 
(-1)^n \frac{d^n}{da^n} \bigg(\int_0^\infty e^{-ax^2} dx\bigg)_{a=1}  \\=
(-1)^n \frac{d^n}{da^n} \bigg(\frac{\sqrt{\pi}}2 a^{-1/2} \bigg)_{a=1} =\frac{1 \cdot 3 \cdot 5 \cdots (2n-1) }{2^{n+1}} \sqrt{\pi}.
$$
