[Math] Open Composite Newton–Cotes formula

computational mathematicsintegrationnumerical methods

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

Best Answer

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:

\begin{align} \int_a^{x_4} f & \approx \frac{4h}{3} (2f_1 - f_2 + 2f_3), \\ \int_{x_{3i+1}}^{x_{3i+3}} f & \approx \frac{2h}{6} (f_{3i+1} + 4f_{3i+2} + f_{3i+3}), \quad i=1,\dotsc, M-2, \\ \int_{x_{N-3}}^b f & \approx \frac{4h}{3} (2f_{N-2} - f_{N-1} + 2f_{N}). \end{align}

Related Question