How to prove $\int_0^\infty e^{-x^2}cos(2bx) dx = \frac{\sqrt{\pi}}{2} e^{-b^2}$

Contour Integral Method $$ \begin{align} \int_0^\infty e^{-x^2}\cos(2bx)\,\mathrm{d}x &=\frac12\int_{-\infty}^\infty e^{-x^2}\cos(2bx)\,\mathrm{d}x\\ &=\frac12\int_{-\infty}^\infty e^{-x^2}e^{i2bx}\,\mathrm{d}x\\ &=\frac12\int_{-\infty}^\infty e^{-(x-ib)^2}e^{-b^2}\,\mathrm{d}x\\ &=\frac12e^{-b^2}\int_{-\infty-ib}^{\infty-ib}e^{-x^2}\,\mathrm{d}x\\ &=\frac12e^{-b^2}\int_{-\infty}^\infty e^{-x^2}\,\mathrm{d}x\tag{$\ast$}\\ &=\frac{\sqrt\pi}{2}e^{-b^2} \end{align} $$ $(\ast)$ is valid since $e^{-z^2}$ has no poles and the integral along the two ends of the infinitely long rectangle between the paths vanishes at $\infty$.


Differential Equation Method $$ \begin{align} \frac{\mathrm{d}}{\mathrm{d}b}\int_0^\infty e^{-x^2}\cos(2bx)\,\mathrm{d}x &=-\int_0^\infty e^{-x^2}2x\sin(2bx)\,\mathrm{d}x\\ &=\int_0^\infty\sin(2bx)\,\mathrm{d}e^{-x^2}\\ &=-2b\int_0^\infty e^{-x^2}\cos(2bx)\,\mathrm{d}x \end{align} $$ The solution to $\frac{\mathrm{d}}{\mathrm{d}b}f(b)=-2bf(b)$ is $f(b)=Ce^{-b^2}$. Evaluating at $b=0$ yields $C=\frac{\sqrt\pi}{2}$. Therefore, $$ \int_0^\infty e^{-x^2}\cos(2bx)\,\mathrm{d}x=\frac{\sqrt\pi}{2}e^{-b^2} $$