# Open Composite Newton–Cotes formula

I'm after an Open Composite Newton-Cotes formula.

The reason for this is I have a function that I know at N evenly spaced interior grid points but I do not know it at the two endpoints.

I'm after something that is of reasonably high order, At least as good as Simpson's 3/8 rule

• Welcome to Math.SE! You have told us about a problem, but did not ask an actual question. Could you specify what you would like to know? Oct 2 '15 at 12:28
• You can find the parameter of the rules on Wikipedia. What exactly is question? Oct 2 '15 at 12:36
• I guess I don't know how to express the question differently. The formula on wikipedia are not the composite rules. I'm looking for the composite formula of say degree 4, that doesn't include the end point (because in my application they are unknown). So I guess the question is can you give me a composite newton-cotes formula that doesn't include the end points? Oct 2 '15 at 14:36
• Composite rules work always in the same way. Transform $f$ on a subinterval $[x, x+h]$ to a function on $[0,1]$, say $g(t) = f(x + th) h$, apply the rule you like on $g$, and sum up the rules on every subintervals. Oct 2 '15 at 15:20
• But how does it work in the situation where you want to use an open formula? Do you end up not using internal points? Oct 2 '15 at 15:26

Let $f:[a,b]\to\mathbb R$ and $x_i = a + ih$, $f_i = f(x_i)$, for $i= 1, \dotsc, N$ and $h = (b-a) / (N+1)$. We want to approximate $\int_a^b f$ using a quadrature rule of at least order $4$. Thus, we apply Milne's rule for $x_1,x_2,x_3$ and $x_{N-2},x_{N-1}, x_N$, and Simpson's rule for $x_4,\dotsc, x_{N-3}$.
Assume $N = 3M$. We obtain: