MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with nested NIntegrate[]

  • To: mathgroup at
  • Subject: [mg70228] Re: Problem with nested NIntegrate[]
  • From: Bill Rowe <readnewsciv at>
  • Date: Sun, 8 Oct 2006 02:04:35 -0400 (EDT)

On 10/7/06 at 7:08 AM, e.schlemm at (Eckhard) wrote:

>I encountered some strange behaviour of NIntegrate when I use a
>somewhat neseted structure of several - in my example of two -
>NIntegrate[] functions


>This gives me the error

>NIntegrate::"num Integrand y is not numerical at {x) = 0

>Why does the inner NIntegrate function not know, what value is
>currently assigned to y...

>I hope someone can shed a little light on that seemingly paradoxical

NIntegrate is a numerical procedure that works by sampling your 
function at specific values. That is for NIntegrate to do its 
thing it must substitute numbers for variable of integration and 
the function must return a number.

Your function in the inner NIntegrate doesn't meet the above 
criteria. It will return y which does not have an assigned 
numerical value yet. Hence the error message.

Changing the inner NIntegrate to Integrate solves the issue, i.e.,



But, I wonder why you are using the syntax:


If you want a numerical answer for a double integral, the 
appropriate syntax is:

NIntegrate[expr, {var1, low, high}, {var2, low, high}]

which avoids the issue you are having.
To reply via email subtract one hundred and four

  • Prev by Date: Re: Closed-form Integral Solution without Hypergeometric2F1Regularized ! ! !
  • Next by Date: Re: Troubles with Integrate
  • Previous by thread: Problem with nested NIntegrate[]
  • Next by thread: Re: Problem with nested NIntegrate[]