Without complex numbers - and maybe what your instructor was thinking of:
Write
$$ f(t) = \int_0^\infty e^{-x^2}\cos (t x) \, dx.$$
Differentiate (with respect to $t$): $$f'(t) = - \int_0^\infty e^{-x^2} x \sin (t x) \, dx.$$
[I'm hoping your instructor allows differentiation under the integral sign, 'as obvious.' If not, one can justify it with words such as 'dominated convergence' - but...]
Integrate (with respect to $x$) by parts, with $du = e^{-x^2} (-2x)/2 \,dx$ and $v =\sin (t x)$:
$$f'(t) = \bigg( 1/2\, e^{-x^2} \sin(tx)\bigg|_0^\infty - 1/2\, \int_0^\infty e^{-x^2} t \cos (tx)\, dx \bigg).$$
The first term comes to zero, and we can take the factor of $t$ outside of the integral,
so that one ends up with
$$ f'(t)= {-t\over 2} f(t).$$
Divide by $f(t)$, integrate, and solve for the constant of integration, to obtain
$$ f(t) = f(0)\, e^{-t^2/4}.$$
[Qualms about the formal manipulation of dividing by $f(t)$ as $f(t)$ could be zero can be ignored, in this case, because of the so-called existence and uniqueness theorem of differential equations.]
In any event, as in Peter Foreman's answer, your ratio is
$$ \left\lfloor f(0) \over f(2) \right\rfloor = \left\lfloor f(0) \over e^{-2^2/4}\, f(0) \right\rfloor =\left\lfloor e \right\rfloor = 2.$$
FWIW, differentiation under the integral sign is often referred to as the Feynman trick.