Re: specifying the integration interval using a function
- To: mathgroup at smc.vnet.net
- Subject: [mg95807] Re: specifying the integration interval using a function
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Wed, 28 Jan 2009 06:26:57 -0500 (EST)
- Organization: The Open University, Milton Keynes, UK
- References: <glmt0r$mqd$1@smc.vnet.net>
In article <glmt0r$mqd$1 at smc.vnet.net>, pfb <pf.buonsante at gmail.com> wrote: > is it possible to specify the integration interval using a function? [snip] > I have tried > > F[x_,D_]:= NIntegrate[f[y],Flatten[{y,s[x,D]}]] > > but mathematica complains that Flatten[{y,s[x,D]}] is not a correct > integration range specification, despite > its evaluation (in a separate cell) gives what I'd expect, i.e. {y,x- > D,s1,s2,s3,x+D}. [snip] Just force the evaluation of the iterator function by wrapping it within *Evaluate*, as in F[x_, D_] := NIntegrate[f[y], Evaluate[Flatten[{y, s[x, D]}]]] Regards, --Jean-Marc