MathGroup Archive 2006

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

Search the Archive

Re: Re: NIntegrate and Sequence

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63505] Re: [mg63469] Re: [mg63459] NIntegrate and Sequence
  • From: Pratik Desai <pdesai1 at umbc.edu>
  • Date: Tue, 3 Jan 2006 01:25:42 -0500 (EST)
  • References: <200601021049.FAA01309@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Bob Hanlon wrote:

>Nintegrate has the attribute HoldAll.
>
>Attributes[NIntegrate]
>
>{HoldAll,Protected}
>
>Use Evaluate.
>
>NIntegrate[r,Evaluate[{r,14,Sequence@@{16,18},40}]]
>
>702.
>
>
>Bob Hanlon
>
>  
>
>>From: Bruce Colletti <vze269bv at verizon.net>
To: mathgroup at smc.vnet.net
>
>>Date: 2006/01/01 Sun AM 01:16:12 EST
>>Subject: [mg63505] [mg63469] [mg63459] NIntegrate and Sequence
>>
>>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
>> 
>>    
>>
I tried using GaussianQuadrature, why is the error so high for this 
interval (see out 49)


In[46]:=
<<NumericalMath`GaussianQuadrature`
data1=GaussianQuadratureWeights[5,14,40]
ans=Table[Times@@data1[[r]],{r,1,Length[data1],1}]//Total
GaussianQuadratureError[5,f,14,40]//InputForm

Out[47]=
{{15.2197,3.08005},{19.9999,6.22217},{
  27.,7.39556},{34.0001,6.22217},{38.7803,3.08005}}

Out[48]=
702.

Out[49]//InputForm=
-1447.938207040937*Derivative[10][f]




  • Prev by Date: Re: Displaying decimals
  • Next by Date: Re: Unknown Sum of Series
  • Previous by thread: Re: NIntegrate and Sequence
  • Next by thread: Re: Re: NIntegrate and Sequence