- #1

- 1

- 0

## Main Question or Discussion Point

I'm trying to integrate the function Exp[-I*t*x - t^2/2] from -infinity to infinity using NIntegrate in Mathematica; the value that I get is accurate when x is small, but as x gets larger, the output from NIntegrate does not match the value I get when I use Integrate -- it gets less and less accurate.

Does anyone know why this happens and what I can do to make sure NIntegrate is giving me accurate answers? (I'm ultimately going to apply NIntegrate to a much more complicated function and I'm using this test function to figure out how to deal with the oscillatory behavior)

Does anyone know why this happens and what I can do to make sure NIntegrate is giving me accurate answers? (I'm ultimately going to apply NIntegrate to a much more complicated function and I'm using this test function to figure out how to deal with the oscillatory behavior)