
question about NIntegrate
Posted:
Nov 22, 2012 4:33 AM


Hi,
I want to use function NIntegrate to integrate a rather complicated function which should be calculated numerically and returns a Table. However, when I write something of the kind:
Clear[f] f[(a_)?NumericQ] := {a^2}; NIntegrate[f[x], {x, 1, 1}]
I get an error: "Integrand f[x] is not numerical at {x} = {0.984085}"
Strangely, the following code works fine:
NIntegrate[f[1], {x, 1, 1}]
giving the result {2.}
What am I doing wrong?
Dmitry

