6
$\begingroup$

Bug introduced in 8.0.4 or earlier and fixed in 11.1


As part of a routine that must cope with integration of varying numbers of dimensions, I would like to use indexed variable names (e.g., x[0], x[1],...) as dummy integration variables. However, it doesn't work correctly. Here are simplified examples that highlights the problem:

NIntegrate[1, {x0, 0, 1}, EvaluationMonitor :> Print["hi"]]

and

NIntegrate[1, {x0, 0, 1}, {x1, 0, 1 - x0}, EvaluationMonitor :> Print["hi"]]

work correctly (i.e., integrate correctly and print "Hi" at each step of integration),

NIntegrate[1, {x[0], 0, 1}, EvaluationMonitor :> Print["hi"]]

also works correctly.

However,

NIntegrate[1, {x[0], 0, 1}, {x[1], 0, 1 - x[0]}, EvaluationMonitor :> Print["hi"]]

integrates correctly but does not trigger the EvaluationMonitor.

What is the problem?

$\endgroup$
  • 5
    $\begingroup$ Reported to the developers as a bug. Thanks! $\endgroup$ – ilian May 26 '15 at 15:32
1
$\begingroup$

This bug has been fixed in the just released Mathematica 11.1.

NIntegrate[1, {x[0], 0, 1}, {x[1], 0, 1 - x[0]}, 
 EvaluationMonitor :> Print["hi"]]

hi

< ... >

hi

0.5
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.