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.(adsbygoogle = window.adsbygoogle || []).push({});

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)

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Integrate vs. NIntegrate in Mathematica

Tags:

**Physics Forums | Science Articles, Homework Help, Discussion**