Probable bug: EvaluationMonitor with NIntegrate, "ExtrapolatingOscillatory",

*To*: mathgroup at smc.vnet.net*Subject*: [mg85684] Probable bug: EvaluationMonitor with NIntegrate, "ExtrapolatingOscillatory",*From*: Andrew Moylan <andrew.j.moylan at gmail.com>*Date*: Tue, 19 Feb 2008 01:58:05 -0500 (EST)

For NIntegrate[BesselJ[0, x^2], {x, 0, Infinity}, EvaluationMonitor :> bla], EvaluationMonitor is not being called with x set to the actual values at which the integrand is being evaluated. To see this: dummy[x_?NumericQ] := (Sow[x, 1]; 1) ListPlot /@ (NIntegrate[dummy[x] BesselJ[0, x^2], {x, 0, Infinity}, EvaluationMonitor :> Sow[x, 2]] // Reap // Last) Presumably the reason for the bug is that method "ExtrapolatingOscillatory" (which is being used automatically for this integrand) is (correctly) integrating between the roots of BesselJ[0, x^2], but EvaluationMonitor is being evaluated with x set to the roots of BesselJ[0, x], i.e., with x being set to the value of an internal transformed integration variable.