NIntegrate
owns the attribute HoldAll
:
Attributes@NIntegrate
(* {HoldAll, Protected} *)
However, when reading this answer, I surprisingly noticed that at least in the following case the 1st argument of NIntegrate
is actually evaluated!:
NIntegrate[BesselJ[9/2, x], {x, 1, 2}] // Trace
So my question is, does NIntegrate
always evaluates its 1st argument? If the answer is Yes, what's the meaning of this design, why not simply use HoldRest
?
NIntegrate[LegendreP[9, x], {x, 0, 1}] // Trace
. I don't have time to write a detailed answer at the moment, but as I noted, theIntegrationMonitor
framework might be revealing (maybe Anton will write an answer if he sees this). $\endgroup$NIntegrate[x + x, {x, 0, 1}] // Trace
. $\endgroup$