NIntegrate::inumr

Details

  • This message is generated when none of the values of the integrand for the sampling points in a region (one- or multidimensional) is a number.
  • Off[message] switches off the message; On[message] switches it on. For example: Off[NIntegrate::inumr].

Examples

Basic Examples  (2)

An error occurs because the integrand contains a parameter that does not have a numerical value:

The integral is computed without difficulty if the parameter has a numerical value:

Here, NIntegrate is used within NMaximize and is evaluated repeatedly without a numerical value for c:

One possible solution is to use Integrate instead of NIntegrate. This is advantageous because NMaximize can do symbolic processing on its input:

If symbolic integration is not possible, an alternative is to restrict the argument type given to NIntegrate with NumericQ by writing a helper function fun:

Symbolic input returns unevaluated:

Numeric input evaluates:

Now, using NMaximize on fun evaluates without any warnings: