on a pure function for a list of integrals
- To: mathgroup at smc.vnet.net
- Subject: [mg77230] on a pure function for a list of integrals
- From: Ruth <ruth.lazkoz at ehu.es>
- Date: Wed, 6 Jun 2007 06:45:43 -0400 (EDT)
- References: <f43gpj$2k7$1@smc.vnet.net> <4665D6FB.9070505@gmail.com>
Thanks, Jean-Marc, you suggest f = Block[{x, a = #1, b = #2}, (NIntegrate[Sqrt[a*x + b], {x, 0, #1}] & ) /@ #3] & ; f[2, 3, {0.1, 0.5, 0.9}] but I think there are assignments which are never used as In[1]:= f = Block[{x}, (NIntegrate[Sqrt[a*x + b], {x, 0, #1}] & ) /@ #3] & ; f[2, 3, {0.1, 0.5, 0.9}] gives me exactly the same result so the bit a = #1, b = #2 seems unnecessary