I wrote a simple code as follows


then Mathematica shall give the right result of the vector field. But it also gives extra warning messages which puzzle me so much. They are of the same type as follows

NIntegrate::inumr: The integrand x+z has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,1}}. >>

It seems that NIntegrare cannot calculate an expression with some un-specific symbol.
But I just think that VectorPlot, just like other command, such as Plot, shall hold the expression of NIntegrate un-evaluate until it get the specific values of variables x and y. Such warning message shall not appear.
In fact, the command DensityPlot or Plot has no such problems. For example,

  • $\begingroup$ change the definitions of f and g to include the PatternTest: i.e., f[x_?NumericQ, y_?NumericQ] := ... $\endgroup$
    – kglr
    Feb 6, 2015 at 14:22
  • 1
    $\begingroup$ Check out support.wolfram.com/kb/12502 and this $\endgroup$
    – Szabolcs
    Feb 6, 2015 at 15:48


Browse other questions tagged or ask your own question.