Re: NIntegrate and Sequence
- To: mathgroup at smc.vnet.net
- Subject: [mg63470] Re: [mg63459] NIntegrate and Sequence
- From: <bsyehuda at gmail.com>
- Date: Mon, 2 Jan 2006 05:49:04 -0500 (EST)
- References: <200601010616.BAA16066@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
You need to force evaluation of the second argument of NIntegrate prior of using it since NIntegrate which has the attribute HoldAll. All the following possibilities return 702. (as expected) NIntegrate[Evaluate[r, {r, 14, Sequence @@ {16, 18}, 40}]] NIntegrate[r, Evaluate@{r, 14, Sequence @@ {16, 18}, 40}] NIntegrate[r, Evaluate[{r, 14, Sequence @@ {16, 18}, 40}]] NIntegrate[r, {r, 14, Sequence @@ {16, 18}, 40} // Evaluate] regards yehuda On 1/1/06, Bruce Colletti <vze269bv at verizon.net> wrote: > > Re Mathematica 5.2 under WinXP. > > The first command works while the other returns the NIntegrate::nlim > error. Yet {r, 14, Sequence @@ {16, 18}, 40} returns {r,14,16,18,40}. > > NIntegrate[r, {r, 14, 16, 18, 40}] > NIntegrate[r, {r, 14, Sequence @@ {16, 18}, 40}] > > What is causing the error? > > Thankx. > > Bruce > >
- References:
- NIntegrate and Sequence
- From: Bruce Colletti <vze269bv@verizon.net>
- NIntegrate and Sequence