Newton-Cotes Formulas

Author

Eric W. Weisstein
September 18, 2007

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Calculus/Newton-CotesFormulas.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Newton-CotesFormulas.html.

©2007 Wolfram Research, Inc. except for portions noted otherwise

Code

NewtonCotes[n_,r_]:=(-1)^(n-r)/r!/(n-r)! Integrate[Product[t-i,{i,0,r-1}]Product[t-i,{i,r+1,n}],{t,0,n}]

NewtonCotes[n_]:=Table[NewtonCotes[n,r],{r,0,n}]

Attempt to Get Closed Form

Product[t-i,{i,0,r-1}]Product[t-i,{i,r+1,n}]

(∫_0^n)-(((-1))^n) t (Pochhammer[1-t, r-1]) (Pochhammer[r-t+1, n-r])dt

Integrate[-(((-1))^n) t Pochhammer[1-t,-1+r] Pochhammer[1+r-t,n-r],{t,0,n}]

(∫_0^n)(((((-1))^n) (Gamma[n-t+1]))/((r-t) (Gamma[-t])))dt

FullSimplify[%]

Integrate[(((((-1))^n) Gamma[1+n-t])/((r-t) Gamma[-t])),{t,0,n}]

FullSimplify[(((((-1))^n) Gamma[1+n-t])/((r-t) Gamma[-t]))/.Gamma[-t]:>((-π)/(t Sin[π t]Gamma[t])),0<t<n]

Integrate[(((((-1))^n) t Gamma[1+n-t] Gamma[t] Sin[π t])/(-π r+π t)),{t,0,n}]

(∫_0^n)(((((-1))^n) t (Pochhammer[1-t, n]))/(t-r))dt

((Product[t-i,{i,0,n}])/(t-r))

Integrate[(((((-1))^n) t Pochhammer[1-t,n])/(-r+t)),{t,0,n}]

FunctionExpand[(((((-1))^n) t Pochhammer[1-t,n])/(-r+t))]

Series[((t Pochhammer[1-t,n])/(-r+t)),{t,0,3}]//FullSimplify

Table

(nc=NewtonCotes/@Range[11])//ColumnForm

Plus@@@nc

InputForm[Flatten[Take[nc,4]]]

Through[{Numerator,Denominator}[Flatten[nc]]]

NPointRule[k_]:=Factor[NewtonCotes[k-1].Array[f,k]]/.f[n_]:>(Subscript[f, n])//TraditionalForm

2-point

NPointRule[2]

3-point

NPointRule[3]

4-point

NPointRule[4]

8-point

NPointRule[8]

9-point

NPointRule[9]

10-point

NPointRule[10]

11-point

NPointRule[11]