Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'NIntegrate' topicStudent Support Forum > General > "NIntegrate"

Next Comment >Help | Reply To Topic
Author Comment/Response
Nan
09/05/04 10:31pm

for example, I define a function f like this and I want to NIntegrate it:

f[x_,y_,z_]:=Sin[x+y+z]

If I do like this:

NIntegrate[f[x,y,z],{x,0,1},{y,0,1},{z,0,1}]

it runs all right and get the correct answer.

but if I do like this:

g[z_]:=NIntegrate[f[x,y,z],{x,0,1},{y,0,1}]
NIntegrate[g[z], {z, 0, 1}]

I can also get correct answer but there exists an error:
"NIntegrate::inum:
Integrand f[x,y,z] is not numerical at {x,y}={0.5,0.5}.More..."

how can I avoid this error??

URL: ,

Subject (listing for 'NIntegrate')
Author Date Posted
NIntegrate Nan 09/05/04 10:31pm
Re: NIntegrate Forum Modera... 09/08/04 12:51pm
Next Comment >Help | Reply To Topic