Problem when NIntegrate matrix

*To*: mathgroup at smc.vnet.net*Subject*: [mg81341] Problem when NIntegrate matrix*From*: chiron1201 <huangj at cse.buaa.edu.cn>*Date*: Wed, 19 Sep 2007 05:41:39 -0400 (EDT)

Hi all! I can not understand why there is a NIntegrate::inum error when I try to evaluate the following code TEST = Piecewise[{ {{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, #1 < 0.00}, {{{2, 3, 4}, {3, 4, 5}, {4, 5, 6}}, #1 >= 0.00}, }] &; NIntegrate[TEST[x], {x, -1, +1}] However, I can get the correct result by modifying the code manually. That is NIntegrate[{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, {x, -1, 0}]+NIntegrate[{{2, 3,4}, {3, 4, 5}, {4, 5, 6}}, {x, 0, 1}] However, it is impossible for me to manually split the integration range to thousands of segments. Why this happens? What should I do if I want the first code be evaluated correctly? Thanks!