I have an issue :
NIntegrate[x^2 *Exp[-x^2], {x, 0, Infinity}]
gives out 0.443113
But :
NIntegrate[x^2 *Exp[-x^2], {x, 0, 6857}]
gives an error:
NIntegrate::izero: Integral and error estimates are 0 on all integration subregions. Try increasing the value of the MinRecursion option. If value of integral may be 0, specify a finite value for the AccuracyGoal option.
and a zero as a result
However:
NIntegrate[x^2 *Exp[-x^2], {x, 0, 6855}]
gives the correct answer of 0.443113.
What is the difference of integrating over 6855 or 6857 ? (I am not really aware of the insides of mathematica and how it calculates the integrals numerically).
Addition to my question - how to access the properties of integration and play with the parameters.
Thank you a lot for your help :)
NIntegrate
's message "izero" pretty much tells you how to get a better result. As for "how to access the properties of integration and play with the parameters." -- all of these are answered in the advancedNIntegrate
documentation. $\endgroup$General::munfl
) is used as a signal for recursive subdivision. Certainly aTrace[]
indicates that the underflow message is suppressed. $\endgroup$